IFunctionHandler

C++
struct IFunctionHandler {
};
File

IScriptSystem.h

Description

This interface is used by the C++ function mapped to the script to retrieve the function parameters passed by the script and to return an optiona result value to the script.

IFunctionHandler::~IFunctionHandler Destructor
C++
virtual ~IFunctionHandler();
IFunctionHandler::EndFunction Method ()
C++
virtual int EndFunction() = 0;
IFunctionHandler::EndFunction Method (T &)
C++
template <class T> int EndFunction(const T & value);
IFunctionHandler::EndFunction Method (T1 &, T2 &)
C++
template <class T1,class T2> int EndFunction(const T1 & value1, const T2 & value2);
IFunctionHandler::EndFunction Method (T1 &, T2 &, T3 &)
C++
template <class T1,class T2,class T3> int EndFunction(const T1 & value1, const T2 & value2, const T3 & value3);
IFunctionHandler::EndFunctionAny Method (ScriptAnyValue &)
C++
virtual int EndFunctionAny(const ScriptAnyValue & any) = 0;
IFunctionHandler::EndFunctionAny Method (ScriptAnyValue &, ScriptAnyValue &)
C++
virtual int EndFunctionAny(const ScriptAnyValue & any1, const ScriptAnyValue & any2) = 0;
IFunctionHandler::EndFunctionAny Method (ScriptAnyValue &, ScriptAnyValue &, ScriptAnyValue &)
C++
virtual int EndFunctionAny(const ScriptAnyValue & any1, const ScriptAnyValue & any2, const ScriptAnyValue & any3) = 0;
IFunctionHandler::EndFunctionNull Method
C++
int EndFunctionNull();
IFunctionHandler::GetFuncName Method
C++
virtual const char* GetFuncName() = 0;
Description

Returns the function name of the currently called function. Notes: Use this only used for error reporting.

IFunctionHandler::GetIScriptSystem Method

Returns pointer to the script system.

C++
virtual IScriptSystem* GetIScriptSystem() = 0;
IFunctionHandler::GetParam Method
C++
template <typename T> bool GetParam(int nIdx, T & value);
Parameters
Parameters
Description
int nIdx
1-based index of the parameter.
val
Reference to the C++ variable that will store the value.
Description

Get the nIdx param passed by the script.

IFunctionHandler::GetParamAny Method
C++
virtual bool GetParamAny(int nIdx, ScriptAnyValue & any) = 0;
Parameters
Parameters
Description
int nIdx
1-based index of the parameter.
val
Reference to the C++ variable that will store the value.
Description

Gets the nIdx param passed by the script.

IFunctionHandler::GetParamCount Method
C++
virtual int GetParamCount() = 0;
Description

Gets the number of parameter at specified index passed by the Lua.

IFunctionHandler::GetParams Method (P1 &)

Template methods to get multiple parameters.

C++
template <class P1> bool GetParams(P1 & p1);
IFunctionHandler::GetParams Method (P1 &, P2 &)
C++
template <class P1,class P2> bool GetParams(P1 & p1, P2 & p2);
IFunctionHandler::GetParams Method (P1 &, P2 &, P3 &)
C++
template <class P1,class P2,class P3> bool GetParams(P1 & p1, P2 & p2, P3 & p3);
IFunctionHandler::GetParams Method (P1 &, P2 &, P3 &, P4 &)
C++
template <class P1,class P2,class P3,class P4> bool GetParams(P1 & p1, P2 & p2, P3 & p3, P4 & p4);
IFunctionHandler::GetParams Method (P1 &, P2 &, P3 &, P4 &, P5 &)
C++
template <class P1,class P2,class P3,class P4,class P5> bool GetParams(P1 & p1, P2 & p2, P3 & p3, P4 & p4, P5 & p5);
IFunctionHandler::GetParams Method (P1 &, P2 &, P3 &, P4 &, P5 &, P6 &)
C++
template <class P1,class P2,class P3,class P4,class P5,class P6> bool GetParams(P1 & p1, P2 & p2, P3 & p3, P4 & p4, P5 & p5, P6 & p6);
IFunctionHandler::GetParams Method (P1 &, P2 &, P3 &, P4 &, P5 &, P6 &, P7 &)
C++
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7> bool GetParams(P1 & p1, P2 & p2, P3 & p3, P4 & p4, P5 & p5, P6 & p6, P7 & p7);
IFunctionHandler::GetParams Method (P1 &, P2 &, P3 &, P4 &, P5 &, P6 &, P7 &, P8 &)
C++
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> bool GetParams(P1 & p1, P2 & p2, P3 & p3, P4 & p4, P5 & p5, P6 & p6, P7 & p7, P8 & p8);
IFunctionHandler::GetParams Method (P1 &, P2 &, P3 &, P4 &, P5 &, P6 &, P7 &, P8 &, P9 &)
C++
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8,class P9> bool GetParams(P1 & p1, P2 & p2, P3 & p3, P4 & p4, P5 & p5, P6 & p6, P7 & p7, P8 & p8, P9 & p9);
IFunctionHandler::GetParams Method (P1 &, P2 &, P3 &, P4 &, P5 &, P6 &, P7 &, P8 &, P9 &, P10 &)
C++
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8,class P9,class P10> bool GetParams(P1 & p1, P2 & p2, P3 & p3, P4 & p4, P5 & p5, P6 & p6, P7 & p7, P8 & p8, P9 & p9, P10 & p10);
IFunctionHandler::GetParamType Method
C++
virtual ScriptVarType GetParamType(int nIdx) = 0;
Description

Gets the type of the parameter at specified index passed by the Lua.

IFunctionHandler::GetSelf Method
C++
template <class T> bool GetSelf(T & value);
Description

Retrieves the value of the self passed when calling the table. Notes: Always the 1st argument of the function.

IFunctionHandler::GetSelfAny Method
C++
virtual bool GetSelfAny(ScriptAnyValue & any) = 0;
Description

Retrieves the value of the self passed when calling the table. Notes: Always the 1st argument of the function.

IFunctionHandler::GetThis Method
C++
virtual void* GetThis() = 0;
Description

Gets this pointer of table which called C++ method. This pointer is assigned to key "__this" in the table.