Helper class for managing Squirrel scripts. More...
#include <sqratScript.h>
Public Member Functions | |
Script (HSQUIRRELVM v=DefaultVM::Get()) | |
void | CompileString (const string &script, const string &name=_SC("")) |
bool | CompileString (const string &script, string &errMsg, const string &name=_SC("")) |
void | CompileFile (const string &path) |
bool | CompileFile (const string &path, string &errMsg) |
void | Run () |
bool | Run (string &errMsg) |
void | WriteCompiledFile (const string &path) |
Public Member Functions inherited from Sqrat::Object | |
Object () | |
Object (const Object &so) | |
Object (HSQOBJECT o, HSQUIRRELVM v=DefaultVM::Get()) | |
template<class T > | |
Object (T *instance, HSQUIRRELVM v=DefaultVM::Get()) | |
virtual | ~Object () |
Object & | operator= (const Object &so) |
HSQUIRRELVM & | GetVM () |
HSQUIRRELVM | GetVM () const |
SQObjectType | GetType () const |
bool | IsNull () const |
virtual HSQOBJECT | GetObject () const |
virtual HSQOBJECT & | GetObject () |
operator HSQOBJECT & () | |
void | Release () |
Object | GetSlot (const SQChar *slot) const |
Object | GetSlot (SQInteger index) const |
template<class T > | |
T | Cast () const |
template<class T > | |
Object | operator[] (T slot) |
SQInteger | GetSize () const |
bool | Next (iterator &iter) const |
Helper class for managing Squirrel scripts.
|
inline |
Default constructor
v | VM that the Script will be associated with |
|
inline |
|
inline |
Sets up the Script using a file containing a Squirrel script
path | File path containing a Squirrel script |
errMsg | String that is filled with any errors that may occur |
|
inline |
|
inline |
Sets up the Script using a string containing a Squirrel script
script | String containing a Squirrel script |
errMsg | String that is filled with any errors that may occur |
sizeof(SQChar)
|
inline |
Runs the script
|
inline |
Runs the script
errMsg | String that is filled with any errors that may occur |
|
inline |
Writes the byte code of the Script to a file
path | File path to write to |