Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Attributes | List of all members
cLuaState::cOptionalParam< T > Class Template Reference

Represents a parameter that is optional - calling a GetStackValue() with this object will not fail if the value on the Lua stack is nil. More...

#include <LuaState.h>

Public Member Functions

 cOptionalParam (T &a_Dest)
 
T & GetDest (void)
 

Protected Attributes

T & m_Dest
 

Detailed Description

template<typename T>
class cLuaState::cOptionalParam< T >

Represents a parameter that is optional - calling a GetStackValue() with this object will not fail if the value on the Lua stack is nil.

Note that the GetStackValue() will still fail if the param is present but of a different type. The class itself is just a marker so that the template magic will select the correct GetStackValue() overload.

Definition at line 426 of file LuaState.h.

Constructor & Destructor Documentation

◆ cOptionalParam()

template<typename T >
cLuaState::cOptionalParam< T >::cOptionalParam ( T &  a_Dest)
inlineexplicit

Definition at line 429 of file LuaState.h.

Member Function Documentation

◆ GetDest()

template<typename T >
T& cLuaState::cOptionalParam< T >::GetDest ( void  )
inline

Definition at line 434 of file LuaState.h.

Member Data Documentation

◆ m_Dest

template<typename T >
T& cLuaState::cOptionalParam< T >::m_Dest
protected

Definition at line 437 of file LuaState.h.


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