ScriptRobot
|
GlobalProperty class. More...
#include <GlobalProperty.h>
Public Member Functions |
|
GlobalProperty () | |
GlobalProperty constructor. More... |
|
~GlobalProperty () | |
GlobalProperty destructor. More... |
|
void | setup (std::string definition, std::string type, std::string name, void *ptr) |
Sets the members of a GlobalProperty. More... |
|
bool | registerProperty (asIScriptEngine *engine) |
Registers this property with the angelscript
engine. More... |
|
void | release () |
Releases the global property. More... |
|
void * | getPtr () |
Returns the pointer to the property. More... |
|
std::string | getDefinition () |
Returns the property definition. More... |
|
std::string | getType () |
Returns the property type. More... |
|
std::string | getName () |
Returns the property name. More... |
|
GlobalProperty class.
Creates an angelscript global property, manages and releases it when the instance of this class is destroyed. The pointer to the property must be kept alive for the duration of the instance of this class containing it. The pointer should then be freed by the application writer.
GlobalProperty::GlobalProperty | ( | ) |
GlobalProperty constructor.
Creates an empty instance of a GlobalProperty class. with ptr set to NULL.
GlobalProperty::~GlobalProperty | ( | ) |
std::string GlobalProperty::getDefinition | ( | ) |
Returns the property definition.
std::string GlobalProperty::getName | ( | ) |
Returns the property name.
void * GlobalProperty::getPtr | ( | ) |
Returns the pointer to the property.
std::string GlobalProperty::getType | ( | ) |
Returns the property type.
bool GlobalProperty::registerProperty | ( | asIScriptEngine * | engine | ) |
Registers this property with the angelscript engine.
This will only work if setup() was called before.
engine | a valid instance of an anglescript engine. |
void GlobalProperty::release | ( | ) |
Releases the global property.
Removes the angelscript dynamic config group containing the property.
void GlobalProperty::setup | ( | std::string | definition, |
std::string | type, | ||
std::string | name, | ||
void * | ptr | ||
) |
Sets the members of a GlobalProperty.
If the members have been previously set this wont work.
definition | the line in a config where this property was pulled from. |
type | the angelscript string representation of the property type. |
name | the name of the property as to be accessed in angelscript code. |
a | pointer to the corresponding property. |