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 1037 of file LuaState.h.

Member Typedef Documentation

Definition at line 1050 of file LuaState.h.

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

Definition at line 1051 of file LuaState.h.

Member Function Documentation

void cLuaStateTracker::Add ( cLuaState a_LuaState)
static

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

Definition at line 126 of file LuaState.cpp.

void cLuaStateTracker::Del ( cLuaState a_LuaState)
static

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

Definition at line 137 of file LuaState.cpp.

cLuaStateTracker & cLuaStateTracker::Get ( void  )
staticprotected

Returns the single instance of this class.

Definition at line 184 of file LuaState.cpp.

AString cLuaStateTracker::GetStats ( void  )
static

Returns the statistics for all the registered LuaStates.

Definition at line 157 of file LuaState.cpp.

Member Data Documentation

cCriticalSection cLuaStateTracker::m_CSLuaStates
protected

Protects m_LuaStates against multithreaded access.

Definition at line 1058 of file LuaState.h.

cLuaStatePtrs cLuaStateTracker::m_LuaStates
protected

The internal list of LuaStates.

Protected against multithreaded access by m_CSLuaStates.

Definition at line 1055 of file LuaState.h.


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