diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-01-16 16:53:23 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-01-16 16:53:23 +0000 |
commit | 953c66c5902e0ca903957ce6fa5ac541c218021c (patch) | |
tree | 6d9226d8653830d91635828e257ede60dc0ed889 | |
parent | aae953155ecb34d716afbd5039774e8fd6def06f (diff) | |
download | ATCD-953c66c5902e0ca903957ce6fa5ac541c218021c.tar.gz |
ChangeLogTag: Thu Jan 16 10:52:07 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 17 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp | 13 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp | 102 |
3 files changed, 86 insertions, 46 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index a61728c9000..0e71c6eb99f 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,20 @@ +Thu Jan 16 10:52:07 2003 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp: + * TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp: + + In the generated TAO_*_Proxy_Factory_Adapter class, + changed signatures of register_proxy_factory() and + unregister_proxy_factory() to return void. Error + reporting through return type is not necessary, since + native exceptions or an environment variable are + already used, and there is no code in either of these + methods that sets the return value to anything other + than 0. Although the methods are public, the class + itself has a protected constructor, and the methods + are intended for TAO internal use only. + This closes [BUGID:844]. + Wed Jan 15 18:02:49 2003 Bala <bala@cs.wustl.edu> * TAO version 1.3 released. diff --git a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp index 0f641c0448b..93f474bbf34 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp @@ -89,12 +89,12 @@ int be_visitor_interface_smart_proxy_ch::visit_interface (be_interface *node) << "public:" << be_idt_nl << be_nl << "friend class TAO_Singleton<TAO_" << node->flat_name () << "_Proxy_Factory_Adapter, TAO_SYNCH_RECURSIVE_MUTEX>;" << be_nl << be_nl - << "int register_proxy_factory (" << be_idt << be_idt_nl + << "void register_proxy_factory (" << be_idt << be_idt_nl << "TAO_" << node->flat_name () << "_Default_Proxy_Factory *df,"<< be_nl << "int one_shot_factory = 1" << be_nl << "ACE_ENV_ARG_DECL_WITH_DEFAULTS" << be_uidt_nl << ");" << be_uidt_nl << be_nl - << "int unregister_proxy_factory (" << be_idt << be_idt_nl + << "void unregister_proxy_factory (" << be_idt << be_idt_nl << "ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS" << be_uidt_nl << ");" << be_uidt_nl << be_nl << node->local_name () @@ -116,12 +116,11 @@ int be_visitor_interface_smart_proxy_ch::visit_interface (be_interface *node) << "_Default_Proxy_Factory *proxy_factory_;" << be_nl << "int one_shot_factory_;" << be_nl << "int disable_factory_;"<<be_nl - << "TAO_SYNCH_RECURSIVE_MUTEX lock_;"<<be_nl << be_uidt_nl - << "};\n\n"; - - os->indent (); + << "TAO_SYNCH_RECURSIVE_MUTEX lock_;" << be_uidt_nl + << "};"; - *os << "typedef TAO_Singleton<TAO_"<<node->flat_name () + *os << be_nl << be_nl + << "typedef TAO_Singleton<TAO_"<<node->flat_name () << "_Proxy_Factory_Adapter, TAO_SYNCH_RECURSIVE_MUTEX> TAO_" << node->flat_name ()<< "_PROXY_FACTORY_ADAPTER;"<<be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp index 0f9bf904793..0c22d6df611 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp @@ -54,11 +54,14 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node) // are in the same scope as the proxy. be_decl* scope = be_scope::narrow_from_scope (node->defined_in ())->decl (); - *os << scope->full_name (); + *os << be_nl << be_nl + << scope->full_name (); // Only if there exists any nesting "::" is needed! if (node->is_nested ()) - *os << "::"; + { + *os << "::"; + } *os <<"TAO_"<< node->flat_name () << "_Default_Proxy_Factory::"; *os << "TAO_" @@ -108,15 +111,17 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node) // Only if there exists any nesting "::" is needed! if (node->is_nested ()) - *os << "::"; + { + *os << "::"; + } *os << "TAO_" << node->flat_name () << "_Proxy_Factory_Adapter::"; *os << "TAO_" - << node->flat_name () << "_Proxy_Factory_Adapter (void)" <<be_idt_nl - << " : proxy_factory_ (0)," << be_idt_nl - << " one_shot_factory_ (0)," <<be_nl - << " disable_factory_ (0)"<<be_uidt << be_uidt_nl - << "{"<< be_nl + << node->flat_name () << "_Proxy_Factory_Adapter (void)" << be_idt_nl + << ": proxy_factory_ (0)," << be_idt_nl + << "one_shot_factory_ (0)," << be_nl + << "disable_factory_ (0)" << be_uidt << be_uidt_nl + << "{" << be_nl << "}\n\n"; os->indent (); @@ -124,45 +129,57 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node) // Only if there exists any nesting "::" is needed! if (node->is_nested ()) - *os << "::"; + { + *os << "::"; + } *os << "TAO_" << node->flat_name () << "_Proxy_Factory_Adapter::"; *os << "~TAO_" - << node->flat_name () << "_Proxy_Factory_Adapter (void)" <<be_nl + << node->flat_name () << "_Proxy_Factory_Adapter (void)" << be_nl << "{" << be_idt_nl - << "// Making sure the factory which the adapter has is destroyed with it."<<be_nl - << "if (this->proxy_factory_ != 0)" <<be_idt_nl - << "delete this->proxy_factory_;" << be_uidt<<be_uidt_nl + << "// Making sure the factory which the adapter" + << " has is destroyed with it." + << be_nl + << "if (this->proxy_factory_ != 0)" << be_idt_nl + << "{" << be_idt_nl + << "delete this->proxy_factory_;" << be_uidt_nl + << "}" << be_uidt << be_uidt_nl << "}\n\n"; os->indent (); - *os << "int" << be_nl; + *os << "void" << be_nl; *os << scope->full_name (); // Only if there exists any nesting "::" is needed! if (node->is_nested ()) - *os << "::"; + { + *os << "::"; + } + *os << "TAO_" << node->flat_name () - << "_Proxy_Factory_Adapter::register_proxy_factory (" << be_idt_nl + << "_Proxy_Factory_Adapter::register_proxy_factory (" << be_idt << be_idt_nl << "TAO_" << node->flat_name () - << "_Default_Proxy_Factory *df," << be_idt_nl - << " int one_shot_factory" << be_nl - << " ACE_ENV_ARG_DECL" << be_idt_nl - << ")" << be_uidt << be_uidt << be_uidt_nl + << "_Default_Proxy_Factory *df," << be_nl + << "int one_shot_factory" << be_nl + << "ACE_ENV_ARG_DECL" << be_uidt_nl + << ")" << be_uidt << be_uidt_nl << "{" << be_idt_nl - << "ACE_MT (ACE_GUARD_RETURN (" - << "TAO_SYNCH_RECURSIVE_MUTEX, ace_mon," << be_idt_nl - << "this->lock_, 0));" <<be_uidt_nl - << "// Remove any existing <proxy_factory_> and replace with the new one."<<be_nl + << "ACE_MT (" << be_idt << be_idt_nl + << "ACE_GUARD (" << be_idt << be_idt_nl + << "TAO_SYNCH_RECURSIVE_MUTEX," << be_nl + << "ace_mon," << be_nl + << "this->lock_" << be_uidt_nl + << ")" << be_uidt << be_uidt_nl + << ");" <<be_uidt_nl << be_nl + << "// Remove any existing <proxy_factory_> and replace with the new one." << be_nl << "this->unregister_proxy_factory (ACE_ENV_SINGLE_ARG_PARAMETER);" << be_nl - << "ACE_CHECK_RETURN (-1);" << be_nl - << "this->proxy_factory_ = df;"<< be_nl - << "this->one_shot_factory_ = one_shot_factory;" << be_uidt << be_uidt_nl - << "return 0;" << be_uidt << be_uidt_nl + << "ACE_CHECK;" << be_nl + << "this->proxy_factory_ = df;" << be_nl + << "this->one_shot_factory_ = one_shot_factory;" << be_uidt_nl << "}\n\n"; os->indent (); - *os << "int" << be_nl; + *os << "void" << be_nl; *os << scope->full_name (); // Only if there exists any nesting "::" is needed! @@ -170,23 +187,30 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node) *os << "::"; *os << "TAO_"<< node->flat_name () - << "_Proxy_Factory_Adapter::unregister_proxy_factory (" << be_idt_nl - << "ACE_ENV_SINGLE_ARG_DECL_NOT_USED" << be_idt_nl + << "_Proxy_Factory_Adapter::unregister_proxy_factory (" + << be_idt << be_idt_nl + << "ACE_ENV_SINGLE_ARG_DECL_NOT_USED" << be_uidt_nl + << ")" << be_uidt_nl + << "{" << be_idt_nl + << "ACE_MT (" << be_idt << be_idt_nl + << "ACE_GUARD (" << be_idt << be_idt_nl + << "TAO_SYNCH_RECURSIVE_MUTEX," << be_nl + << "ace_mon," << be_nl + << "this->lock_" << be_uidt_nl << ")" << be_uidt << be_uidt_nl + << ");" <<be_uidt_nl << be_nl + << "if (this->one_shot_factory_ == 1)" << be_idt_nl << "{" << be_idt_nl - << "ACE_MT (ACE_GUARD_RETURN (" - << "TAO_SYNCH_RECURSIVE_MUTEX, ace_mon," << be_idt_nl - << "this->lock_, 0));" <<be_uidt_nl - << "if (this->one_shot_factory_ == 1)"<<be_idt_nl - << "this->disable_factory_ = 1;"<<be_uidt_nl <<be_nl + << "this->disable_factory_ = 1;" << be_uidt_nl + << "}" << be_uidt_nl << be_nl << "if (" - << "this->one_shot_factory_ == 0 && this->proxy_factory_ != 0)" << be_idt_nl + << "this->one_shot_factory_ == 0 && this->proxy_factory_ != 0)" + << be_idt_nl << "{" << be_idt_nl << "delete " << "this->proxy_factory_;" << be_nl << "this->proxy_factory_ = 0;" << be_uidt_nl - << "}" << be_uidt<<be_uidt_nl - << "return 0;" << be_uidt << be_uidt_nl + << "}" << be_uidt << be_uidt_nl << "}\n\n"; os->indent (); |