Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / examples / RTCORBA / Activity / Builder.h
blob0af3a9fb16d9e85cbe585c5ebd77f62a0d5cf7f9
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file Builder.h
6 * The builder creates Tasks, Jobs, POAs.
8 * @author Pradeep Gore <pradeep@cs.wustl.edu>
9 */
10 //=============================================================================
11 #ifndef BUILDER_H
12 #define BUILDER_H
14 #include "orbsvcs/CosNamingC.h"
15 #include "tao/RTPortableServer/RTPortableServer.h"
17 #include "ace/Service_Config.h"
18 #include "ace/Service_Object.h"
19 #include "ace/Arg_Shifter.h"
21 class Activity;
22 class Periodic_Task;
23 class Job_i;
24 class POA_Holder;
26 typedef POA_Holder** POA_LIST;
27 typedef Periodic_Task** TASK_LIST;
28 typedef Job_i** JOB_LIST;
30 /**
31 * @class Builder
33 * @brief A service object that creates Tasks, Jobs, POAs.
35 class Builder : public ACE_Service_Object
37 public:
38 Builder ();
39 ~Builder ();
41 /// = Service_Object virtual method overloads.
42 virtual int init (int argc, ACE_TCHAR *argv[]);
43 virtual int fini (void);
45 /// = List access
46 int poa_list (POA_LIST& poa_list);
47 int task_list (TASK_LIST& task_list);
48 int job_list (JOB_LIST &job_list);
50 protected:
52 /// Number of POA's declared
53 int poa_count_;
55 /// The list of POA's.
56 POA_LIST poa_list_;
58 /// Number of Tasks's declared
59 int task_count_;
61 /// The list of Tasks.
62 TASK_LIST task_list_;
64 /// Number of Jobs's declared
65 int job_count_;
67 /// The list of Jobs
68 JOB_LIST job_list_;
71 ACE_STATIC_SVC_DECLARE (Builder)
73 ACE_FACTORY_DECLARE (ACE_Local_Service, Builder)
75 #endif /* BUILDER_H */