Diluculum Namespace Reference

Everything in Diluculum is declared in this namespace. More...


Classes

class  LuaError
 A generic Lua-related error. More...
class  LuaRunTimeError
 A Lua run-time error. More...
class  LuaFileError
 A Lua file-related error. More...
class  LuaSyntaxError
 An error while interpreting a chunk of Lua code. More...
class  LuaMemoryError
 A memory error reported by Lua. More...
class  LuaErrorError
 An error while executing the Lua error handler. More...
class  LuaTypeError
 An error related to types when doing some Lua-related processing. More...
class  TypeMismatchError
class  LuaState
class  LuaUserData
class  LuaValue
class  LuaVariable

Namespaces

namespace  Impl
 Implementation details of Diluculum.

Typedefs

typedef std::vector< LuaValueLuaValueList
typedef std::map< LuaValue,
LuaValue
LuaValueMap

Functions

LuaValue ToLuaValue (lua_State *state, int index)
void PushLuaValue (lua_State *state, const LuaValue &value)

Variables

const LuaValue Nil
 A constant with the value of nil.
const LuaValueMap EmptyLuaValueMap
 A constant that is an empty LuaValueMap.
const LuaValue EmptyTable (EmptyLuaValueMap)
 A constant with value of an empty table.


Detailed Description

Everything in Diluculum is declared in this namespace.

Well, everything but the macros defined in Diluculum/LuaWrappers.hpp (because preprocessor macros don't know what are namespaces.)


Typedef Documentation

typedef std::vector<LuaValue> Diluculum::LuaValueList
 

A list of LuaValues. Used, for example, to represent the return value of a Lua function call. In this case, the first return value is stored at the 0th vector position, the second return value at the 1st vector position and so on.

Definition at line 36 of file Types.hpp.

typedef std::map<LuaValue, LuaValue> Diluculum::LuaValueMap
 

Type mapping from LuaValues to LuaValues. Think of it as a C++ approximation of a Lua table.

Definition at line 48 of file Types.hpp.


Function Documentation

void Diluculum::PushLuaValue lua_State *  state,
const LuaValue &  value
 

Calls the appropriate lua_push*() function, in order to push the value stored at value to the Lua stack.

Note:
If value holds a table, then any entry that happens to have Nil as key will be ignored.

LuaValue Diluculum::ToLuaValue lua_State *  state,
int  index
 

Converts and returns the element at index index on the stack to a LuaValue. This keeps the Lua stack untouched. Oh, yes, and it accepts both positive and negative indices, just like the standard functions on the Lua C API.

Exceptions:
LuaTypeError If the element at index cannot be converted to a LuaValue. This can happen if the value at that position is, for example, a "Lua Thread" that is not supported by LuaValue.


Variable Documentation

const LuaValueMap Diluculum::EmptyLuaValueMap
 

A constant that is an empty LuaValueMap.

Definition at line 286 of file LuaValue.hpp.

const LuaValue Diluculum::EmptyTable(EmptyLuaValueMap)
 

A constant with value of an empty table.

const LuaValue Diluculum::Nil
 

A constant with the value of nil.

Definition at line 283 of file LuaValue.hpp.


Generated on Tue Feb 6 09:30:26 2007 for Diluculum by  doxygen 1.4.6