Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages | Examples

ColCOWS::EventHandler Class Reference

#include <ColCOWS_EventHandler.hh>

Collaboration diagram for ColCOWS::EventHandler:

Collaboration graph
[legend]
List of all members.

Detailed Description

ColCOWS event handler.

The EventHandler allows the user to catch and react to events of workspace life-cycle (activation, connection, disconnection).

The user must declare a class inheriting from EventHandler and implement the event methods called by the ColCOWS nodes. Then he must register his event handler to the node with Node::setEventHandler( ... ).

Todo:
Allow several event handlers to be connected on one workspace

Definition at line 53 of file ColCOWS_EventHandler.hh.

Public Member Functions

 EventHandler ()
 constructor
virtual ~EventHandler ()
 destructor
unsigned int getKey () const
 get key of this event handler in its event handler manager ( 0 => not registred to an event handler manager )
void setKey (unsigned int key)
 set key of this event handler in its event handler manager ( 0 => not registred to an event handler manager )
EventHandlerManagergetEventHandlerManager () const
 get event handler manager pointer
void setEventHandlerManager (EventHandlerManager *event_handler_manager)
 set event handler manager pointer
NodegetColCOWSNode () const
 get ColCOWS Node pointer

Protected Member Functions

virtual void onActivation ()
 treatment on the activation of the workspace
virtual void onDeactivation ()
 treatment on the deactivation of the workspace
virtual void onConnection (unsigned long num_connection, bool initiator)
 treatment on the connection of a workspace
virtual void onDisconnection (unsigned long num_connection)
 treatment on a disconnection

Protected Attributes

EventHandlerManager_event_handler_manager
 associated EventHandlerManager
unsigned int _key
 key in the event handler manager

Friends

class EventHandlerManager


The documentation for this class was generated from the following files:
Generated on Tue Jun 21 12:55:57 2005 for ColCOWS by  doxygen 1.4.1