| |
|
||||||
|
|
|||||||
|
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 678 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 637 of file lbp_function.cpp. ◆ ~LuaFunction()
Destructor Definition at line 690 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 652 of file lbp_function.cpp. ◆ Definition() [2/2]
Get function definition.
Definition at line 659 of file lbp_function.cpp. ◆ DoExecute()
Executes code as supplied by FunctionDefinition Implements faudes::Function. Definition at line 705 of file lbp_function.cpp. ◆ DoExecuteA()
Execute stages Definition at line 763 of file lbp_function.cpp. ◆ DoExecuteB()
Execute stages Definition at line 797 of file lbp_function.cpp. ◆ DoExecuteC()
Execute stages Definition at line 852 of file lbp_function.cpp. ◆ DoExecuteD()
Execute stages Definition at line 967 of file lbp_function.cpp. ◆ DoExecuteE()
Execute stages Definition at line 1024 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 677 of file lbp_function.cpp. ◆ DoVariant()
Reimplemented from faudes::Function. Definition at line 664 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 749 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 699 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 647 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 729 of file lbp_function.cpp. Member Data Documentation◆ mEntryStack
Definition at line 876 of file lbp_function.h. ◆ mFtable
Definition at line 875 of file lbp_function.h. ◆ mFType
Definition at line 877 of file lbp_function.h. ◆ mLParameter
Definition at line 879 of file lbp_function.h. ◆ mLParameterCount
Definition at line 881 of file lbp_function.h. ◆ mLReturn
Definition at line 878 of file lbp_function.h. ◆ mLReturnCount
Definition at line 880 of file lbp_function.h. ◆ pL
State of Lua interpreter Definition at line 873 of file lbp_function.h. ◆ pLL
Definition at line 874 of file lbp_function.h. ◆ pLuaFuncDef
Typed reference to definition Definition at line 870 of file lbp_function.h. The documentation for this class was generated from the following files: libFAUDES 2.34d --- 2026.03.11 --- c++ api documentaion by doxygen |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||