Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / examples / Event_Comm / Notifier_Handler.h
blob84d310297e70449508aedc3c17455eaa86cf432a
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file Notifier_Handler.h
7 * @author Douglas C. Schmidt (d.schmidt@vanderbilt.edu) and Pradeep Gore (pradeep@cs.wustl.edu)
8 */
9 //=============================================================================
12 #ifndef _NOTIFIER_HANDLER_H
13 #define _NOTIFIER_HANDLER_H
15 #include "Event_Comm_i.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "orbsvcs/Naming/Naming_Client.h"
22 #include "orbsvcs/CosNamingC.h"
24 /**
25 * @class Notifier_Handler
27 * @brief Holds the <Event_Comm::Notifier> object which is obtained from
28 * the naming service.
30 class Notifier_Handler
32 public:
33 /// This constructor gets the notifier object from the Naming
34 /// Service.
35 Notifier_Handler () = default;
37 /// Destructor.
38 virtual ~Notifier_Handler () = default;
40 /// Initialize the client communication endpoint with server.
41 int init (int argc, ACE_TCHAR *argv[], ShutdownCallback* _shutdowncallback);
43 // = Accessors.
44 Event_Comm::Notifier *notifier ();
45 void notifier (Event_Comm::Notifier *);
47 /// runs the ORB.
48 int run ();
50 /// Close down the handler.
51 int close ();
53 /// called to request application shutdown.
54 void shutdown ();
56 /// returns the ORB's reactor.
57 ACE_Reactor *reactor ();
59 private:
60 /// Remember our orb.
61 CORBA::ORB_var orb_;
63 /// Pointer to an <Event_Comm::Notifier> object.
64 Event_Comm::Notifier *notifier_;
66 /// An instance of the name client used for resolving the factory
67 /// objects.
68 TAO_Naming_Client naming_client_;
70 /// The handler to shutdown the app.
71 ShutdownCallback *shutdowncallback;
74 #define NOTIFIER_BIND_NAME "Notifier"
76 #endif /* _NOTIFIER_HANDLER_H */