Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / TAO / orbsvcs / examples / RtEC / Simple / Consumer.h
blobdc91368f8ea05eab5e1986130283805fdc3c7526
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file Consumer.h
6 * @author Carlos O'Ryan (coryan@cs.wustl.edu)
7 */
8 //=============================================================================
11 #ifndef CONSUMER_H
12 #define CONSUMER_H
14 #include "orbsvcs/RtecEventCommS.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 # pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 /**
21 * @class Consumer
23 * @brief Simple consumer object
25 * This class is a consumer of events.
26 * It simply registers for one event type.
28 class Consumer : public POA_RtecEventComm::PushConsumer
30 public:
31 /// Constructor
32 Consumer ();
34 /// Run the test
35 int run (int argc, ACE_TCHAR* argv[]);
37 // = The RtecEventComm::PushConsumer methods
39 /// The skeleton methods.
40 virtual void push (const RtecEventComm::EventSet& events);
41 virtual void disconnect_push_consumer ();
43 private:
44 /// Keep track of the number of events received.
45 CORBA::ULong event_count_;
47 /// The orb, just a pointer because the ORB does not outlive the
48 /// run() method...
49 CORBA::ORB_ptr orb_;
52 #endif /* CONSUMER_H */