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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
// $Id$
#ifndef CCF_CIDL_SYNTAX_TREE_HPP
#define CCF_CIDL_SYNTAX_TREE_HPP
#include "MSVC_Pragmas.hpp"
#include "CCF/IDL3/IDL3_SyntaxTree.hpp"
namespace CIDL
{
namespace SyntaxTree
{
// Import all nodes of IDL3
using namespace IDL3::SyntaxTree;
class Composition : public virtual Scope
{
public:
struct Category
{
enum Value
{
ENTITY,
PROCESS,
SERVICE,
SESSION
};
friend std::ostream&
operator<< (std::ostream& o, Value v)
{
if (v == ENTITY) o << "entity";
else if (v == PROCESS) o << "process";
else if (v == SERVICE) o << "service";
else o << "session";
return o;
}
};
public:
virtual
~Composition () throw () {}
Composition (SimpleName const& name,
Category::Value category,
ScopePtr const& scope)
: Declaration (name, scope),
Scope (name, scope),
category_ (category)
{
}
public:
Category::Value
category () const
{
return category_;
}
// Runtime declaration type information
public:
virtual std::string
declaration_type ()
{
return "composition";
}
// Traversal
public:
virtual void
accept (CCF::Traversal::Visitor* v);
private:
Category::Value category_;
};
typedef
StrictPtr<Composition>
CompositionPtr;
typedef
DeclarationOrderComparator<CompositionPtr>
CompositionOrderComparator;
class HomeExecutor : public virtual Scope
{
public:
virtual
~HomeExecutor () throw () {}
HomeExecutor (SimpleName const& name,
ScopePtr const& scope,
ScopedName implements,
SimpleName manages)
: Declaration (name, scope),
Scope (name, scope),
implements_ (scope->table (), implements),
manages_ (manages)
{
}
public:
HomeDefPtr
implements () const
{
return implements_.resolve ();
}
SimpleName
manages () const
{
return manages_;
}
// Runtime declaration type information
public:
virtual std::string
declaration_type ()
{
return "home executor";
}
// Traversal
public:
virtual void
accept (CCF::Traversal::Visitor* v);
private:
HomeDefRef implements_;
SimpleName manages_;
};
typedef
StrictPtr<HomeExecutor>
HomeExecutorPtr;
}
}
#endif // CCF_CIDL_SYNTAX_TREE_HPP
|