#include <sqratClass.h>
Public Member Functions | |
| Class (HSQUIRRELVM v=DefaultVM::Get(), const string &className=string(), bool createClass=true) | |
| virtual HSQOBJECT | GetObject () const |
| virtual HSQOBJECT & | GetObject () |
| template<class V > | |
| Class & | SetStaticValue (const SQChar *name, const V &val) |
| template<class V > | |
| Class & | SetValue (const SQChar *name, const V &val) |
| template<class V > | |
| Class & | Var (const SQChar *name, V C::*var) |
| template<class V > | |
| Class & | StaticVar (const SQChar *name, V *var) |
| template<class F1 , class F2 > | |
| Class & | Prop (const SQChar *name, F1 getMethod, F2 setMethod) |
| template<class F1 , class F2 > | |
| Class & | GlobalProp (const SQChar *name, F1 getMethod, F2 setMethod) |
| template<class F > | |
| Class & | Prop (const SQChar *name, F getMethod) |
| template<class F > | |
| Class & | GlobalProp (const SQChar *name, F getMethod) |
| template<class F > | |
| Class & | Func (const SQChar *name, F method) |
| template<class F > | |
| Class & | Overload (const SQChar *name, F method) |
| template<class F > | |
| Class & | GlobalFunc (const SQChar *name, F method) |
| template<class F > | |
| Class & | StaticFunc (const SQChar *name, F method) |
| template<class F > | |
| Class & | GlobalOverload (const SQChar *name, F method) |
| template<class F > | |
| Class & | StaticOverload (const SQChar *name, F method) |
| Class & | SquirrelFunc (const SQChar *name, SQFUNCTION func) |
| Function | GetFunction (const SQChar *name) |
| Class & | Ctor (const SQChar *name=0) |
| template<class A1 > | |
| Class & | Ctor (const SQChar *name=0) |
| template<class A1 , class A2 > | |
| Class & | Ctor (const SQChar *name=0) |
| template<class A1 , class A2 , class A3 > | |
| Class & | Ctor (const SQChar *name=0) |
| template<class A1 , class A2 , class A3 , class A4 > | |
| Class & | Ctor (const SQChar *name=0) |
| template<class A1 , class A2 , class A3 , class A4 , class A5 > | |
| Class & | Ctor (const SQChar *name=0) |
| template<class A1 , class A2 , class A3 , class A4 , class A5 , class A6 > | |
| Class & | Ctor (const SQChar *name=0) |
| template<class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 > | |
| Class & | Ctor (const SQChar *name=0) |
| template<class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 > | |
| Class & | Ctor (const SQChar *name=0) |
| template<class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 > | |
| Class & | Ctor (const SQChar *name=0) |
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 |
| 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 |
Facilitates exposing a C++ class with no base class to Squirrel
| C | Class type to expose |
| A | An allocator to use when instantiating and destroying class instances of this type in Squirrel |
|
inline |
Constructs the Class object
A Class object doesnt do anything on its own. It must be told what methods and variables it contains. This is done using Class methods such as Class::Func and Class::Var. Then the Class must be exposed to Squirrel. This is usually done by calling TableBase::Bind on a RootTable with the Class.
| v | Squirrel virtual machine to create the Class for |
| className | The name of the class (seen in error messages - uses an ugly one by default) |
| createClass | Should class type data be created? (almost always should be true) |
|
inline |
Binds a constructor with no arguments (there can only be one constructor of this many arguments for a given name)
| name | Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) |
|
inline |
Binds a constructor with 1 argument (there can only be one constructor of this many arguments for a given name)
| name | Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) |
| A1 | Type of argument 1 of the constructor (usually doesnt need to be defined explicitly) |
|
inline |
Binds a constructor with 2 arguments (there can only be one constructor of this many arguments for a given name)
| name | Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) |
| A1 | Type of argument 1 of the constructor (usually doesnt need to be defined explicitly) |
| A2 | Type of argument 2 of the constructor (usually doesnt need to be defined explicitly) |
|
inline |
Binds a constructor with 3 arguments (there can only be one constructor of this many arguments for a given name)
| name | Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) |
| A1 | Type of argument 1 of the constructor (usually doesnt need to be defined explicitly) |
| A2 | Type of argument 2 of the constructor (usually doesnt need to be defined explicitly) |
| A3 | Type of argument 3 of the constructor (usually doesnt need to be defined explicitly) |
|
inline |
Binds a constructor with 4 arguments (there can only be one constructor of this many arguments for a given name)
| name | Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) |
| A1 | Type of argument 1 of the constructor (usually doesnt need to be defined explicitly) |
| A2 | Type of argument 2 of the constructor (usually doesnt need to be defined explicitly) |
| A3 | Type of argument 3 of the constructor (usually doesnt need to be defined explicitly) |
| A4 | Type of argument 4 of the constructor (usually doesnt need to be defined explicitly) |
|
inline |
Binds a constructor with 5 arguments (there can only be one constructor of this many arguments for a given name)
| name | Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) |
| A1 | Type of argument 1 of the constructor (usually doesnt need to be defined explicitly) |
| A2 | Type of argument 2 of the constructor (usually doesnt need to be defined explicitly) |
| A3 | Type of argument 3 of the constructor (usually doesnt need to be defined explicitly) |
| A4 | Type of argument 4 of the constructor (usually doesnt need to be defined explicitly) |
| A5 | Type of argument 5 of the constructor (usually doesnt need to be defined explicitly) |
|
inline |
Binds a constructor with 6 arguments (there can only be one constructor of this many arguments for a given name)
| name | Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) |
| A1 | Type of argument 1 of the constructor (usually doesnt need to be defined explicitly) |
| A2 | Type of argument 2 of the constructor (usually doesnt need to be defined explicitly) |
| A3 | Type of argument 3 of the constructor (usually doesnt need to be defined explicitly) |
| A4 | Type of argument 4 of the constructor (usually doesnt need to be defined explicitly) |
| A5 | Type of argument 5 of the constructor (usually doesnt need to be defined explicitly) |
| A6 | Type of argument 6 of the constructor (usually doesnt need to be defined explicitly) |
|
inline |
Binds a constructor with 7 arguments (there can only be one constructor of this many arguments for a given name)
| name | Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) |
| A1 | Type of argument 1 of the constructor (usually doesnt need to be defined explicitly) |
| A2 | Type of argument 2 of the constructor (usually doesnt need to be defined explicitly) |
| A3 | Type of argument 3 of the constructor (usually doesnt need to be defined explicitly) |
| A4 | Type of argument 4 of the constructor (usually doesnt need to be defined explicitly) |
| A5 | Type of argument 5 of the constructor (usually doesnt need to be defined explicitly) |
| A6 | Type of argument 6 of the constructor (usually doesnt need to be defined explicitly) |
| A7 | Type of argument 7 of the constructor (usually doesnt need to be defined explicitly) |
|
inline |
Binds a constructor with 8 arguments (there can only be one constructor of this many arguments for a given name)
| name | Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) |
| A1 | Type of argument 1 of the constructor (usually doesnt need to be defined explicitly) |
| A2 | Type of argument 2 of the constructor (usually doesnt need to be defined explicitly) |
| A3 | Type of argument 3 of the constructor (usually doesnt need to be defined explicitly) |
| A4 | Type of argument 4 of the constructor (usually doesnt need to be defined explicitly) |
| A5 | Type of argument 5 of the constructor (usually doesnt need to be defined explicitly) |
| A6 | Type of argument 6 of the constructor (usually doesnt need to be defined explicitly) |
| A7 | Type of argument 7 of the constructor (usually doesnt need to be defined explicitly) |
| A8 | Type of argument 8 of the constructor (usually doesnt need to be defined explicitly) |
|
inline |
Binds a constructor with 9 arguments (there can only be one constructor of this many arguments for a given name)
| name | Name of the constructor as it will appear in Squirrel (default value creates a traditional constructor) |
| A1 | Type of argument 1 of the constructor (usually doesnt need to be defined explicitly) |
| A2 | Type of argument 2 of the constructor (usually doesnt need to be defined explicitly) |
| A3 | Type of argument 3 of the constructor (usually doesnt need to be defined explicitly) |
| A4 | Type of argument 4 of the constructor (usually doesnt need to be defined explicitly) |
| A5 | Type of argument 5 of the constructor (usually doesnt need to be defined explicitly) |
| A6 | Type of argument 6 of the constructor (usually doesnt need to be defined explicitly) |
| A7 | Type of argument 7 of the constructor (usually doesnt need to be defined explicitly) |
| A8 | Type of argument 8 of the constructor (usually doesnt need to be defined explicitly) |
| A9 | Type of argument 9 of the constructor (usually doesnt need to be defined explicitly) |
|
inline |
|
inline |
|
inlinevirtual |
Gets the Squirrel object for this Class (copy)
Reimplemented from Sqrat::Object.
|
inlinevirtual |
Gets the Squirrel object for this Class (reference)
Reimplemented from Sqrat::Object.
|
inline |
|
inline |
Binds a global function as a class function with overloading enabled
| name | Name of the function as it will appear in Squirrel |
| method | Function to bind |
| F | Type of function (usually doesnt need to be defined explicitly) |
|
inline |
Binds a class property (using global functions instead of member functions)
| name | Name of the variable as it will appear in Squirrel |
| getMethod | Getter for the variable |
| setMethod | Setter for the variable |
| F1 | Type of get function (usually doesnt need to be defined explicitly) |
| F2 | Type of set function (usually doesnt need to be defined explicitly) |
|
inline |
Binds a read-only class property (using a global function instead of a member function)
| name | Name of the variable as it will appear in Squirrel |
| getMethod | Getter for the variable |
| F | Type of get function (usually doesnt need to be defined explicitly) |
|
inline |
Binds a class function with overloading enabled
| name | Name of the function as it will appear in Squirrel |
| method | Function to bind |
| F | Type of function (usually doesnt need to be defined explicitly) |
|
inline |
Binds a class property
| name | Name of the variable as it will appear in Squirrel |
| getMethod | Getter for the variable |
| setMethod | Setter for the variable |
| F1 | Type of get function (usually doesnt need to be defined explicitly) |
| F2 | Type of set function (usually doesnt need to be defined explicitly) |
|
inline |
Binds a read-only class property
| name | Name of the variable as it will appear in Squirrel |
| getMethod | Getter for the variable |
| F | Type of get function (usually doesnt need to be defined explicitly) |
|
inline |
Assigns a static class slot a value
| name | Name of the static slot |
| val | Value to assign |
| V | Type of value (usually doesnt need to be defined explicitly) |
|
inline |
Assigns a class slot a value
| name | Name of the slot |
| val | Value to assign |
| V | Type of value (usually doesnt need to be defined explicitly) |
|
inline |
Binds a Squirrel function as defined by the Squirrel documentation as a class function
| name | Name of the function as it will appear in Squirrel |
| func | Function to bind |
|
inline |
|
inline |
Binds a static class function with overloading enabled
| name | Name of the function as it will appear in Squirrel |
| method | Function to bind |
| F | Type of function (usually doesnt need to be defined explicitly) |
|
inline |
Bind a class static variable
| name | Name of the variable as it will appear in Squirrel |
| var | Variable to bind |
| V | Type of variable (usually doesnt need to be defined explicitly) |
|
inline |
Binds a class variable
| name | Name of the variable as it will appear in Squirrel |
| var | Variable to bind |
| V | Type of variable (usually doesnt need to be defined explicitly) |
1.8.6