blob: cd1cf422240815cc0357f5f0cd20f005957f0243 (
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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
|
/* -*- C++ -*- */
// $Id$
// ============================================================================
//
// = LIBRARY
// ace
//
// = FILENAME
// Parse_Node.h
//
// = AUTHOR
// Doug Schmidt
//
// ============================================================================
#if !defined (ACE_PARSE_NODE_H)
#define ACE_PARSE_NODE_H
#include "ace/Service_Types.h"
class ACE_Export ACE_Parse_Node
{
// = TITLE
// Provide the base of the object hierarchy that defines the parse
// tree of Service Nodes.
public:
ACE_Parse_Node (void);
ACE_Parse_Node (const char *name);
virtual ~ACE_Parse_Node (void);
ACE_Parse_Node *link (void) const;
void link (ACE_Parse_Node *);
virtual void apply (void) = 0;
const char *name (void) const;
void print (void) const;
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
private:
const char *name_;
ACE_Parse_Node *next_;
};
class ACE_Export ACE_Suspend_Node : public ACE_Parse_Node
{
// = TITLE
// Suspend a Service Node.
public:
ACE_Suspend_Node (const char *name);
virtual void apply (void);
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
};
class ACE_Export ACE_Resume_Node : public ACE_Parse_Node
{
// = TITLE
// Resume a Service Node.
public:
ACE_Resume_Node (const char *name);
virtual void apply (void);
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
};
class ACE_Export ACE_Remove_Node : public ACE_Parse_Node
{
// = TITLE
// Remove a Service Node.
public:
ACE_Remove_Node (const char *name);
virtual void apply (void);
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
};
class ACE_Export ACE_Static_Node : public ACE_Parse_Node
{
// = TITLE
// Handle a statically linked node.
public:
ACE_Static_Node (const char *name, char *params = 0);
virtual ~ACE_Static_Node (void);
virtual void apply (void);
virtual const ACE_Service_Type *record (void) const;
char *parameters (void) const;
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
private:
char *parameters_;
// "Command-line" parameters.
};
class ACE_Export ACE_Dynamic_Node : public ACE_Static_Node
{
// = TITLE
// Handle a dynamically linked node.
public:
ACE_Dynamic_Node (const ACE_Service_Type *, char *params);
virtual ~ACE_Dynamic_Node (void);
virtual const ACE_Service_Type *record (void) const;
virtual void apply (void);
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
private:
const ACE_Service_Type *record_;
// Pointer to a descriptor that describes this node.
};
class ACE_Export ACE_Stream_Node : public ACE_Parse_Node
{
// = TITLE
// Handle a Stream.
public:
ACE_Stream_Node (const ACE_Static_Node *, const ACE_Parse_Node *);
virtual ~ACE_Stream_Node (void);
virtual void apply (void);
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
private:
const ACE_Static_Node *node_;
const ACE_Parse_Node *mods_;
// Linked list of modules that are part of the stream.
};
class ACE_Export ACE_Location_Node
{
// = TITLE
// Keep track of where a shared library is located.
public:
ACE_Location_Node (void);
virtual void *symbol (ACE_Service_Object_Exterminator * = 0) = 0;
virtual void set_symbol (void *h);
ACE_SHLIB_HANDLE handle (void) const;
void handle (const ACE_SHLIB_HANDLE h);
const char *pathname (void) const;
void pathname (const char *h);
int dispose (void) const;
virtual ~ACE_Location_Node (void);
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
protected:
ACE_SHLIB_HANDLE open_handle (void);
const char *pathname_;
// Pathname to the shared library we are working on.
int must_delete_;
// Flag indicating whether we need to delete the <pathname_>.
ACE_SHLIB_HANDLE handle_;
// Handle to the open shared library.
void *symbol_;
// Symbol that we've obtained from the shared library.
};
class ACE_Export ACE_Object_Node : public ACE_Location_Node
{
// = TITLE
// Keeps track of the symbol name for a shared object.
public:
ACE_Object_Node (const char *pathname, const char *obj_name);
virtual void *symbol (ACE_Service_Object_Exterminator * = 0);
virtual ~ACE_Object_Node (void);
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
private:
const char *object_name_;
// Name of the object that we're parsing.
};
class ACE_Export ACE_Function_Node : public ACE_Location_Node
{
// = TITLE
// Keeps track of the symbol name of for a shared function.
public:
ACE_Function_Node (const char *pathname, const char *func_name);
virtual void *symbol (ACE_Service_Object_Exterminator *gobbler = 0);
virtual ~ACE_Function_Node (void);
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
private:
const char *function_name_;
// Name of the function that we're parsing.
};
class ACE_Export ACE_Dummy_Node : public ACE_Parse_Node
{
// = TITLE
// I forget why this is here... ;-)
public:
ACE_Dummy_Node (const ACE_Static_Node *, const ACE_Parse_Node *);
~ACE_Dummy_Node (void);
virtual void apply (void);
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
private:
const ACE_Static_Node *node_;
const ACE_Parse_Node *mods_;
// Linked list of modules that we're dealing with.
};
class ACE_Export ACE_Static_Function_Node : public ACE_Location_Node
{
// = TITLE
// Keeps track of the symbol name for a function that is not
// linked in from a DLL, but is statically linked with the
// application.
public:
ACE_Static_Function_Node (const char *func_name);
virtual void *symbol (ACE_Service_Object_Exterminator * = 0);
virtual ~ACE_Static_Function_Node (void);
void dump (void) const;
// Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
private:
const char *function_name_;
// Name of the function that we're parsing.
};
#if defined (__ACE_INLINE__)
#include "ace/Parse_Node.i"
#endif /* __ACE_INLINE__ */
#endif /* ACE_PARSE_NODE_H */
|