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 | loadScript (IReadFile *file) |
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 34 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 184 of file Script.cpp.
asIScriptContext * Script::getContext | ( | ) | const |
Returns the AngelScript context associated with this Script object.
Definition at line 69 of file Script.cpp.
u32 Script::getID | ( | ) | const |
asIScriptModule * Script::getModule | ( | ) | const |
Returns the AngelScript module associated with this Script object.
Definition at line 75 of file Script.cpp.
const std::string & Script::getName | ( | ) | const |
bool Script::loadScript | ( | IReadFile * | file | ) |
Loads a script file and builds it.
file | Pointer to the IReadFile that will be used. |
Definition at line 127 of file Script.cpp.
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 81 of file Script.cpp.
void Script::refAdd | ( | ) |
Increases the reference counter.
static Script* Script::refFactory | ( | const std::string & | name | ) | [static] |
Will be used to instanciate objects of this class.
void Script::refRelease | ( | ) |
Decreases the reference counter.
bool Script::unloadScript | ( | ) |
Unloads the loaded script.
Definition at line 169 of file Script.cpp.