Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / Scheduling_Service / Scheduling_Service.h
blob0b19983505fc2abbd7984a67cc4dae1bafc13d80
1 //=============================================================================
2 /**
3 * @file Scheduling_Service.h
5 * This class implements the functionality of a Scheduling Service in
6 * a stand-alone process.
8 * @author Chris Gill (cdgill@cs.wustl.edu) Based on the original
9 * Scheduling Service program by David Levine (levine@cs.wustl.edu) and
10 * Carlos O'Ryan (coryan@cs.wustl.edu)
11 * @author and on the Naming Service program implementation by Marina Spivak (marina@cs.wustl.edu) and Nagarajan Surendran (naga@cs.wustl.edu)
13 //=============================================================================
16 #ifndef TAO_SCHEDULING_SERVICE_H
17 #define TAO_SCHEDULING_SERVICE_H
19 #include "tao/Utils/ORB_Manager.h"
20 #include "orbsvcs/Sched/Reconfig_Scheduler.h"
21 #if defined (TAO_USES_STRATEGY_SCHEDULER)
22 #include "orbsvcs/Sched/Strategy_Scheduler.h"
23 #endif /* defined (TAO_USES_STRATEGY_SCHEDULER) */
24 #include "orbsvcs/Sched/Config_Scheduler.h"
25 #include "ace/SString.h"
27 /**
28 * @class TAO_Scheduling_Service
30 * @brief Defines a class that encapsulates the implementation of the
31 * TAO Scheduling Service.
33 * This class makes use of the TAO_Reconfig_Scheduler and
34 * ACE_Config_Scheduler classes to implement the Scheduling Service.
36 class TAO_Scheduling_Service
38 public:
39 /// Default Constructor.
40 TAO_Scheduling_Service ();
42 /// Constructor taking the command-line arguments.
43 TAO_Scheduling_Service (int argc, ACE_TCHAR* argv[]);
45 /// Initialize the Scheduling Service with the arguments.
46 int init (int argc, ACE_TCHAR* argv[]);
48 /// Run the TAO_Scheduling_Service.
49 int run ();
51 /// Destructor.
52 ~TAO_Scheduling_Service ();
54 private:
55 typedef ACE_Config_Scheduler CONFIG_SCHED_TYPE;
57 typedef TAO_Reconfig_Scheduler<TAO_MUF_FAIR_Reconfig_Sched_Strategy,
58 TAO_SYNCH_MUTEX> RECONFIG_SCHED_TYPE;
60 enum Scheduler_Type {CONFIG, RECONFIG};
62 /// parses the arguments.
63 int parse_args (int argc, ACE_TCHAR* argv[]);
65 /// The ORB manager. This must be the first thing in the
66 TAO_ORB_Manager orb_manager_;
68 /// Scheduler instance.
69 POA_RtecScheduler::Scheduler *scheduler_impl_;
71 /// Name of the IOR output file.
72 ACE_CString ior_file_name_;
74 /// Name of the process id output file.
75 ACE_CString pid_file_name_;
77 /// Name used to register the service.
78 ACE_CString service_name_;
80 /// Type of scheduler with which to instantiate the service.
81 Scheduler_Type scheduler_type_;
83 /// A reference to the ORB, to shut it down properly.
84 CORBA::ORB_var orb_;
87 #endif /* TAO_SCHEDULING_SERVICE_H */