sqrat  0.9
sqrat
 All Classes Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
Sqrat::ConstTable Class Reference

#include <sqratConst.h>

Inheritance diagram for Sqrat::ConstTable:
Sqrat::Enumeration Sqrat::Object

Public Member Functions

 ConstTable (HSQUIRRELVM v=DefaultVM::Get())
 
virtual ConstTableConst (const SQChar *name, const int val)
 
virtual ConstTableConst (const SQChar *name, const float val)
 
virtual ConstTableConst (const SQChar *name, const SQChar *val)
 
ConstTableEnum (const SQChar *name, Enumeration &en)
 
- Public Member Functions inherited from Sqrat::Enumeration
 Enumeration (HSQUIRRELVM v=DefaultVM::Get(), bool createTable=true)
 
- 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 ()
 
Objectoperator= (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 >
Cast () const
 
template<class T >
Object operator[] (T slot)
 
SQInteger GetSize () const
 
bool Next (iterator &iter) const
 

Detailed Description

Facilitates exposing a C++ constant to Squirrel

Remarks
The ConstTable class only facilitates binding C++ constants that are integers, floats, and strings because the Squirrel constant table can only contain these types of values. Other types of constants can be bound using Class::SetStaticValue instead.

Constructor & Destructor Documentation

Sqrat::ConstTable::ConstTable ( HSQUIRRELVM  v = DefaultVM::Get())
inline

Constructs a ConstTable object to represent the given VM's const table

Parameters
vVM to get the ConstTable for

Member Function Documentation

virtual ConstTable& Sqrat::ConstTable::Const ( const SQChar *  name,
const int  val 
)
inlinevirtual

Binds a constant value

Parameters
nameName of the value as it will appear in Squirrel
valValue to bind
Returns
The ConstTable itself so the call can be chained

Reimplemented from Sqrat::Enumeration.

virtual ConstTable& Sqrat::ConstTable::Const ( const SQChar *  name,
const float  val 
)
inlinevirtual

Binds a constant value

Parameters
nameName of the value as it will appear in Squirrel
valValue to bind
Returns
The ConstTable itself so the call can be chained

Reimplemented from Sqrat::Enumeration.

virtual ConstTable& Sqrat::ConstTable::Const ( const SQChar *  name,
const SQChar *  val 
)
inlinevirtual

Binds a constant value

Parameters
nameName of the value as it will appear in Squirrel
valValue to bind
Returns
The ConstTable itself so the call can be chained

Reimplemented from Sqrat::Enumeration.

ConstTable& Sqrat::ConstTable::Enum ( const SQChar *  name,
Enumeration en 
)
inline

Binds an Enumeration to the ConstTable

Parameters
nameName of the enumeration as it will appear in Squirrel
enEnumeration to bind
Returns
The ConstTable itself so the call can be chained

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