21 #include <torquescript/function.hpp>
25 typedef void (*NativeFunctionPointer)(std::shared_ptr<ConsoleObject> thisObject, std::shared_ptr<ExecutionState> state,
const std::size_t argumentCount);
34 NativeFunction(NativeFunctionPointer native,
const std::string& package,
const std::string& space,
const std::string& name);
39 virtual void execute(std::shared_ptr<ConsoleObject> thisObject, std::shared_ptr<ExecutionState> state,
const std::size_t argumentCount)
override;
43 NativeFunctionPointer mNativeFunction;
A function is callable subroutine from anywhere in the language, defined by a script....
Definition: function.hpp:40
A NativeFunction is a specialization of Function that allows native C++ programming to be called from...
Definition: nativefunction.hpp:32
virtual void execute(std::shared_ptr< ConsoleObject > thisObject, std::shared_ptr< ExecutionState > state, const std::size_t argumentCount) override
Executes the native function provided to the interpreter.