IMS2  Pre-Alpha
An Orbiter add-on to allow on-runtime construction of spacecraft from predefined modules
EventSink Class Reference
Inheritance diagram for EventSink:
EventNode

Private Member Functions

 EventSink (EventHandler *_host)
 
bool processEvent (Event_Base *e)
 Receives and propagates an event. More...
 

Friends

class EventNode
 
class EventHandler
 

Additional Inherited Members

- Protected Member Functions inherited from EventNode
void RegisterEventSink (EventSink *sink)
 registers an event sink as a child of this node More...
 
bool UnregisterEventSink (EventSink *sink)
 unregisters an event sink. More...
 
- Protected Attributes inherited from EventNode
EventHandlerhost
 The EventHandler hosting this EventNode.
 
vector< EventSink * > children
 The event nodes connecting directly to this EventNode.
 

Detailed Description

receives and forwards events to its containing EventHandler and its connected EventSinks

EventSinks receive an event, pass it to the containing EventHandler's ProcessEvent() function, and then forward it to any eventsinks connected to it.

This class is pure private and cannot be instantiated or used directly. Use the interface provided by EventHandler instead.

See also
EventHandler.h

Constructor & Destructor Documentation

EventSink::EventSink ( EventHandler _host)
private
Parameters
_hostThe EventHandler containing this EventSink

Member Function Documentation

bool EventSink::processEvent ( Event_Base e)
privatevirtual

Receives and propagates an event.

First sends the event to the ProcessEvent function of its host, then forwards it to all its children. Immediately breaks if the event was consumed down the line without further forwarding.

Parameters
eThe event to be propagated
Returns
True if the event was consumed, false otherwise

Reimplemented from EventNode.


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