Public Member Functions | |
Script (const std::string &name) | |
Constructor. | |
~Script () | |
Deconstructor. | |
void | refAdd () |
Increases the reference counter. | |
void | refRelease () |
Decreases the reference counter. | |
u32 | getID () const |
Gets the ID of this script. | |
const std::string & | getName () const |
Gets the name of this script. | |
asIScriptContext * | getContext () const |
Returns the AngelScript context associated with this Script object. | |
asIScriptModule * | getModule () const |
Returns the AngelScript module associated with this Script object. | |
bool | loadScript (const std::string &fileName) |
Loads a script file and builds it. | |
bool | unloadScript () |
Unloads the loaded script. | |
bool | executeFunctionByName (const std::string &name, const std::string &args="") |
Executes the function with the given name and with the given arguments. | |
Static Public Member Functions | |
static Script * | refFactory (const std::string &name) |
Will be used to instanciate objects of this class. |
Definition at line 30 of file Script.h.
Script::Script | ( | const std::string & | name | ) |
Script::~Script | ( | ) |
bool Script::executeFunctionByName | ( | const std::string & | name, | |
const std::string & | args = "" | |||
) |
Executes the function with the given name and with the given arguments.
Definition at line 161 of file Script.cpp.
asIScriptContext * Script::getContext | ( | ) | const |
Returns the AngelScript context associated with this Script object.
Definition at line 88 of file Script.cpp.
u32 Script::getID | ( | ) | const |
asIScriptModule * Script::getModule | ( | ) | const |
Returns the AngelScript module associated with this Script object.
Definition at line 94 of file Script.cpp.
const std::string & Script::getName | ( | ) | const |
bool Script::loadScript | ( | const std::string & | fileName | ) |
Loads a script file and builds it.
fileName | Filename of the file from where the script should be retrieved. |
Definition at line 100 of file Script.cpp.
void Script::refAdd | ( | ) |
Increases the reference counter.
Definition at line 60 of file Script.cpp.
Script * Script::refFactory | ( | const std::string & | name | ) | [static] |
Will be used to instanciate objects of this class.
Definition at line 54 of file Script.cpp.
void Script::refRelease | ( | ) |
Decreases the reference counter.
Definition at line 66 of file Script.cpp.
bool Script::unloadScript | ( | ) |
Unloads the loaded script.
Definition at line 146 of file Script.cpp.