LPCGame
A Simple 2d Game Engine
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
LuaC::LuaParam Class Referenceabstract

#include <luacparam.h>

Inherited by LuaC::LuaPrimitiveParam< T >, and LuaC::LuaUdataParam< T >.

Public Member Functions

virtual void Push (lua_State *l)=0
 
virtual void Push (lua_State *l, std::string name)=0
 

Detailed Description

A class for packing together an object and the appropriate function for pushing it onto the Lua state into a convenient tuple so we can easily do variadic templates for calling from C++ -> Lua with desired arguments We use the child classes LuaUdataParam and LuaPrimitiveParam to actually set it and use this is an abstract base class

Member Function Documentation

virtual void LuaC::LuaParam::Push ( lua_State *  l)
pure virtual

Push the parameter value on to a Lua state using the pusher function

Parameters
lThe Lua state to push the object onto

Implemented in LuaC::LuaUdataParam< T >, and LuaC::LuaPrimitiveParam< T >.

virtual void LuaC::LuaParam::Push ( lua_State *  l,
std::string  name 
)
pure virtual

Push the parameter onto a Lua state as a global variable with some name

Parameters
lLua state to push onto
nameGlobal name to be given to the object

Implemented in LuaC::LuaUdataParam< T >, and LuaC::LuaPrimitiveParam< T >.


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