diff options
Diffstat (limited to 'examples/Event_Comm/Event_Comm_i.h')
-rw-r--r-- | examples/Event_Comm/Event_Comm_i.h | 85 |
1 files changed, 45 insertions, 40 deletions
diff --git a/examples/Event_Comm/Event_Comm_i.h b/examples/Event_Comm/Event_Comm_i.h index 1df87e6751e..8c13c8435a9 100644 --- a/examples/Event_Comm/Event_Comm_i.h +++ b/examples/Event_Comm/Event_Comm_i.h @@ -1,23 +1,19 @@ /* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// EventComm -// -// = FILENAME -// Event_Comm_i.h -// -// = DESCRIPTION -// Class interface for the implementation of the distributed -// event notification mechanism. -// -// = AUTHOR -// Douglas C. Schmidt (schmidt@cs.wustl.edu) and Pradeep Gore -// <pradeep@cs.wustl.edu> -// -// ============================================================================ + +//============================================================================= +/** + * @file Event_Comm_i.h + * + * $Id$ + * + * Class interface for the implementation of the distributed + * event notification mechanism. + * + * + * @author Douglas C. Schmidt (schmidt@cs.wustl.edu) and Pradeep Gore <pradeep@cs.wustl.edu> + */ +//============================================================================= + #ifndef _EVENT_COMM_I_H #define _EVENT_COMM_I_H @@ -34,56 +30,65 @@ #include "ace/Reactor.h" #include "ace/Null_Mutex.h" +/** + * @class ShutdownCallback + * + * @brief Helper callback class to shutdown the application. + */ class ShutdownCallback { - // = TITLE - // Helper callback class to shutdown the application. public: /// Destructor. virtual ~ShutdownCallback (void); + /// This method is to be called to shutdown the application. virtual void close (void) = 0; - // This method is to be called to shutdown the application. }; +/** + * @class Consumer_i + * + * @brief Defines the implementation class for event <Consumers>. + */ class Consumer_i : public POA_Event_Comm::Consumer { - // = TITLE - // Defines the implementation class for event <Consumers>. public: // = Initialization and termination methods. + /// Constructor. Consumer_i (void); - // Constructor. + /// Destructor. ~Consumer_i (void); - // Destructor. + /// set the <ACE_Reactor> to use when quitting. void set_reactor (ACE_Reactor *reactor); - // set the <ACE_Reactor> to use when quitting. + /// Pass the <event> to the <Consumer>. virtual void push (const Event_Comm::Event & event); - // Pass the <event> to the <Consumer>. virtual void disconnect (const char * reason); // Disconnect the <Consumer> from the <Notifier>, giving it the // <reason>. + /// Set the Shutdown callback. void set (ShutdownCallback *_shutdown); - // Set the Shutdown callback. private: + /// The callback to shutdown the consumer application. ShutdownCallback *shutdown; - // The callback to shutdown the consumer application. }; // Forward reference. class Consumer_Entry; +/** + * @class Notifier_i + * + * @brief Defines the implementation class for event <Notifiers>. + */ class Notifier_i : public POA_Event_Comm::Notifier { - // = TITLE - // Defines the implementation class for event <Notifiers>. public: enum { @@ -91,24 +96,24 @@ public: // Default max number of Event_Comm::Consumers. }; + /// Initialize a Notifier_i object with the specified size hint. Notifier_i (size_t size_hint = Notifier_i::DEFAULT_SIZE); - // Initialize a Notifier_i object with the specified size hint. + /// Disconnect all the receivers, giving them the <reason>. virtual void disconnect (const char *reason); - // Disconnect all the receivers, giving them the <reason>. + /// Send the <event> to all the consumers who have subscribed and who + /// match the filtering criteria. virtual void push (const Event_Comm::Event &event); - // Send the <event> to all the consumers who have subscribed and who - // match the filtering criteria. + /// Subscribe the <Consumer> to receive events that match + /// <filtering_criteria> applied by the <Notifier>. virtual void subscribe (Event_Comm::Consumer_ptr Consumer, const char * filtering_criteria); - // Subscribe the <Consumer> to receive events that match - // <filtering_criteria> applied by the <Notifier>. + /// Unsubscribe the <Consumer>. void unsubscribe (Event_Comm::Consumer *consumer, const char *filtering_criteria); - // Unsubscribe the <Consumer>. private: typedef ACE_Map_Manager <Event_Comm::Consumer_ptr, Consumer_Entry *, ACE_Null_Mutex> @@ -118,8 +123,8 @@ private: typedef ACE_Map_Entry <Event_Comm::Consumer_ptr, Consumer_Entry *> MAP_ENTRY; + /// Table that maps a <Event_Comm::Consumer *> to a <Consumer_Entry *>. MAP_MANAGER map_; - // Table that maps a <Event_Comm::Consumer *> to a <Consumer_Entry *>. }; #endif /* _EVENT_COMM_I_H */ |