Script Class Reference

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

Inheritance diagram for Script:

Inheritance graph
[legend]
Collaboration diagram for Script:

Collaboration graph
[legend]

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 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 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 34 of file Script.h.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
name Name of the script.

Definition at line 30 of file Script.cpp.

Script::~Script (  ) 

Deconstructor.

Definition at line 44 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 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

Gets the ID of this script.

Definition at line 57 of file Script.cpp.

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

Gets the name of this script.

Definition at line 63 of file Script.cpp.

bool Script::loadScript ( IReadFile *  file  ) 

Loads a script file and builds it.

Parameters:
file Pointer to the IReadFile that will be used.
Returns:
True on successful loading, else false on failure.

Definition at line 127 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 81 of file Script.cpp.

void Script::refAdd (  ) 

Increases the reference counter.

Note:
For internal use only!

static Script* Script::refFactory ( const std::string &  name  )  [static]

Will be used to instanciate objects of this class.

Note:
For internal use only!

void Script::refRelease (  ) 

Decreases the reference counter.

Note:
For internal use only!

bool Script::unloadScript (  ) 

Unloads the loaded script.

Returns:
True on success, false on failure.

Definition at line 169 of file Script.cpp.


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

Generated on Fri Aug 21 23:55:16 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8