diff options
Diffstat (limited to 'ace/Parse_Node.h')
-rw-r--r-- | ace/Parse_Node.h | 169 |
1 files changed, 122 insertions, 47 deletions
diff --git a/ace/Parse_Node.h b/ace/Parse_Node.h index acb07deadc8..e97d841bfa1 100644 --- a/ace/Parse_Node.h +++ b/ace/Parse_Node.h @@ -25,6 +25,7 @@ #if (ACE_USES_CLASSIC_SVC_CONF == 1) #include "ace/DLL.h" +#include "ace/Svc_Conf.h" ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -51,7 +52,9 @@ public: ACE_Parse_Node *link (void) const; void link (ACE_Parse_Node *); - virtual void apply (int & yyerrno) = 0; + + /// Will update the yyereno member and/or the corresponding configuration + virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno) = 0; const ACE_TCHAR *name (void) const; void print (void) const; @@ -65,6 +68,10 @@ public: private: const ACE_TCHAR *name_; ACE_Parse_Node *next_; + +private: + ACE_UNIMPLEMENTED_FUNC (ACE_Parse_Node (const ACE_Parse_Node&)) + ACE_UNIMPLEMENTED_FUNC (ACE_Parse_Node& operator= (const ACE_Parse_Node&)) }; /** @@ -82,13 +89,20 @@ public: ACE_Suspend_Node (const ACE_TCHAR *name); ~ACE_Suspend_Node (void); - virtual void apply (int & yyerrno); + virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno); /// Dump the state of an object. void dump (void) const; /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; + +private: + ACE_UNIMPLEMENTED_FUNC + (ACE_Suspend_Node (const ACE_Suspend_Node&)) + + ACE_UNIMPLEMENTED_FUNC + (ACE_Suspend_Node& operator= (const ACE_Suspend_Node&)) }; /** @@ -106,13 +120,17 @@ public: ACE_Resume_Node (const ACE_TCHAR *name); ~ACE_Resume_Node (void); - virtual void apply (int & yyerrno); + virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno); /// Dump the state of an object. void dump (void) const; /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; + +private: + ACE_UNIMPLEMENTED_FUNC (ACE_Resume_Node (const ACE_Resume_Node&)) + ACE_UNIMPLEMENTED_FUNC (ACE_Resume_Node& operator= (const ACE_Resume_Node&)) }; /** @@ -130,13 +148,17 @@ public: ACE_Remove_Node (const ACE_TCHAR *name); ~ACE_Remove_Node (void); - virtual void apply (int & yyerrno); + virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno); /// Dump the state of an object. void dump (void) const; /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; + +private: + ACE_UNIMPLEMENTED_FUNC (ACE_Remove_Node (const ACE_Remove_Node&)) + ACE_UNIMPLEMENTED_FUNC (ACE_Remove_Node& operator= (const ACE_Remove_Node&)) }; /** @@ -154,8 +176,9 @@ public: ACE_Static_Node (const ACE_TCHAR *name, ACE_TCHAR *params = 0); virtual ~ACE_Static_Node (void); - virtual void apply (int & yyerrno); - virtual const ACE_Service_Type *record (void) const; + virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno); + virtual const ACE_Service_Type *record (const ACE_Service_Gestalt *g) const; + ACE_TCHAR *parameters (void) const; /// Dump the state of an object. @@ -167,8 +190,15 @@ public: private: /// "Command-line" parameters. ACE_TCHAR *parameters_; + +private: + ACE_UNIMPLEMENTED_FUNC (ACE_Static_Node (const ACE_Static_Node&)) + ACE_UNIMPLEMENTED_FUNC (ACE_Static_Node& operator= (const ACE_Static_Node&)) }; + +class ACE_Service_Type_Factory; + /** * @class ACE_Dynamic_Node * @@ -181,11 +211,13 @@ private: class ACE_Dynamic_Node : public ACE_Static_Node { public: - ACE_Dynamic_Node (const ACE_Service_Type *, ACE_TCHAR *params); + ACE_Dynamic_Node (ACE_Service_Type_Factory const *, ACE_TCHAR *params); + + // ACE_Dynamic_Node (const ACE_Service_Type *, ACE_TCHAR *params); virtual ~ACE_Dynamic_Node (void); - virtual const ACE_Service_Type *record (void) const; - virtual void apply (int & yyerrno); + // virtual const ACE_Service_Type *record (void) const; + virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno); /// Dump the state of an object. void dump (void) const; @@ -195,7 +227,14 @@ public: private: /// Pointer to a descriptor that describes this node. - const ACE_Service_Type *record_; + ACE_Auto_Ptr<const ACE_Service_Type_Factory> factory_; + +private: + ACE_UNIMPLEMENTED_FUNC + (ACE_Dynamic_Node (const ACE_Dynamic_Node&)) + + ACE_UNIMPLEMENTED_FUNC + (ACE_Dynamic_Node& operator= (const ACE_Dynamic_Node&)) }; /** @@ -213,7 +252,7 @@ public: ACE_Stream_Node (const ACE_Static_Node *, const ACE_Parse_Node *); virtual ~ACE_Stream_Node (void); - virtual void apply (int & yyerrno); + virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno); /// Dump the state of an object. void dump (void) const; @@ -225,6 +264,42 @@ private: /// Linked list of modules that are part of the stream. const ACE_Static_Node *node_; const ACE_Parse_Node *mods_; + +private: + ACE_UNIMPLEMENTED_FUNC (ACE_Stream_Node (const ACE_Stream_Node&)) + ACE_UNIMPLEMENTED_FUNC (ACE_Stream_Node& operator= (const ACE_Stream_Node&)) +}; + +/** + * @class ACE_Dummy_Node + * + * @brief I forget why this is here... ;-) + * @brief Used in a special case of static STREAM definintion + * + * @note This class is only meant for INTERNAL use by ACE. + */ +class ACE_Dummy_Node : public ACE_Parse_Node +{ +public: + ACE_Dummy_Node (const ACE_Static_Node *, const ACE_Parse_Node *); + ~ACE_Dummy_Node (void); + + virtual void apply (ACE_Service_Gestalt *cfg, int &yyerrno); + + /// Dump the state of an object. + void dump (void) const; + + /// Declare the dynamic allocation hooks. + ACE_ALLOC_HOOK_DECLARE; + +private: + /// Linked list of modules that we're dealing with. + const ACE_Static_Node *node_; + const ACE_Parse_Node *mods_; + +private: + ACE_UNIMPLEMENTED_FUNC (ACE_Dummy_Node (const ACE_Dummy_Node&)) + ACE_UNIMPLEMENTED_FUNC (ACE_Dummy_Node& operator= (const ACE_Dummy_Node&)) }; /** @@ -240,15 +315,19 @@ class ACE_Location_Node { public: ACE_Location_Node (void); - virtual void *symbol (int & yyerrno, - ACE_Service_Object_Exterminator * = 0) = 0; - virtual void set_symbol (void *h); const ACE_DLL &dll (void); const ACE_TCHAR *pathname (void) const; void pathname (const ACE_TCHAR *h); int dispose (void) const; virtual ~ACE_Location_Node (void); + virtual void set_symbol (void *h); + + /// Will update the yyerrno member and/or corresponding configuration + /// repository + virtual void *symbol (ACE_Service_Gestalt *cfgptr, + int &yyerrno, + ACE_Service_Object_Exterminator * = 0) = 0; /// Dump the state of an object. void dump (void) const; @@ -274,6 +353,13 @@ protected: /// Symbol that we've obtained from the shared library. void *symbol_; + +private: + ACE_UNIMPLEMENTED_FUNC + (ACE_Location_Node (const ACE_Location_Node&)) + + ACE_UNIMPLEMENTED_FUNC + (ACE_Location_Node& operator= (const ACE_Location_Node&)) }; /** @@ -289,7 +375,8 @@ class ACE_Object_Node : public ACE_Location_Node { public: ACE_Object_Node (const ACE_TCHAR *pathname, const ACE_TCHAR *obj_name); - virtual void *symbol (int & yyerrno, + virtual void *symbol (ACE_Service_Gestalt *config, + int &yyerrno, ACE_Service_Object_Exterminator * = 0); virtual ~ACE_Object_Node (void); @@ -302,6 +389,10 @@ public: private: /// Name of the object that we're parsing. const ACE_TCHAR *object_name_; + +private: + ACE_UNIMPLEMENTED_FUNC (ACE_Object_Node (const ACE_Object_Node&)) + ACE_UNIMPLEMENTED_FUNC (ACE_Object_Node& operator= (const ACE_Object_Node&)) }; /** @@ -317,7 +408,8 @@ class ACE_Function_Node : public ACE_Location_Node { public: ACE_Function_Node (const ACE_TCHAR *pathname, const ACE_TCHAR *func_name); - virtual void *symbol (int & yyerrno, + virtual void *symbol (ACE_Service_Gestalt *config, + int &yyerrno, ACE_Service_Object_Exterminator *gobbler = 0); virtual ~ACE_Function_Node (void); @@ -352,34 +444,13 @@ private: /// Name of the function that we're parsing. const ACE_TCHAR *function_name_; -}; - -/** - * @class ACE_Dummy_Node - * - * @brief I forget why this is here... ;-) - * - * @note This class is only meant for INTERNAL use by ACE. - * - * @internal - */ -class ACE_Dummy_Node : public ACE_Parse_Node -{ -public: - ACE_Dummy_Node (const ACE_Static_Node *, const ACE_Parse_Node *); - ~ACE_Dummy_Node (void); - virtual void apply (int & yyerrno); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; private: - /// Linked list of modules that we're dealing with. - const ACE_Static_Node *node_; - const ACE_Parse_Node *mods_; + ACE_UNIMPLEMENTED_FUNC + (ACE_Function_Node (const ACE_Function_Node&)) + + ACE_UNIMPLEMENTED_FUNC + (ACE_Function_Node& operator= (const ACE_Function_Node&)) }; /** @@ -397,7 +468,8 @@ class ACE_Static_Function_Node : public ACE_Location_Node { public: explicit ACE_Static_Function_Node (const ACE_TCHAR *func_name); - virtual void *symbol (int & yyerrno, + virtual void *symbol (ACE_Service_Gestalt *config, + int &yyerrno, ACE_Service_Object_Exterminator * = 0); virtual ~ACE_Static_Function_Node (void); @@ -410,11 +482,14 @@ public: private: /// Name of the function that we're parsing. const ACE_TCHAR *function_name_; -}; -/// Global variable used to communicate between the parser and the main -/// program. -extern ACE_Service_Config *ace_this_svc; +private: + ACE_UNIMPLEMENTED_FUNC + (ACE_Static_Function_Node (const ACE_Static_Function_Node&)) + + ACE_UNIMPLEMENTED_FUNC + (ACE_Static_Function_Node& operator= (const ACE_Static_Function_Node&)) +}; ACE_END_VERSIONED_NAMESPACE_DECL |