![]() |
Scanframe Modular Application 0.1.0
|
Template for creating a script global entry linking a dynamic created method. More...
#include <ScriptGlobalEntry.h>
Public Types | |
typedef Value(T::* | FunctionType) (const Value::vector_type &) |
Public Member Functions | |
TScriptGlobalEntry (T *self, FunctionType func, const std::string &name, int argumentCount, const std::string &description) | |
TScriptGlobalEntry (const TScriptGlobalEntry &)=delete | |
TScriptGlobalEntry & | operator= (const TScriptGlobalEntry &)=delete |
![]() | |
ScriptGlobalEntry (const std::string &name, const std::string &description, int argumentCount) | |
Default Constructor adding itself to the global mapped entries. | |
virtual | ~ScriptGlobalEntry () |
Destructor. Removes itself from the mapped entries. | |
ScriptGlobalEntry (const ScriptGlobalEntry &)=delete | |
Not allowed to copy. | |
ScriptGlobalEntry & | operator= (const ScriptGlobalEntry &)=delete |
Not allowed to copy. | |
std::string | getName () const |
Gets the name of the entry. | |
void | setDescription (const std::string &description) |
Sets the description of the entry. | |
std::string | getDescription () const |
Gets the description of the entry. | |
int | getArgumentCount () const |
Gets the amount of parameters that is needed for this function. | |
Additional Inherited Members | |
![]() | |
static bool | call (const std::string &name, const Value::vector_type &arguments, Value &result) |
Finds the function with name 'name' and returns true when the function was found passing the correct amount of parameters. When found the function is also executed. | |
static ScriptGlobalEntry * | getEntry (const std::string &name) |
Gets the entry pointer by name. | |
![]() | |
static constexpr size_t | unlimitedArgs = std::numeric_limits<int>::max() |
Unsigned size value indicating not found or no index. | |
![]() | |
std::string | _name |
Holds the name of the entry. | |
std::string | _description |
Holds description of the entry. | |
int | _argumentCount {0} |
Holds the number of parameters to pass to the entry. | |
Template for creating a script global entry linking a dynamic created method.
T | Class containing the method of type FunctionType. |
typedef Value(T::* sf::TScriptGlobalEntry< T >::FunctionType) (const Value::vector_type &) |
|
inline |
|
delete |
|
delete |