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

A callable Lua value without a return value. More...

Public Member Functions

 Function (const Reference &ref)
 Create from reference. More...
 
 Function (State *state, int index)
 Create from callable on the stack. More...
 
template<typename OtherRet >
 Function (const Function< OtherRet > &other)
 Convert from an existing Function. More...
 
void operator() () const
 Invoke the callable without arguments. More...
 
template<typename... Args>
void operator() (Args &&... args) const
 Invoke the callable with arguments. More...
 

Public Attributes

Reference ref
 Internal reference to the Lua value. More...
 

Detailed Description

template<>
struct luwra::Function< void >

A callable Lua value without a return value.

Constructor & Destructor Documentation

§ Function() [1/3]

luwra::Function< void >::Function ( const Reference ref)
inline

Create from reference.

§ Function() [2/3]

luwra::Function< void >::Function ( State state,
int  index 
)
inline

Create from callable on the stack.

§ Function() [3/3]

template<typename OtherRet >
luwra::Function< void >::Function ( const Function< OtherRet > &  other)
inline

Convert from an existing Function.

Member Function Documentation

§ operator()() [1/2]

void luwra::Function< void >::operator() ( ) const
inline

Invoke the callable without arguments.

§ operator()() [2/2]

template<typename... Args>
void luwra::Function< void >::operator() ( Args &&...  args) const
inline

Invoke the callable with arguments.

Member Data Documentation

§ ref

Reference luwra::Function< void >::ref

Internal reference to the Lua value.