Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

CApplicationSerializer Class Reference

#include <CApplicationSerializer.h>

Inheritance diagram for CApplicationSerializer:

CThreadRecursiveMutex List of all members.

Static Public Member Functions

CApplicationSerializergetInstance ()

Private Member Functions

 CApplicationSerializer ()
 ~CApplicationSerializer ()

Static Private Attributes

CApplicationSerializerm_pTheInstance = (CApplicationSerializer*)NULL
 the only allowed instance

Detailed Description

Provides a singleton mutex to serialize threads within an application. The idea is that threads will typically be waiting for something to happen (an event), once the thread becomes unblocked and begins to perform application specific code, it will lock the synchronization mutex. This effectively hides the threaded nature of the application from the programmer.

Definition at line 304 of file CApplicationSerializer.h.


Constructor & Destructor Documentation

CApplicationSerializer::CApplicationSerializer  )  [private]
 

The constructor of CApplicationSerializer is private. Only one object will come into existence, and that as a result of the first getInstance call in the application. All we do is call the base class constructor and set m_pTheInstance to this.

Definition at line 302 of file CApplicationSerializer.cpp.

References m_pTheInstance, and NULL.

CApplicationSerializer::~CApplicationSerializer  )  [private]
 

The destructor simply nulls m_pTheInstance. In theory it will never get called.

Definition at line 313 of file CApplicationSerializer.cpp.

References m_pTheInstance.


Member Function Documentation

CApplicationSerializer * CApplicationSerializer::getInstance  )  [static]
 

getInstance returns an assured non-null pointer to the singleton application serialization mutex:

Definition at line 322 of file CApplicationSerializer.cpp.

References m_pTheInstance.

Referenced by CSocket::Connect(), CDAQTCLProcessor::DeleteRelay(), CEvent::Enable(), CDAQTCLProcessor::EvalRelay(), CFileEvent::Exit(), CTCPConnectionLost::Host(), CEvent::OnEvent(), CSocket::OpenSocket(), CXtEventLoop::operator()(), CTCPConnectionLost::Port(), CBufferEvent< T >::ProcessAddQueue(), CBufferEvent< T >::ProcessDelQueue(), CServerConnectionEvent::Protocol(), and CBufferEvent< U >::STD().


Member Data Documentation

CApplicationSerializer * CApplicationSerializer::m_pTheInstance = (CApplicationSerializer*)NULL [static, private]
 

the only allowed instance

Definition at line 294 of file CApplicationSerializer.cpp.

Referenced by CApplicationSerializer(), getInstance(), and ~CApplicationSerializer().


The documentation for this class was generated from the following files:
Generated on Thu Jan 6 16:58:43 2005 for Spectrodaq External Event Framework by  doxygen 1.3.9.1