ot::NetworkSink Class Reference
[Network Classes]

#include <NetworkSink.h>

Inheritance diagram for ot::NetworkSink:

Inheritance graph
[legend]
Collaboration diagram for ot::NetworkSink:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class implements a simple node that stores a copy of the last event it received and passed on for output to the console. The associated NetworkSinkModule checks for changes and generates a new network package if necessary.
Author:
Gerhard Reitmayr


Public Member Functions

virtual int isEventGenerator ()
virtual void onEventGenerated (Event &e, Node &generator)

Public Attributes

std::string stationName
 station name
short int stationNumber
 station number
NetworkSender * networkSender
 network sender pointer
int modified
 flag whether it was modified since last turn
Event event
 the event that is stored

Protected Member Functions

 NetworkSink (std::string &name_, short int number_, NetworkSender *networkSender_)

Friends

class NetworkSinkModule


Constructor & Destructor Documentation

ot::NetworkSink::NetworkSink std::string &  name_,
short int  number_,
NetworkSender *  networkSender_
[inline, protected]
 

constructor method,sets members

Parameters:
name_ the station name
number_ the station number
networkSender_ pointer to the network sender this station belongs to


Member Function Documentation

virtual int ot::NetworkSink::isEventGenerator  )  [inline, virtual]
 

tests for EventGenerator interface being present. Is overriden to return 1 always.

Returns:
always 1

Reimplemented from ot::Node.

virtual void ot::NetworkSink::onEventGenerated Event e,
Node generator
[inline, virtual]
 

this method notifies the object that a new event was generated. It stores a copy of the received event and passes the event on to its observers.

Parameters:
event reference to the new event. Do not change the event values, make a copy and change that !
generator reference to the EventGenerator object that notified the EventObserver.

Reimplemented from ot::Node.


Friends And Related Function Documentation

friend class NetworkSinkModule [friend]
 


Member Data Documentation

Event ot::NetworkSink::event
 

the event that is stored

int ot::NetworkSink::modified
 

flag whether it was modified since last turn

NetworkSender* ot::NetworkSink::networkSender
 

network sender pointer

std::string ot::NetworkSink::stationName
 

station name

short int ot::NetworkSink::stationNumber
 

station number


The documentation for this class was generated from the following file:
Generated on Wed Feb 28 15:33:31 2007 for NaviTrack by  doxygen 1.4.6