IMS2  Pre-Alpha
An Orbiter add-on to allow on-runtime construction of spacecraft from predefined modules
EventNode Class Referenceabstract

Abstract base class of a node in the event pipe tree from which EventGenerator and EventSink derive. More...

Inheritance diagram for EventNode:
EventGenerator EventSink

Protected Member Functions

void RegisterEventSink (EventSink *sink)
 registers an event sink as a child of this node More...
 
bool UnregisterEventSink (EventSink *sink)
 unregisters an event sink. More...
 
virtual bool processEvent (Event_Base *_event)
 Sends an Event to all children. More...
 

Protected Attributes

EventHandler * host
 The EventHandler hosting this EventNode.
 
vector< EventSink * > children
 The event nodes connecting directly to this EventNode.
 

Friends

class EventHandler
 

Detailed Description

Abstract base class of a node in the event pipe tree from which EventGenerator and EventSink derive.

See also
EventHandler.h

Member Function Documentation

bool EventNode::processEvent ( Event_Base *  _event)
protectedvirtual

Sends an Event to all children.

Aborts propagation if its containing EventHandler or one of the children's EventHandler consumes the event.

Parameters
_eventThe event being propagated through the event pipe
Note
must be overloaded and called from inheriting classes
Returns
True if the event was consumed, false otherwise

Reimplemented in EventGenerator, and EventSink.

void EventNode::RegisterEventSink ( EventSink *  sink)
protected

registers an event sink as a child of this node

Parameters
sinkThe EventSink intended to connect to this node
bool EventNode::UnregisterEventSink ( EventSink *  sink)
protected

unregisters an event sink.

Parameters
sinkThe EventSink you want to disconnect from this node
Note
Does NOT delete the child that is being unregistered!
Returns
True if succesful, false if the passed node was not a child of this node

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