Script Class Reference

The Script class is technically a wrapper for every AngelScript file that is loaded by the framework. More...

List of all members.

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 ScriptrefFactory (const std::string &name)
 Will be used to instanciate objects of this class.


Detailed Description

The Script class is technically a wrapper for every AngelScript file that is loaded by the framework.

Definition at line 30 of file Script.h.


Constructor & Destructor Documentation

Script::Script ( const std::string &  name  ) 

Constructor.

Parameters:
name Name of the script.

Definition at line 27 of file Script.cpp.

Script::~Script (  ) 

Deconstructor.

Definition at line 41 of file Script.cpp.


Member Function Documentation

bool Script::executeFunctionByName ( const std::string &  name,
const std::string &  args = "" 
)

Executes the function with the given name and with the given arguments.

Returns:
True on success, false on failure.

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

Gets the ID of this script.

Definition at line 76 of file Script.cpp.

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

Gets the name of this script.

Definition at line 82 of file Script.cpp.

bool Script::loadScript ( const std::string &  fileName  ) 

Loads a script file and builds it.

Parameters:
fileName Filename of the file from where the script should be retrieved.
Returns:
True on successful loading, else false on failure.

Definition at line 100 of file Script.cpp.

void Script::refAdd (  ) 

Increases the reference counter.

Note:
For internal use only!

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.

Note:
For internal use only!

Definition at line 54 of file Script.cpp.

void Script::refRelease (  ) 

Decreases the reference counter.

Note:
For internal use only!

Definition at line 66 of file Script.cpp.

bool Script::unloadScript (  ) 

Unloads the loaded script.

Returns:
True on success, false on failure.

Definition at line 146 of file Script.cpp.


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

Generated on Wed Jun 10 22:26:26 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8