Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / examples / Log / RTEvent / RTEvent_Consumer.h
bloba49c0dae275c71389a6cb9676dae0ad35ac24a01
1 /* -*- C++ -*- */
3 // ============================================================================
4 /**
5 * @file RTEvent_Consumer.h
7 * An example of using the RTEvent_Logging_Service.
8 * The RTEvent_Consumer consumes log-generated events.
10 * @author D A Hanvey (d.hanvey@qub.ac.uk)
12 // ============================================================================
14 #ifndef RTEVENT_CONSUMER_H
15 #define RTEVENT_CONSUMER_H
17 #include "orbsvcs/RtecEventCommS.h"
18 #include "orbsvcs/RTEventLogAdminC.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_RtecEventComm::PushConsumer
27 // = TITLE
28 // Simple consumer object
30 // = DESCRIPTION
31 // This class is a consumer of events.
32 // It simply registers for one event type.
34 public:
35 Consumer ();
36 // Constructor
38 int run (int argc, ACE_TCHAR* argv[]);
39 // Run the test
41 // = The RtecEventComm::PushConsumer methods
43 virtual void push (const RtecEventComm::EventSet& events);
44 virtual void disconnect_push_consumer ();
45 // The skeleton methods.
47 private:
48 CORBA::ULong event_count_;
49 // Keep track of the number of events received.
51 CORBA::ORB_ptr orb_;
52 // The orb, just a pointer because the ORB does not outlive the
53 // run() method...
55 CosNaming::NamingContext_var naming_context_;
56 // Handle to the name service.
58 RTEventLogAdmin::EventLogFactory_var event_log_factory_;
59 // The Event Log Factory that generates the events to be consumed.
61 RtecEventChannelAdmin::ProxyPushSupplier_var supplier_;
62 // The proxy that we are connected to.
65 #endif /* RTEVENT_CONSUMER_H */