Luwra
Minimal-overhead Lua wrapper for C++
Static Public Member Functions | List of all members
luwra::Value< UserType > Struct Template Reference

Enables reading/pushing for an arbitrary type. More...

Static Public Member Functions

template<typename... Args>
static void push (State *state, Args &&... args)
 Identical to construct<UserType>. More...
 
static UserType & read (State *state, int index)
 Get a reference to a user type value on the stack. More...
 

Detailed Description

template<typename UserType>
struct luwra::Value< UserType >

Enables reading/pushing for an arbitrary type.

Member Function Documentation

§ push()

template<typename UserType>
template<typename... Args>
static void luwra::Value< UserType >::push ( State state,
Args &&...  args 
)
inlinestatic

Identical to construct<UserType>.

§ read()

template<typename UserType>
static UserType& luwra::Value< UserType >::read ( State state,
int  index 
)
inlinestatic

Get a reference to a user type value on the stack.

Parameters
stateLua state
indexIndex of the value on the stack
Returns
A reference to the user type value