Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / orbsvcs / examples / Notify / Lanes / Consumer_Client.h
blob2d22ab6f10212b707fef5c86d67ee56576796c66
1 /* -*- C++ -*- */
2 /**
3 * @file Consumer_Client.h
5 * @author Pradeep Gore <pradeep@oomworks.com>
6 */
8 #ifndef TAO_Notify_CONSUMER_CLIENT_H
9 #define TAO_Notify_CONSUMER_CLIENT_H
11 #include /**/ "ace/pre.h"
13 #include "ORB_Objects.h"
15 #include "tao/RTCORBA/RTCORBA.h"
17 #include "ace/SString.h"
18 #include "ace/Task.h"
20 class TAO_Notify_Lanes_Consumer;
22 /**
23 * @class TAO_Notify_Lanes_Consumer_Client
25 * @brief
27 class TAO_Notify_Lanes_Consumer_Client : public ACE_Task_Base
29 public:
30 /// Constructor
31 TAO_Notify_Lanes_Consumer_Client (TAO_Notify_ORB_Objects& orb_objects);
33 /// Destructor
34 ~TAO_Notify_Lanes_Consumer_Client ();
36 /// Init
37 void initialize ();
39 /// Run
40 void run ();
42 /// Parse Args
43 int parse_args (int argc, ACE_TCHAR *argv[]);
45 /// The thread entry point.
46 virtual int svc ();
48 protected:
49 /// Create an RT POA with a single lane at the specified RT Priority.
50 PortableServer::POA_ptr create_rt_poa ();
52 /// ORB Objects.
53 TAO_Notify_ORB_Objects orb_objects_;
55 /// Lock to serialize internal state.
56 TAO_SYNCH_MUTEX lock_;
58 /// Count how many consumers are done
59 int consumer_done_count_;
61 /// The Priority that we want the consumer lane to be at.
62 RTCORBA::Priority lane_priority_;
64 /// The Consumer.
65 TAO_Notify_Lanes_Consumer* consumer_;
67 /// The Type the Consumer should subscribe to.
68 ACE_CString event_type_;
71 #include /**/ "ace/post.h"
72 #endif /* TAO_Notify_CONSUMER_CLIENT_H */