blob: 8b0db2a892ff3c7b4b1f284e53be0e696cd24888 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
/* -*- C++ -*- */
//=============================================================================
/**
* @file Builder.h
*
* The builder creates Tasks, Jobs, POAs.
*
* @author Pradeep Gore <pradeep@cs.wustl.edu>
*/
//=============================================================================
#ifndef BUILDER_H
#define BUILDER_H
#include "orbsvcs/CosNamingC.h"
#include "tao/RTPortableServer/RTPortableServer.h"
#include "ace/Service_Config.h"
#include "ace/Service_Object.h"
#include "ace/Arg_Shifter.h"
class Activity;
class Periodic_Task;
class Job_i;
class POA_Holder;
typedef POA_Holder** POA_LIST;
typedef Periodic_Task** TASK_LIST;
typedef Job_i** JOB_LIST;
/**
* @class Builder
*
* @brief A service object that creates Tasks, Jobs, POAs.
*/
class Builder : public ACE_Service_Object
{
public:
Builder ();
~Builder ();
/// = Service_Object virtual method overloads.
virtual int init (int argc, ACE_TCHAR *argv[]);
virtual int fini ();
/// = List access
int poa_list (POA_LIST& poa_list);
int task_list (TASK_LIST& task_list);
int job_list (JOB_LIST &job_list);
protected:
/// Number of POA's declared
int poa_count_;
/// The list of POA's.
POA_LIST poa_list_;
/// Number of Tasks's declared
int task_count_;
/// The list of Tasks.
TASK_LIST task_list_;
/// Number of Jobs's declared
int job_count_;
/// The list of Jobs
JOB_LIST job_list_;
};
ACE_STATIC_SVC_DECLARE (Builder)
ACE_FACTORY_DECLARE (ACE_Local_Service, Builder)
#endif /* BUILDER_H */
|