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

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

#include <function.hpp>

Public Member Functions

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

Public Attributes

Reference ref
 Internal reference to the Lua value.
 

Detailed Description

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.