Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / examples / RTScheduling / POA_Holder.h
blob94f45bf0872b11f1d35c8a6bd37c4eec0eafdc34
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 "rtschedtestlib_export.h"
16 #include "tao/RTCORBA/RTCORBA.h"
17 #include "tao/PortableServer/PortableServer.h"
19 #include "ace/SString.h"
20 #include "ace/Arg_Shifter.h"
22 /**
23 * @class POA_Holder
25 * @brief An options holder for parameters to creating a poa.
27 class RTSCHEDTESTLIB_Export POA_Holder
29 public:
30 /// Constructor
31 POA_Holder (void);
33 /// The arg_shifter options are read in the following manner:
34 ///-POA <name> -PriorityModel <CLIENT|SERVER> <priority> -Lanes <count> (-Lane <priority> ,<static_threads> <dynamic_threads>)* -Bands <count> (-Band <low> <high>)*
35 int init (ACE_Arg_Shifter& arg_shifter);
37 /// Activate the new POA using the parameters initialized before.
38 void activate (RTCORBA::RTORB_ptr rt_orb, PortableServer::POA_ptr parent_poa);
40 protected:
41 /// = POA create options.
42 ACE_CString POA_name_;
43 RTCORBA::PriorityModel priority_model_;
44 RTCORBA::Priority server_priority_;
45 RTCORBA::ThreadpoolLanes lanes_;
46 RTCORBA::PriorityBands bands_;
47 int thread_pool_;
48 CORBA::ULong tp_static_threads_;
49 CORBA::ULong tp_dynamic_threads_;
50 RTCORBA::Priority tp_priority_;
53 #endif /* POA_HOLDER_H */