|
faudes::LuaFunction Class Reference Detailed DescriptionA LuaFunction is a faudes-function that executes a luafaudes script. LuaFunction is derived from Function and implements the DoTypeCheck and DoExecute interface to run the lua code as supplied by the corresponding function defintion. Thus, it is considered an error to set the function definition to an object that does not cast to a LuaFunctionDefinition. Definition at line 676 of file lbp_function.h.
Constructor & Destructor Documentation◆ LuaFunction()
Constructor. For the function to be operational, a valid reference to the corresponding LuaFunctionDefinition is required. The only exception is the prototype function object used in the LuaFunctionDefinition itself. Definition at line 636 of file lbp_function.cpp. ◆ ~LuaFunction()
Destructor Definition at line 688 of file lbp_function.h. Member Function Documentation◆ Definition() [1/2]
Set function definition. Normally, functions are provided with a function definition on construction. The only exception are prototype objects used in function definitions themselfs and in the function registry.
Reimplemented from faudes::Function. Definition at line 651 of file lbp_function.cpp. ◆ Definition() [2/2]
Get function definition.
Definition at line 658 of file lbp_function.cpp. ◆ DoExecute()
Executes code as supplied by FunctionDefinition Implements faudes::Function. Definition at line 704 of file lbp_function.cpp. ◆ DoExecuteA()
Execute stages Definition at line 762 of file lbp_function.cpp. ◆ DoExecuteB()
Execute stages Definition at line 796 of file lbp_function.cpp. ◆ DoExecuteC()
Execute stages Definition at line 851 of file lbp_function.cpp. ◆ DoExecuteD()
Execute stages Definition at line 966 of file lbp_function.cpp. ◆ DoExecuteE()
Execute stages Definition at line 1023 of file lbp_function.cpp. ◆ DoTypeCheck()
Method to test the type of an assigned parameter with the specified faudes::Signature (i.e. their TypeDefinition label). Note: this method is called by Function::Execute() before actual function execution via DoExecute(). It may be used to perform a dynamic cast in preparation of DoExecute(). The latter is only called, if all types match.
Implements faudes::Function. Definition at line 676 of file lbp_function.cpp. ◆ DoVariant()
Reimplemented from faudes::Function. Definition at line 663 of file lbp_function.cpp. ◆ Evaluate()
Evaluate lua code. This routine avaluates the associated Lua code literally, i.e. no arguments are passed, no specific function is invoked. See also Execute().
Definition at line 748 of file lbp_function.cpp. ◆ L() [1/2]
Set lua state Sets the lua state which this function will use for execution. If set to NULL (e.g. on consruction), the function definition's default state will be used. If this is not set either, the global state is used.
Definition at line 698 of file lbp_function.cpp. ◆ L() [2/2]
◆ New()
Construct on heap. Create a new instance of this function class and return pointer. The new instance will use the same function definition as this instance.
Implements faudes::Function. Definition at line 646 of file lbp_function.cpp. ◆ SyntaxCheck()
Syntax check lua code. This routine does all it needs to run the script, except to invoke the specified function. The reasoning is, that the script may hang and, thus, never return. A consequence is, that you must set a variant and you must supply parameter values befor checking. You may use AllocateValues() and FreeValues() for this purpose. Errors are indicated by an exception. Note that the LuaFunctionDefinition provides a convenience wrapper that runs the check on all variants and cares about value allocation.
Definition at line 728 of file lbp_function.cpp. Member Data Documentation◆ mEntryStack
Definition at line 874 of file lbp_function.h. ◆ mFtable
Definition at line 873 of file lbp_function.h. ◆ mFType
Definition at line 875 of file lbp_function.h. ◆ mLParameter
Definition at line 877 of file lbp_function.h. ◆ mLParameterCount
Definition at line 879 of file lbp_function.h. ◆ mLReturn
Definition at line 876 of file lbp_function.h. ◆ mLReturnCount
Definition at line 878 of file lbp_function.h. ◆ pL
State of Lua interpreter Definition at line 871 of file lbp_function.h. ◆ pLL
Definition at line 872 of file lbp_function.h. ◆ pLuaFuncDef
Typed reference to definition Definition at line 868 of file lbp_function.h. The documentation for this class was generated from the following files: libFAUDES 2.33k --- 2025.09.16 --- c++ api documentaion by doxygen |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||