VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtMainEventQueue Class Reference

The main event queue should live in the main application thread and is used to communicate events to other threads. More...

Inheritance diagram for makVrv::DtMainEventQueue:
Inheritance graph
[legend]

Public Member Functions

 DtMainEventQueue ()
 CTOR, typically there should only be one instance per main thread. More...
 
virtual ~DtMainEventQueue ()
 DTOR. More...
 
virtual void postEvent (const Event &signal)
 Add an event to the queue. More...
 
virtual void processEvents ()
 Should be called regularly (typically once per tick in main thread) More...
 
DtAsynchronousEventQueuecreateAsynchronousEventQueue ()
 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. More...
 
bool destroyAsynchronousEventQueue (DtAsynchronousEventQueue *secondary)
 be called in main thread, typically after the secondary thread has stopped. More...
 
- Public Member Functions inherited from makVrv::DtEventQueueInterface
virtual ~DtEventQueueInterface ()
 
DtVirtualBaseClassfindInstance (const std::string &className)
 Find a signaler interface. More...
 
void registerInstance (const std::string &className, DtVirtualBaseClass *instance)
 Register an signaler base interface. More...
 
void executeEvents (const SharedEventList &signalList)
 Take a unique pointer to a list of events, execute each event and delete the list. More...
 

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 ()
 Distribute all added events to the secondary queues. More...
 
- 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< EventEventList
 
typedef DtBoost::shared_ptr
< EventList
SharedEventList
 

Detailed Description

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.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtMainEventQueue::DtMainEventQueue ( )

CTOR, typically there should only be one instance per main thread.

virtual makVrv::DtMainEventQueue::~DtMainEventQueue ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtMainEventQueue::postEvent ( const Event signal)
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 void makVrv::DtMainEventQueue::processEvents ( )
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.

void makVrv::DtMainEventQueue::distributeEvents ( )
protected

Distribute all added events to the secondary queues.

This is called by processEvents.

Member Data Documentation

ThreadQueueList makVrv::DtMainEventQueue::mySecondaryQueues
protected
SharedEventList makVrv::DtMainEventQueue::myEventsToDistribute
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)