diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-07-30 16:11:07 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-07-30 16:11:07 +0000 |
commit | 3dcafce4e48f7ddb7bc7145b1bf25682c140e93c (patch) | |
tree | fb86552a5726a43cb41a6894c0614bb6aa2dcc42 /ace/Parse_Node.cpp | |
parent | d6ece668bd564af127bea917b0c545bf456c39e4 (diff) | |
download | ATCD-3dcafce4e48f7ddb7bc7145b1bf25682c140e93c.tar.gz |
ChangeLogTag:Tue Jul 30 09:07:29 2002 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'ace/Parse_Node.cpp')
-rw-r--r-- | ace/Parse_Node.cpp | 117 |
1 files changed, 61 insertions, 56 deletions
diff --git a/ace/Parse_Node.cpp b/ace/Parse_Node.cpp index 45d863740bf..873a883839e 100644 --- a/ace/Parse_Node.cpp +++ b/ace/Parse_Node.cpp @@ -1,21 +1,26 @@ -// $Id$ +#include "ace/Parse_Node.h" + +#if (ACE_USES_CLASSIC_SVC_CONF == 1) #include "ace/Service_Config.h" #include "ace/Service_Repository.h" #include "ace/Task.h" -#include "ace/Parse_Node.h" - -// Provide the class hierarchy that defines the parse tree of Service -// Nodes. -#if (ACE_USES_CLASSIC_SVC_CONF == 1) #if !defined (__ACE_INLINE__) #include "ace/Parse_Node.i" #endif /* ____ */ -ACE_RCSID(ace, Parse_Node, "$Id$") -ACE_ALLOC_HOOK_DEFINE(ACE_Stream_Node) +ACE_RCSID (ace, + Parse_Node, + "$Id$") + + +ACE_ALLOC_HOOK_DEFINE (ACE_Stream_Node) + +// Provide the class hierarchy that defines the parse tree of Service +// Nodes. + void ACE_Stream_Node::dump (void) const @@ -24,22 +29,22 @@ ACE_Stream_Node::dump (void) const } void -ACE_Stream_Node::apply (void) +ACE_Stream_Node::apply (int & yyerrno) { ACE_TRACE ("ACE_Stream_Node::apply"); if (ACE_Service_Config::initialize (this->node_->record (), this->node_->parameters ()) == -1) - ace_yyerrno++; + yyerrno++; if (ACE::debug ()) ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("did stream on %s, error = %d\n"), this->node_->name (), - ace_yyerrno)); + yyerrno)); } -ACE_ALLOC_HOOK_DEFINE(ACE_Parse_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Parse_Node) void ACE_Parse_Node::dump (void) const @@ -132,7 +137,7 @@ ACE_Parse_Node::~ACE_Parse_Node (void) delete this->next_; } -ACE_ALLOC_HOOK_DEFINE(ACE_Suspend_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Suspend_Node) void ACE_Suspend_Node::dump (void) const @@ -146,7 +151,7 @@ ACE_Suspend_Node::ACE_Suspend_Node (const ACE_TCHAR *name) ACE_TRACE ("ACE_Suspend_Node::ACE_Suspend_Node"); } -ACE_ALLOC_HOOK_DEFINE(ACE_Resume_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Resume_Node) void ACE_Resume_Node::dump (void) const @@ -161,35 +166,35 @@ ACE_Resume_Node::ACE_Resume_Node (const ACE_TCHAR *name) } void -ACE_Suspend_Node::apply (void) +ACE_Suspend_Node::apply (int & yyerrno) { ACE_TRACE ("ACE_Suspend_Node::apply"); if (ACE_Service_Config::suspend (this->name ()) == -1) - ace_yyerrno++; + yyerrno++; if (ACE::debug ()) ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("did suspend on %s, error = %d\n"), this->name (), - ace_yyerrno)); + yyerrno)); } void -ACE_Resume_Node::apply (void) +ACE_Resume_Node::apply (int & yyerrno) { ACE_TRACE ("ACE_Resume_Node::apply"); if (ACE_Service_Config::resume (this->name ()) == -1) - ace_yyerrno++; + yyerrno++; if (ACE::debug ()) ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("did resume on %s, error = %d\n"), this->name (), - ace_yyerrno)); + yyerrno)); } -ACE_ALLOC_HOOK_DEFINE(ACE_Remove_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Remove_Node) void ACE_Remove_Node::dump (void) const @@ -204,17 +209,17 @@ ACE_Remove_Node::ACE_Remove_Node (const ACE_TCHAR *name) } void -ACE_Remove_Node::apply (void) +ACE_Remove_Node::apply (int & yyerrno) { ACE_TRACE ("ACE_Remove_Node::apply"); if (ACE_Service_Config::remove (this->name ()) == -1) - ace_yyerrno++; + yyerrno++; if (ACE::debug ()) ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("did remove on %s, error = %d\n"), this->name (), - ace_yyerrno)); + yyerrno)); } ACE_Dynamic_Node::ACE_Dynamic_Node (const ACE_Service_Type *sr, @@ -233,22 +238,22 @@ ACE_Dynamic_Node::record (void) const } void -ACE_Dynamic_Node::apply (void) +ACE_Dynamic_Node::apply (int & yyerrno) { ACE_TRACE ("ACE_Dynamic_Node::apply"); if (ACE_Service_Config::initialize (this->record (), this->parameters ()) == -1) - ace_yyerrno++; + yyerrno++; if (ACE::debug ()) ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("did dynamic on %s, error = %d\n"), this->name (), - ace_yyerrno)); + yyerrno)); } -ACE_ALLOC_HOOK_DEFINE(ACE_Dynamic_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Dynamic_Node) void ACE_Dynamic_Node::dump (void) const @@ -261,7 +266,7 @@ ACE_Dynamic_Node::~ACE_Dynamic_Node (void) ACE_TRACE ("ACE_Dynamic_Node::~ACE_Dynamic_Node"); } -ACE_ALLOC_HOOK_DEFINE(ACE_Static_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Static_Node) void ACE_Static_Node::dump (void) const @@ -299,18 +304,18 @@ ACE_Static_Node::parameters (void) const } void -ACE_Static_Node::apply (void) +ACE_Static_Node::apply (int & yyerrno) { ACE_TRACE ("ACE_Static_Node::apply"); if (ACE_Service_Config::initialize (this->name (), this->parameters ()) == -1) - ace_yyerrno++; + yyerrno++; if (ACE::debug ()) ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("did static on %s, error = %d\n"), this->name (), - ace_yyerrno)); + yyerrno)); } ACE_Static_Node::~ACE_Static_Node (void) @@ -319,7 +324,7 @@ ACE_Static_Node::~ACE_Static_Node (void) delete[] this->parameters_; } -ACE_ALLOC_HOOK_DEFINE(ACE_Location_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Location_Node) void ACE_Location_Node::dump (void) const @@ -374,13 +379,13 @@ ACE_Location_Node::dispose (void) const } int -ACE_Location_Node::open_dll (void) +ACE_Location_Node::open_dll (int & yyerrno) { ACE_TRACE ("ACE_Location_Node::open_dll"); if (-1 == this->dll_.open (this->pathname ())) { - ace_yyerrno++; + yyerrno++; ACE_TCHAR *errmsg = this->dll_.error (); ACE_ERROR ((LM_ERROR, @@ -394,7 +399,7 @@ ACE_Location_Node::open_dll (void) } -ACE_ALLOC_HOOK_DEFINE(ACE_Object_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Object_Node) void ACE_Object_Node::dump (void) const @@ -412,17 +417,18 @@ ACE_Object_Node::ACE_Object_Node (const ACE_TCHAR *path, } void * -ACE_Object_Node::symbol (ACE_Service_Object_Exterminator *) +ACE_Object_Node::symbol (int & yyerrno, + ACE_Service_Object_Exterminator *) { ACE_TRACE ("ACE_Object_Node::symbol"); - if (this->open_dll () == 0) + if (this->open_dll (yyerrno) == 0) { ACE_TCHAR *object_name = ACE_const_cast (ACE_TCHAR *, this->object_name_); this->symbol_ = this->dll_.symbol (object_name); if (this->symbol_ == 0) { - ace_yyerrno++; + yyerrno++; ACE_TCHAR *errmsg = this->dll_.error (); ACE_ERROR ((LM_ERROR, @@ -444,7 +450,7 @@ ACE_Object_Node::~ACE_Object_Node (void) delete[] ACE_const_cast (ACE_TCHAR *, this->object_name_); } -ACE_ALLOC_HOOK_DEFINE(ACE_Function_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Function_Node) void ACE_Function_Node::dump (void) const @@ -462,13 +468,14 @@ ACE_Function_Node::ACE_Function_Node (const ACE_TCHAR *path, } void * -ACE_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler) +ACE_Function_Node::symbol (int & yyerrno, + ACE_Service_Object_Exterminator *gobbler) { typedef ACE_Service_Object *(*ACE_Service_Factory_Ptr) (ACE_Service_Object_Exterminator *); ACE_TRACE ("ACE_Function_Node::symbol"); - if (this->open_dll () == 0) + if (this->open_dll (yyerrno) == 0) { ACE_Service_Factory_Ptr func = 0; this->symbol_ = 0; @@ -480,11 +487,11 @@ ACE_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler) void *func_p = this->dll_.symbol (function_name); if (func_p == 0) { - ace_yyerrno++; + yyerrno++; if (this->symbol_ == 0) { - ace_yyerrno++; + yyerrno++; ACE_TCHAR *errmsg = this->dll_.error (); ACE_ERROR ((LM_ERROR, @@ -502,7 +509,7 @@ ACE_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler) if (this->symbol_ == 0) { - ace_yyerrno++; + yyerrno++; ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), this->function_name_), @@ -519,7 +526,7 @@ ACE_Function_Node::~ACE_Function_Node (void) delete[] ACE_const_cast (ACE_TCHAR *, pathname_); } -ACE_ALLOC_HOOK_DEFINE(ACE_Dummy_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Dummy_Node) void ACE_Dummy_Node::dump (void) const @@ -537,7 +544,7 @@ ACE_Dummy_Node::ACE_Dummy_Node (const ACE_Static_Node *static_node, } void -ACE_Dummy_Node::apply (void) +ACE_Dummy_Node::apply (int & yyerrno) { ACE_TRACE ("ACE_Dummy_Node::apply"); @@ -545,7 +552,7 @@ ACE_Dummy_Node::apply (void) ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("did operations on stream %s, error = %d\n"), this->name (), - ace_yyerrno)); + yyerrno)); } ACE_Dummy_Node::~ACE_Dummy_Node (void) @@ -559,7 +566,7 @@ ACE_Dummy_Node::~ACE_Dummy_Node (void) delete m; } -ACE_ALLOC_HOOK_DEFINE(ACE_Static_Function_Node) +ACE_ALLOC_HOOK_DEFINE (ACE_Static_Function_Node) void ACE_Static_Function_Node::dump (void) const @@ -575,7 +582,8 @@ ACE_Static_Function_Node::ACE_Static_Function_Node (const ACE_TCHAR *func_name) } void * -ACE_Static_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler) +ACE_Static_Function_Node::symbol (int & yyerrno, + ACE_Service_Object_Exterminator *gobbler) { ACE_TRACE ("ACE_Static_Function_Node::symbol"); @@ -601,11 +609,11 @@ ACE_Static_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler) if (func == 0) { - ace_yyerrno++; + yyerrno++; if (this->symbol_ == 0) { - ace_yyerrno++; + yyerrno++; ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("no static service registered for function %s\n"), @@ -619,7 +627,7 @@ ACE_Static_Function_Node::symbol (ACE_Service_Object_Exterminator *gobbler) if (this->symbol_ == 0) { - ace_yyerrno++; + yyerrno++; ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("%p\n"), this->function_name_), @@ -635,7 +643,4 @@ ACE_Static_Function_Node::~ACE_Static_Function_Node (void) delete[] ACE_const_cast (ACE_TCHAR *, this->function_name_); } -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ #endif /* ACE_USES_CLASSIC_SVC_CONF == 1 */ |