#include <CEventLoop.h>
Inheritance diagram for CEventLoop:
Public Member Functions | |
CEventLoop () | |
virtual | ~CEventLoop () |
Static Public Member Functions | |
CEventLoop * | getInstance () |
Private Member Functions | |
virtual int | operator() (int argc, char **argv)=0 |
Singleton instance. | |
CEventLoop (const CEventLoop &aCEventLoop) | |
CEventLoop & | operator= (const CEventLoop &aCEventLoop) |
Not Implemented. | |
int | operator== (const CEventLoop &aCEventLoop) const |
Not Implemented. | |
Static Private Attributes | |
CEventLoop * | m_pTheInstance = (CEventLoop*)NULL |
Attempting to instantiate more than one instance of an event loop derived object results in a CDuplicateSingelton exception. Event loop derived processes implement operator() to initiate an event loop how they are used depends on the iindividual framework. Each of these event loops is supposed to ensure that event dispatching to application level code is synchronized through the application's mutex. It is legal to synchronize all such events or an "appropriate subset".
Definition at line 321 of file CEventLoop.h.
|
The Constructs an event loop. Since event loops are singletons, this function throws a CDuplicateSingleton if the m_pTheInstance variable is not null. If the variable is null, it is filled in with this. Definition at line 329 of file CEventLoop.cpp. References m_pTheInstance. |
|
The destructor sets the m_pTheInstance back to null. The assumption is that if derived classes catch the CDuplicateSingelton in their constructors, they will re-throw it. Since such objects would be not fully constructed, they would not be destroyed and hence the instance pointer would not get spuriously deleted.
Definition at line 354 of file CEventLoop.cpp. References m_pTheInstance. |
|
Copy construction, assignment and comparison are not allowed. therefore they are declared as private and not implemented. |
|
Retrieves the instance pointer. If the instance variable is null, throws CNoSuchObject. Definition at line 371 of file CEventLoop.cpp. Referenced by CTCLInterpreterStartup::Tcl_Init(), and CTKInterpreterStartup::Tk_Init(). |
|
Singleton instance. Implemented by subclasses to provide the actual event loop functionality. int argc, char** argv provide a mechanism for passing parameters to the event loop thread as if it was run from a main program. Implemented in CInterpreterStartup, CTCLInterpreterStartup, CTKInterpreterStartup, and CXtEventLoop. |
|
Not Implemented.
|
|
Not Implemented.
|
|
CEventLoop* m_pTheInstance Contains a pointer to the single event loop instance allowed. If there are no instances of the singleton, this pointer is null. Note that GetInstance will not attempt to create a new instance since it does not know which element of the class hierarchy to create. Definition at line 321 of file CEventLoop.cpp. Referenced by CEventLoop(), and ~CEventLoop(). |