LPCGame
A Simple 2d Game Engine
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
LuaC::LuaPrimitiveParam< T > Class Template Reference

Inherits LuaC::LuaParam.

Public Member Functions

 LuaPrimitiveParam (T obj)
 
void Push (lua_State *l) override
 
void Push (lua_State *l, std::string name) override
 

Static Public Member Functions

static T Retrieve (lua_State *l)
 

Constructor & Destructor Documentation

template<class T >
LuaC::LuaPrimitiveParam< T >::LuaPrimitiveParam ( obj)
inline

Construct the parameter, giving it the value it will be pushing onto the state

Parameters
objThe object to be pushed into the state

Member Function Documentation

template<class T >
void LuaC::LuaPrimitiveParam< T >::Push ( lua_State *  l)
inlineoverridevirtual

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

Parameters
lThe Lua state to push the object onto

Implements LuaC::LuaParam.

template<class T >
void LuaC::LuaPrimitiveParam< T >::Push ( lua_State *  l,
std::string  name 
)
inlineoverridevirtual

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

Implements LuaC::LuaParam.

template<class T >
static T LuaC::LuaPrimitiveParam< T >::Retrieve ( lua_State *  l)
inlinestatic

Get the Lua Param from the top of the Lua Stack Used for retrieving the return value of a Lua function call

Parameters
lLua state to get result from

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