EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | List of all members
ESemaphoreData Class Reference

Contains the data associated with a public or private semaphore. More...

#include <esynch.h>

Public Member Functions

 ESemaphoreData ()
 Default constructor. More...
 
 ESemaphoreData (Long initcnt, Bool shared)
 Class constructor. More...
 
 ~ESemaphoreData ()
 Class destructor. More...
 
Void init ()
 Initializes the semaphore data. More...
 
Void destroy ()
 Destroys the semaphore data. More...
 
Bool Decrement (Bool wait=True)
 Decrements the semaphore. More...
 
Bool Increment ()
 Increments teh semaphore. More...
 
Bool initialized ()
 Retrieves the initialization status. More...
 
Bool & shared ()
 Retrieves a reference indicating if this is a shared semaphore (public). More...
 
Long & initialCount ()
 Retrieves the initial count of the semaphore. More...
 
Long currCount ()
 Retrieves the current semaphore count. More...
 

Detailed Description

Contains the data associated with a public or private semaphore.

Constructor & Destructor Documentation

◆ ESemaphoreData() [1/2]

ESemaphoreData::ESemaphoreData ( )
inline

Default constructor.

◆ ESemaphoreData() [2/2]

ESemaphoreData::ESemaphoreData ( Long  initcnt,
Bool  shared 
)
inline

Class constructor.

Parameters
initcnt
shared

◆ ~ESemaphoreData()

ESemaphoreData::~ESemaphoreData ( )
inline

Class destructor.

Member Function Documentation

◆ currCount()

Long ESemaphoreData::currCount ( )
inline

Retrieves the current semaphore count.

Returns
the current semaphore count.

◆ Decrement()

Bool ESemaphoreData::Decrement ( Bool  wait = True)

Decrements the semaphore.

Parameters
waitif True, this method will block until the semaphore can be decremented (when the current value is less than or equal to zeor).
Returns
True if the semaphore was successfully decremented, otherwise False.

◆ destroy()

Void ESemaphoreData::destroy ( )

Destroys the semaphore data.

◆ Increment()

Bool ESemaphoreData::Increment ( )

Increments teh semaphore.

Returns
True indicates that the semaphore was successfully incremented, otherwise False.

◆ init()

Void ESemaphoreData::init ( )

Initializes the semaphore data.

◆ initialCount()

Long& ESemaphoreData::initialCount ( )
inline

Retrieves the initial count of the semaphore.

Returns
Reference to the initial count value.

◆ initialized()

Bool ESemaphoreData::initialized ( )
inline

Retrieves the initialization status.

Returns
True indicates the semahpore data has been initialized, otherwise False.

◆ shared()

Bool& ESemaphoreData::shared ( )
inline

Retrieves a reference indicating if this is a shared semaphore (public).

Returns
Reference to shared indicator.

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