Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / examples / RTCORBA / Activity / POA_Holder.h
blob6e46602824b3c2c8a367bdc5d030349df5ada21b
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file POA_Holder.h
6 * A helper to hold options for creating a POA.
8 * @author Pradeep Gore <pradeep@cs.wustl.edu>
9 */
10 //=============================================================================
11 #ifndef POA_HOLDER_H
12 #define POA_HOLDER_H
14 #include "tao/RTCORBA/RTCORBA.h"
15 #include "tao/PortableServer/PortableServer.h"
16 #include "ace/SString.h"
17 #include "ace/Arg_Shifter.h"
19 /**
20 * @class POA_Holder
22 * @brief An options holder for parameters to creating a poa.
24 class POA_Holder
26 public:
27 /// Constructor
28 POA_Holder ();
30 /// The arg_shifter options are read in the following manner: -POA <name> -PriorityModel <CLIENT|SERVER> <priority> -Lanes <count> (-Lane <priority> ,<static_threads> <dynamic_threads>)* -Bands <count> (-Band <low> <high>)*
31 int init (ACE_Arg_Shifter& arg_shifter);
33 /// Activate the new POA using the parameters initialized before.
34 void activate (RTCORBA::RTORB_ptr rt_orb, PortableServer::POA_ptr parent_poa);
36 protected:
37 /// Cleanup.
38 PortableServer::POA_var poa_;
40 /// = POA create options.
41 ACE_CString POA_name_;
42 RTCORBA::PriorityModel priority_model_;
43 RTCORBA::Priority server_priority_;
44 RTCORBA::ThreadpoolLanes lanes_;
45 RTCORBA::PriorityBands bands_;
48 #endif /* POA_HOLDER_H */