GlobalObjects
Loading...
Searching...
No Matches
EuGlobalPCriticalSection Class Reference

This class is a global Critical Section and is designed as a Singelton Class. More...

#include <EuGlobalPCriticalSection.h>

Inheritance diagram for EuGlobalPCriticalSection:

Static Public Member Functions

static EuGlobalPCriticalSectioncreate ()
 
static int destroy ()
 

Protected Member Functions

 EuGlobalPCriticalSection ()
 
virtual ~EuGlobalPCriticalSection ()
 

Private Member Functions

 EuGlobalPCriticalSection (const EuGlobalPCriticalSection &)
 
EuGlobalPCriticalSectionoperator= (const EuGlobalPCriticalSection &)
 

Static Private Attributes

static EuGlobalPCriticalSectionm_pInstanz
 
static int ms_iReferenceCounter
 

Additional Inherited Members

- Public Member Functions inherited from EuPCriticalSection
 EuPCriticalSection ()
 
 EuPCriticalSection (const EuPCriticalSection &rT)
 
virtual ~EuPCriticalSection ()
 
pthread_mutex_t & getMutex ()
 
bool isLocked () const
 
int lock ()
 
EuPCriticalSectionoperator= (const EuPCriticalSection &rT)
 
int unlock ()
 

Detailed Description

This class is a global Critical Section and is designed as a Singelton Class.

Note
Based on 32 bit POSIX threads.
Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ EuGlobalPCriticalSection() [1/2]

EuGlobalPCriticalSection::EuGlobalPCriticalSection ( )
protected

The constructor cannot be called.

◆ ~EuGlobalPCriticalSection()

virtual EuGlobalPCriticalSection::~EuGlobalPCriticalSection ( )
protectedvirtual

The destructor cannot be called.

◆ EuGlobalPCriticalSection() [2/2]

EuGlobalPCriticalSection::EuGlobalPCriticalSection ( const EuGlobalPCriticalSection & )
private

The copy constructor is not available.

Member Function Documentation

◆ create()

static EuGlobalPCriticalSection * EuGlobalPCriticalSection::create ( )
static

Instantiation function that instantiates the object only once.

Returns
The pointer to the only instance of EuGlobalPCriticalSection is returned.

◆ destroy()

static int EuGlobalPCriticalSection::destroy ( )
static

If there is still at least one reference to the instance of EuGlobalPCriticalSection, it will not be destroyed.

Returns
Return is the number of references to this instance.

◆ operator=()

EuGlobalPCriticalSection & EuGlobalPCriticalSection::operator= ( const EuGlobalPCriticalSection & )
private

The assignment operator is not available.

Member Data Documentation

◆ m_pInstanz

EuGlobalPCriticalSection* EuGlobalPCriticalSection::m_pInstanz
staticprivate

The only instance of this Singelton Class.

◆ ms_iReferenceCounter

int EuGlobalPCriticalSection::ms_iReferenceCounter
staticprivate

With each call to create() the reference counter is counted up and with each destroy() it is counted down again.


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