Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cCSLock Class Reference

RAII for cCriticalSection - locks the CS on creation, unlocks on destruction. More...

#include <CriticalSection.h>

Inheritance diagram for cCSLock:
Inheritance graph
[legend]
Collaboration diagram for cCSLock:
Collaboration graph
[legend]

Public Member Functions

 cCSLock (cCriticalSection &a_CS)
 
 cCSLock (cCriticalSection *a_CS)
 
void Lock (void)
 
void Unlock (void)
 
 ~cCSLock ()
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (cCSLock)
 

Private Attributes

cCriticalSectionm_CS
 
bool m_IsLocked
 

Detailed Description

RAII for cCriticalSection - locks the CS on creation, unlocks on destruction.

Definition at line 52 of file CriticalSection.h.

Constructor & Destructor Documentation

◆ cCSLock() [1/2]

cCSLock::cCSLock ( cCriticalSection a_CS)

Definition at line 66 of file CriticalSection.cpp.

◆ cCSLock() [2/2]

cCSLock::cCSLock ( cCriticalSection a_CS)

Definition at line 77 of file CriticalSection.cpp.

◆ ~cCSLock()

cCSLock::~cCSLock ( )

Definition at line 88 of file CriticalSection.cpp.

Member Function Documentation

◆ DISALLOW_COPY_AND_ASSIGN()

cCSLock::DISALLOW_COPY_AND_ASSIGN ( cCSLock  )
private

◆ Lock()

void cCSLock::Lock ( void  )

Definition at line 101 of file CriticalSection.cpp.

◆ Unlock()

void cCSLock::Unlock ( void  )

Definition at line 112 of file CriticalSection.cpp.

Member Data Documentation

◆ m_CS

cCriticalSection* cCSLock::m_CS
private

Definition at line 54 of file CriticalSection.h.

◆ m_IsLocked

bool cCSLock::m_IsLocked
private

Definition at line 59 of file CriticalSection.h.


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