Lua_icxx  1.02 (Aug 2011)
LuaTableRef::Field< KeyType > Class Template Reference

Represent a field of a Lua Table reference. More...

#include <LuaTableRef.h>

Collaboration diagram for LuaTableRef::Field< KeyType >:

List of all members.

Public Member Functions

 Field (LuaTableRef &table, const KeyType &key)
 Represent table[key].
template<typename ValType >
void operator= (const ValType &obj)
 Set value for this field to given obj.
void operator= (const Field &rhs)
 Set value for this field to other field (any table)
 operator LuaTempResult () const
 get table field value
template<typename TT >
 operator TT () const
 Convert item to a value such as int, float, etc.
template<typename ValType >
bool operator== (const ValType &obj) const
 is this field value equal to given object
bool isNil () const
 is this field value Lua nil
void pushObj () const
 Push the field value onto the Lua stack.

Detailed Description

template<typename KeyType>
class LuaTableRef::Field< KeyType >

Represent a field of a Lua Table reference.

This allows getting and setting field values. The LuaTableRef for which fields are required must outlive the Field instance. Same goes for the key used.

Definition at line 104 of file LuaTableRef.h.