Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / examples / Log / Event / Event_Consumer.h
blob1453e5331c92145e80d977e703bd56f8c9e3a8dc
1 /* -*- C++ -*- */
3 // ============================================================================
4 /**
5 * @file Event_Consumer.h
7 * An example of using the Event_Logging_Service.
8 * The Event_Consumer consumes log-generated events.
10 * @author D A Hanvey (d.hanvey@qub.ac.uk)
12 // ============================================================================
14 #ifndef EVENT_CONSUMER_H
15 #define EVENT_CONSUMER_H
17 #include "orbsvcs/DsEventLogAdminC.h"
18 #include "orbsvcs/CosEventCommS.h"
19 #include "orbsvcs/CosNamingC.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 class Consumer : public POA_CosEventComm::PushConsumer
27 // = TITLE
28 // Simple consumer object
30 // = DESCRIPTION
31 // This class is a consumer of log generated events.
33 public:
34 Consumer ();
35 // Constructor
37 int run (int argc, ACE_TCHAR* argv[]);
38 // Run the test
40 // = The CosEventComm::PushConsumer methods
42 virtual void push (const CORBA::Any &event);
44 virtual void disconnect_push_consumer ();
45 // The skeleton methods.
47 private:
48 // = Data Members
49 CORBA::ULong event_count_;
50 // Keep track of the number of events received.
52 CORBA::ORB_var orb_;
53 // The orb, just a pointer because the ORB does not outlive the
54 // run() method...
56 CosNaming::NamingContext_var naming_context_;
57 // Handle to the name service.
59 DsEventLogAdmin::EventLogFactory_var event_log_factory_;
60 // The Event Log Factory that generates the events to be consumed.
62 CosEventChannelAdmin::ProxyPushSupplier_var supplier_;
63 // The proxy that we are connected to.
66 #endif /* EVENT_CONSUMER_H */