faudes::LuaFunction Class Reference A LuaFunction is a faudes-function that executes a luafaudes script. More...
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 677 of file lbp_function.h. Constructor & Destructor Documentation
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 644 of file lbp_function.cpp.
Destructor. Definition at line 689 of file lbp_function.h. Member Function Documentation
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 659 of file lbp_function.cpp.
Get function definition.
Reimplemented from faudes::Function. Definition at line 666 of file lbp_function.cpp.
Executes code as supplied by FunctionDefinition. Implements faudes::Function. Definition at line 712 of file lbp_function.cpp.
Execute stages. Definition at line 770 of file lbp_function.cpp.
Execute stages. Definition at line 804 of file lbp_function.cpp.
Execute stages. Definition at line 859 of file lbp_function.cpp.
Execute stages. Definition at line 974 of file lbp_function.cpp.
Execute stages. Definition at line 1031 of file lbp_function.cpp.
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 684 of file lbp_function.cpp.
Reimplemented from faudes::Function. Definition at line 671 of file lbp_function.cpp.
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 756 of file lbp_function.cpp.
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 706 of file lbp_function.cpp.
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 654 of file lbp_function.cpp.
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 736 of file lbp_function.cpp. Member Data Documentation
Definition at line 875 of file lbp_function.h.
Definition at line 874 of file lbp_function.h.
Definition at line 876 of file lbp_function.h.
Definition at line 878 of file lbp_function.h.
Definition at line 880 of file lbp_function.h.
Definition at line 877 of file lbp_function.h.
Definition at line 879 of file lbp_function.h.
State of Lua interpreter. Definition at line 872 of file lbp_function.h.
Definition at line 873 of file lbp_function.h.
Typed reference to definition. Definition at line 869 of file lbp_function.h. The documentation for this class was generated from the following files: libFAUDES 2.24g --- 2014.09.15 --- c++ api documentaion by doxygen |