![]() |
VR-Forces Developer's Guide
|
The main event queue should live in the main application thread and is used to communicate events to other threads. Events are typically generated by event_signal instances.

Public Member Functions | |
| DtMainEventQueue () | |
| virtual | ~DtMainEventQueue () |
| virtual void | postEvent (const Event &signal) |
| virtual void | processEvents () |
| DtAsynchronousEventQueue * | createAsynchronousEventQueue () |
| bool | destroyAsynchronousEventQueue (DtAsynchronousEventQueue *secondary) |
Public Member Functions inherited from makVrv::DtEventQueueInterface | |
| virtual | ~DtEventQueueInterface () |
| DtVirtualBaseClass * | findInstance (const std::string &className) |
| void | registerInstance (const std::string &className, DtVirtualBaseClass *instance) |
| void | executeEvents (const SharedEventList &signalList) |
Protected Types | |
| typedef std::vector < DtAsynchronousEventQueue * > | ThreadQueueList |
Protected Types inherited from makVrv::DtEventQueueInterface | |
| typedef std::map< std::string, DtVirtualBaseClass * > | InstanceMap |
Protected Member Functions | |
| void | distributeEvents () |
Protected Member Functions inherited from makVrv::DtEventQueueInterface | |
| DtEventQueueInterface () | |
Protected Attributes | |
| ThreadQueueList | mySecondaryQueues |
| SharedEventList | myEventsToDistribute |
Protected Attributes inherited from makVrv::DtEventQueueInterface | |
| InstanceMap | myInstanceMap |
Additional Inherited Members | |
Public Types inherited from makVrv::DtEventQueueInterface | |
| typedef boost::function< void(DtEventQueueInterface *) > | Event |
| typedef std::vector< Event > | EventList |
| typedef std::shared_ptr < EventList > | SharedEventList |
|
protected |
| makVrv::DtMainEventQueue::DtMainEventQueue | ( | ) |
CTOR, typically there should only be one instance per main thread.
|
virtual |
DTOR.
|
virtual |
Add an event to the queue. The main event queue will pass these events to any asynchronous event queues, or simply delete them.
Implements makVrv::DtEventQueueInterface.
|
virtual |
Should be called regularly (typically once per tick in main thread)
Implements makVrv::DtEventQueueInterface.
| DtAsynchronousEventQueue* makVrv::DtMainEventQueue::createAsynchronousEventQueue | ( | ) |
be called in main thread, will start queuing all signals generated after this point, the pointer is designed to be passed to a secondary thread.
| bool makVrv::DtMainEventQueue::destroyAsynchronousEventQueue | ( | DtAsynchronousEventQueue * | secondary | ) |
be called in main thread, typically after the secondary thread has stopped.
|
protected |
Distribute all added events to the secondary queues. This is called by processEvents.
|
protected |
|
protected |