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

A RAII class for values pushed onto the Lua stack. More...

#include <LuaState.h>

Public Member Functions

 cStackValue (cLuaState &a_LuaState)
 
 cStackValue (cStackValue &&a_Src)
 
 cStackValue (void)
 
bool IsValid (void) const
 
void Set (cLuaState &a_LuaState)
 
 ~cStackValue () noexcept(false)
 

Protected Member Functions

 cStackValue (const cStackValue &)=delete
 

Protected Attributes

lua_State * m_LuaState
 
int m_StackLen
 Used for debugging, Lua state's stack size is checked against this number to make sure it is the same as when the value was pushed. More...
 

Detailed Description

A RAII class for values pushed onto the Lua stack.

Will pop the value off the stack in the destructor.

Definition at line 457 of file LuaState.h.

Constructor & Destructor Documentation

◆ cStackValue() [1/4]

cLuaState::cStackValue::cStackValue ( void  )
inline

Definition at line 460 of file LuaState.h.

◆ cStackValue() [2/4]

cLuaState::cStackValue::cStackValue ( cLuaState a_LuaState)
inline

Definition at line 465 of file LuaState.h.

◆ cStackValue() [3/4]

cLuaState::cStackValue::cStackValue ( cStackValue &&  a_Src)
inline

Definition at line 471 of file LuaState.h.

◆ ~cStackValue()

cLuaState::cStackValue::~cStackValue ( )
inlinenoexcept

Definition at line 479 of file LuaState.h.

◆ cStackValue() [4/4]

cLuaState::cStackValue::cStackValue ( const cStackValue )
protecteddelete

Member Function Documentation

◆ IsValid()

bool cLuaState::cStackValue::IsValid ( void  ) const
inline

Definition at line 494 of file LuaState.h.

◆ Set()

void cLuaState::cStackValue::Set ( cLuaState a_LuaState)
inline

Definition at line 488 of file LuaState.h.

Member Data Documentation

◆ m_LuaState

lua_State* cLuaState::cStackValue::m_LuaState
protected

Definition at line 500 of file LuaState.h.

◆ m_StackLen

int cLuaState::cStackValue::m_StackLen
protected

Used for debugging, Lua state's stack size is checked against this number to make sure it is the same as when the value was pushed.

Definition at line 504 of file LuaState.h.


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