OpenGLPrakt --> events --> cEventDispatcher
The event dispatching class.
This is the core of the event system.
There should usually be no need to derive from this class.
Take care to destroy all cEventProducer's before destroying this class! They've got no way to know whether the dispatcher they want to send their events to has been destroyed.
 
 cEventDispatcher
  cEventDispatcher
   ~cEventDispatcher
  ~cEventDispatcher
  
 
 tRegisteredEvents
  tRegisteredEvents
  
 
 mRegisteredEvents
  mRegisteredEvents
  
 
 DisplayRegistered
  DisplayRegistered
   SendEvent
  SendEvent
   SubscribeToEvent
  SubscribeToEvent
   UnregisterConsumer
  UnregisterConsumer
   UnsubscribeFromEvent
  UnsubscribeFromEvent
  
 
public cEventDispatcher ( ) ;
default constructor
public virtual ~ cEventDispatcher ( ) ;
destructor
 
protected typedef multimap < const cStorableEvent , cEventConsumer * > tRegisteredEvents ;
 
protected tRegisteredEvents mRegisteredEvents
 
public virtual void SubscribeToEvent ( const cEvent & event ,
                                       cEventConsumer * consumer ) ;
register an event consumer for receiving of an event
| event | a "template" of an cEvent to receive | 
| consumer | the cEventConsumer to call upon receiption of the event | 
public virtual void UnsubscribeFromEvent ( const cEvent & event ,
                                           cEventConsumer * consumer ) ;
unregister an event consumer for receiving of an event
| event | a "template" of an cEvent | 
| consumer | the cEventConsumer to deregister from receiption of events of type event. | 
public virtual void UnregisterConsumer ( const cEventConsumer * consumer ) ;
unregister a whole consumer
Delete all subscriptions of this consumer (e.g. because it has been destroyed).
| consumer | cEventConsumer to unregister | 
public virtual void SendEvent ( const cEvent & event ,
                                bool global = false ) ;
send an event
The event is sent to all subscribers of this event type until one accepts it.
| event | cEvent (or descendant) to send | 
| global | is this a global event? - Send it until someone accepts it or send it to everyone who's subscribed? (optional, default: non-global) | 
public void DisplayRegistered ( ) ;
for debugging purposes only: display list of registered events
sends the list of registered events to cout
This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.
Click here to return to the top of the page.