Cuberite
A lightweight, fast and extensible game server for Minecraft
Static Public Member Functions | Protected Types | Static Protected Member Functions | Protected Attributes | List of all members
cLuaStateTracker Class Reference

Keeps track of all create cLuaState instances. More...

#include <LuaState.h>

Collaboration diagram for cLuaStateTracker:
Collaboration graph
[legend]

Static Public Member Functions

static void Add (cLuaState &a_LuaState)
 Adds the specified Lua state to the internal list of LuaStates. More...
 
static void Del (cLuaState &a_LuaState)
 Deletes the specified Lua state from the internal list of LuaStates. More...
 
static AString GetStats (void)
 Returns the statistics for all the registered LuaStates. More...
 

Protected Types

typedef cLuaStatecLuaStatePtr
 
typedef std::vector< cLuaStatePtrcLuaStatePtrs
 

Static Protected Member Functions

static cLuaStateTrackerGet (void)
 Returns the single instance of this class. More...
 

Protected Attributes

cCriticalSection m_CSLuaStates
 Protects m_LuaStates against multithreaded access. More...
 
cLuaStatePtrs m_LuaStates
 The internal list of LuaStates. More...
 

Detailed Description

Keeps track of all create cLuaState instances.

Can query each for the amount of currently used memory.

Definition at line 1039 of file LuaState.h.

Member Typedef Documentation

◆ cLuaStatePtr

Definition at line 1052 of file LuaState.h.

◆ cLuaStatePtrs

typedef std::vector<cLuaStatePtr> cLuaStateTracker::cLuaStatePtrs
protected

Definition at line 1053 of file LuaState.h.

Member Function Documentation

◆ Add()

void cLuaStateTracker::Add ( cLuaState a_LuaState)
static

Adds the specified Lua state to the internal list of LuaStates.

Definition at line 123 of file LuaState.cpp.

◆ Del()

void cLuaStateTracker::Del ( cLuaState a_LuaState)
static

Deletes the specified Lua state from the internal list of LuaStates.

Definition at line 134 of file LuaState.cpp.

◆ Get()

cLuaStateTracker & cLuaStateTracker::Get ( void  )
staticprotected

Returns the single instance of this class.

Definition at line 181 of file LuaState.cpp.

◆ GetStats()

AString cLuaStateTracker::GetStats ( void  )
static

Returns the statistics for all the registered LuaStates.

Definition at line 154 of file LuaState.cpp.

Member Data Documentation

◆ m_CSLuaStates

cCriticalSection cLuaStateTracker::m_CSLuaStates
protected

Protects m_LuaStates against multithreaded access.

Definition at line 1060 of file LuaState.h.

◆ m_LuaStates

cLuaStatePtrs cLuaStateTracker::m_LuaStates
protected

The internal list of LuaStates.

Protected against multithreaded access by m_CSLuaStates.

Definition at line 1057 of file LuaState.h.


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