00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ACE_PARSE_NODE_H
00015 #define ACE_PARSE_NODE_H
00016
00017 #include "ace/pre.h"
00018
00019 #include "ace/config-all.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif
00024
00025 #if (ACE_USES_CLASSIC_SVC_CONF == 1)
00026
00027 #include "ace/DLL.h"
00028 #include "ace/Svc_Conf.h"
00029
00030 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00031
00032
00033 class ACE_Service_Config;
00034 class ACE_Service_Type;
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 class ACE_Parse_Node
00047 {
00048 public:
00049 ACE_Parse_Node (void);
00050 explicit ACE_Parse_Node (const ACE_TCHAR *name);
00051 virtual ~ACE_Parse_Node (void);
00052
00053 ACE_Parse_Node *link (void) const;
00054 void link (ACE_Parse_Node *);
00055
00056
00057 virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno) = 0;
00058
00059 const ACE_TCHAR *name (void) const;
00060 void print (void) const;
00061
00062
00063 void dump (void) const;
00064
00065
00066 ACE_ALLOC_HOOK_DECLARE;
00067
00068 private:
00069 const ACE_TCHAR *name_;
00070 ACE_Parse_Node *next_;
00071
00072 private:
00073 ACE_UNIMPLEMENTED_FUNC (ACE_Parse_Node (const ACE_Parse_Node&))
00074 ACE_UNIMPLEMENTED_FUNC (ACE_Parse_Node& operator= (const ACE_Parse_Node&))
00075 };
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 class ACE_Suspend_Node : public ACE_Parse_Node
00087 {
00088 public:
00089 ACE_Suspend_Node (const ACE_TCHAR *name);
00090 ~ACE_Suspend_Node (void);
00091
00092 virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno);
00093
00094
00095 void dump (void) const;
00096
00097
00098 ACE_ALLOC_HOOK_DECLARE;
00099
00100 private:
00101 ACE_UNIMPLEMENTED_FUNC (ACE_Suspend_Node (const ACE_Suspend_Node&))
00102 ACE_UNIMPLEMENTED_FUNC (ACE_Suspend_Node& operator= (const ACE_Suspend_Node&))
00103 };
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 class ACE_Resume_Node : public ACE_Parse_Node
00115 {
00116 public:
00117 ACE_Resume_Node (const ACE_TCHAR *name);
00118 ~ACE_Resume_Node (void);
00119
00120 virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno);
00121
00122
00123 void dump (void) const;
00124
00125
00126 ACE_ALLOC_HOOK_DECLARE;
00127
00128 private:
00129 ACE_UNIMPLEMENTED_FUNC (ACE_Resume_Node (const ACE_Resume_Node&))
00130 ACE_UNIMPLEMENTED_FUNC (ACE_Resume_Node& operator= (const ACE_Resume_Node&))
00131 };
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142 class ACE_Remove_Node : public ACE_Parse_Node
00143 {
00144 public:
00145 ACE_Remove_Node (const ACE_TCHAR *name);
00146 ~ACE_Remove_Node (void);
00147
00148 virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno);
00149
00150
00151 void dump (void) const;
00152
00153
00154 ACE_ALLOC_HOOK_DECLARE;
00155
00156 private:
00157 ACE_UNIMPLEMENTED_FUNC (ACE_Remove_Node (const ACE_Remove_Node&))
00158 ACE_UNIMPLEMENTED_FUNC (ACE_Remove_Node& operator= (const ACE_Remove_Node&))
00159 };
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170 class ACE_Static_Node : public ACE_Parse_Node
00171 {
00172 public:
00173 ACE_Static_Node (const ACE_TCHAR *name, ACE_TCHAR *params = 0);
00174 virtual ~ACE_Static_Node (void);
00175
00176 virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno);
00177 virtual const ACE_Service_Type *record (const ACE_Service_Gestalt *g) const;
00178
00179 ACE_TCHAR *parameters (void) const;
00180
00181
00182 void dump (void) const;
00183
00184
00185 ACE_ALLOC_HOOK_DECLARE;
00186
00187 private:
00188
00189 ACE_TCHAR *parameters_;
00190
00191 private:
00192 ACE_UNIMPLEMENTED_FUNC (ACE_Static_Node (const ACE_Static_Node&))
00193 ACE_UNIMPLEMENTED_FUNC (ACE_Static_Node& operator= (const ACE_Static_Node&))
00194 };
00195
00196
00197 class ACE_Service_Type_Factory;
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208 class ACE_Dynamic_Node : public ACE_Static_Node
00209 {
00210 public:
00211 ACE_Dynamic_Node (ACE_Service_Type_Factory const *, ACE_TCHAR *params);
00212
00213
00214 virtual ~ACE_Dynamic_Node (void);
00215
00216
00217 virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno);
00218
00219
00220 void dump (void) const;
00221
00222
00223 ACE_ALLOC_HOOK_DECLARE;
00224
00225 private:
00226
00227 ACE_Auto_Ptr<const ACE_Service_Type_Factory> factory_;
00228
00229 private:
00230 ACE_UNIMPLEMENTED_FUNC (ACE_Dynamic_Node (const ACE_Dynamic_Node&))
00231 ACE_UNIMPLEMENTED_FUNC (ACE_Dynamic_Node& operator= (const ACE_Dynamic_Node&))
00232 };
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243 class ACE_Stream_Node : public ACE_Parse_Node
00244 {
00245 public:
00246 ACE_Stream_Node (const ACE_Static_Node *, const ACE_Parse_Node *);
00247 virtual ~ACE_Stream_Node (void);
00248
00249 virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno);
00250
00251
00252 void dump (void) const;
00253
00254
00255 ACE_ALLOC_HOOK_DECLARE;
00256
00257 private:
00258
00259 const ACE_Static_Node *node_;
00260 const ACE_Parse_Node *mods_;
00261
00262 private:
00263 ACE_UNIMPLEMENTED_FUNC (ACE_Stream_Node (const ACE_Stream_Node&))
00264 ACE_UNIMPLEMENTED_FUNC (ACE_Stream_Node& operator= (const ACE_Stream_Node&))
00265 };
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275 class ACE_Dummy_Node : public ACE_Parse_Node
00276 {
00277 public:
00278 ACE_Dummy_Node (const ACE_Static_Node *, const ACE_Parse_Node *);
00279 ~ACE_Dummy_Node (void);
00280
00281 virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno);
00282
00283
00284 void dump (void) const;
00285
00286
00287 ACE_ALLOC_HOOK_DECLARE;
00288
00289 private:
00290
00291 const ACE_Static_Node *node_;
00292 const ACE_Parse_Node *mods_;
00293
00294 private:
00295 ACE_UNIMPLEMENTED_FUNC (ACE_Dummy_Node (const ACE_Dummy_Node&))
00296 ACE_UNIMPLEMENTED_FUNC (ACE_Dummy_Node& operator= (const ACE_Dummy_Node&))
00297 };
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308 class ACE_Location_Node
00309 {
00310 public:
00311 ACE_Location_Node (void);
00312 const ACE_DLL &dll (void);
00313 const ACE_TCHAR *pathname (void) const;
00314 void pathname (const ACE_TCHAR *h);
00315 int dispose (void) const;
00316
00317 virtual ~ACE_Location_Node (void);
00318 virtual void set_symbol (void *h);
00319
00320
00321
00322 virtual void *symbol (ACE_Service_Gestalt *cfgptr,
00323 int &yyerrno,
00324 ACE_Service_Object_Exterminator * = 0) = 0;
00325
00326
00327 void dump (void) const;
00328
00329
00330 ACE_ALLOC_HOOK_DECLARE;
00331
00332 protected:
00333 int open_dll (int & yyerrno);
00334
00335
00336 const ACE_TCHAR *pathname_;
00337
00338
00339
00340
00341
00342
00343 int must_delete_;
00344
00345
00346 ACE_DLL dll_;
00347
00348
00349 void *symbol_;
00350
00351 private:
00352 ACE_UNIMPLEMENTED_FUNC (ACE_Location_Node (const ACE_Location_Node&))
00353 ACE_UNIMPLEMENTED_FUNC (ACE_Location_Node& operator= (const ACE_Location_Node&))
00354 };
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365 class ACE_Object_Node : public ACE_Location_Node
00366 {
00367 public:
00368 ACE_Object_Node (const ACE_TCHAR *pathname, const ACE_TCHAR *obj_name);
00369 virtual void *symbol (ACE_Service_Gestalt *config,
00370 int &yyerrno,
00371 ACE_Service_Object_Exterminator * = 0);
00372 virtual ~ACE_Object_Node (void);
00373
00374
00375 void dump (void) const;
00376
00377
00378 ACE_ALLOC_HOOK_DECLARE;
00379
00380 private:
00381
00382 const ACE_TCHAR *object_name_;
00383
00384 private:
00385 ACE_UNIMPLEMENTED_FUNC (ACE_Object_Node (const ACE_Object_Node&))
00386 ACE_UNIMPLEMENTED_FUNC (ACE_Object_Node& operator= (const ACE_Object_Node&))
00387 };
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398 class ACE_Function_Node : public ACE_Location_Node
00399 {
00400 public:
00401 ACE_Function_Node (const ACE_TCHAR *pathname, const ACE_TCHAR *func_name);
00402 virtual void *symbol (ACE_Service_Gestalt *config,
00403 int &yyerrno,
00404 ACE_Service_Object_Exterminator *gobbler = 0);
00405 virtual ~ACE_Function_Node (void);
00406
00407
00408 void dump (void) const;
00409
00410
00411 ACE_ALLOC_HOOK_DECLARE;
00412
00413 private:
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432 ACE_TCHAR * make_func_name (ACE_TCHAR const * func_name);
00433
00434 private:
00435
00436
00437 const ACE_TCHAR *function_name_;
00438
00439 private:
00440 ACE_UNIMPLEMENTED_FUNC (ACE_Function_Node (const ACE_Function_Node&))
00441 ACE_UNIMPLEMENTED_FUNC (ACE_Function_Node& operator= (const ACE_Function_Node&))
00442 };
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455 class ACE_Static_Function_Node : public ACE_Location_Node
00456 {
00457 public:
00458 explicit ACE_Static_Function_Node (const ACE_TCHAR *func_name);
00459 virtual void *symbol (ACE_Service_Gestalt *config,
00460 int &yyerrno,
00461 ACE_Service_Object_Exterminator * = 0);
00462 virtual ~ACE_Static_Function_Node (void);
00463
00464
00465 void dump (void) const;
00466
00467
00468 ACE_ALLOC_HOOK_DECLARE;
00469
00470 private:
00471
00472 const ACE_TCHAR *function_name_;
00473
00474 private:
00475 ACE_UNIMPLEMENTED_FUNC (ACE_Static_Function_Node (const ACE_Static_Function_Node&))
00476 ACE_UNIMPLEMENTED_FUNC (ACE_Static_Function_Node& operator= (const ACE_Static_Function_Node&))
00477 };
00478
00479 ACE_END_VERSIONED_NAMESPACE_DECL
00480
00481 #endif
00482
00483 #include "ace/post.h"
00484
00485 #endif