Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::TScriptGlobalEntry< T > Class Template Reference

Template for creating a script global entry linking a dynamic created method. More...

#include <ScriptGlobalEntry.h>

Inheritance diagram for sf::TScriptGlobalEntry< T >:
Collaboration diagram for sf::TScriptGlobalEntry< T >:

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
 
TScriptGlobalEntryoperator= (const TScriptGlobalEntry &)=delete
 
- Public Member Functions inherited from sf::ScriptGlobalEntry
 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.
 
ScriptGlobalEntryoperator= (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 Public Member Functions inherited from sf::ScriptGlobalEntry
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 ScriptGlobalEntrygetEntry (const std::string &name)
 Gets the entry pointer by name.
 
- Static Public Attributes inherited from sf::ScriptGlobalEntry
static constexpr size_t unlimitedArgs = std::numeric_limits<int>::max()
 Unsigned size value indicating not found or no index.
 
- Protected Attributes inherited from sf::ScriptGlobalEntry
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.
 

Detailed Description

template<typename T>
class sf::TScriptGlobalEntry< T >

Template for creating a script global entry linking a dynamic created method.

Template Parameters
TClass containing the method of type FunctionType.

Member Typedef Documentation

◆ FunctionType

template<typename T >
typedef Value(T::* sf::TScriptGlobalEntry< T >::FunctionType) (const Value::vector_type &)

Constructor & Destructor Documentation

◆ TScriptGlobalEntry() [1/2]

template<typename T >
sf::TScriptGlobalEntry< T >::TScriptGlobalEntry ( T *  self,
FunctionType  func,
const std::string &  name,
int  argumentCount,
const std::string &  description 
)
inline

◆ TScriptGlobalEntry() [2/2]

template<typename T >
sf::TScriptGlobalEntry< T >::TScriptGlobalEntry ( const TScriptGlobalEntry< T > &  )
delete

Member Function Documentation

◆ operator=()

template<typename T >
TScriptGlobalEntry & sf::TScriptGlobalEntry< T >::operator= ( const TScriptGlobalEntry< T > &  )
delete

The documentation for this class was generated from the following file: