#include <sqratConst.h>
Public Member Functions | |
Enumeration (HSQUIRRELVM v=DefaultVM::Get(), bool createTable=true) | |
virtual Enumeration & | Const (const SQChar *name, const int val) |
virtual Enumeration & | Const (const SQChar *name, const float val) |
virtual Enumeration & | Const (const SQChar *name, const SQChar *val) |
![]() | |
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 |
Facilitates exposing a C++ enumeration to Squirrel
|
inline |
Constructs the Enumeration object
An Enumeration object doesnt do anything on its own. It must be told what constant values it contains. This is done using Enumeration::Const. Then the Enumeration must be exposed to Squirrel. This is done by calling ConstTable::Enum with the Enumeration.
v | Squirrel virtual machine to create the Enumeration for |
createTable | Whether the underlying table that values are bound to is created by the constructor |
|
inlinevirtual |
Binds an enumeration value
name | Name of the value as it will appear in Squirrel |
val | Value to bind |
Reimplemented in Sqrat::ConstTable.
|
inlinevirtual |
Binds an enumeration value
name | Name of the value as it will appear in Squirrel |
val | Value to bind |
Reimplemented in Sqrat::ConstTable.
|
inlinevirtual |
Binds an enumeration value
name | Name of the value as it will appear in Squirrel |
val | Value to bind |
Reimplemented in Sqrat::ConstTable.