summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp31
1 files changed, 19 insertions, 12 deletions
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 0c57077fdff..4c4c41b8013 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
@@ -97,7 +97,7 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node)
*os << "TAO_" << node->flat_name ()
<< "_Default_Proxy_Factory::create_proxy (" << be_idt << be_idt_nl
<< "::" << node->full_name ()
- << "_ptr proxy" << be_uidt_nl
+ << "_ptr proxy" << env_not << be_uidt_nl
<< ")" << be_uidt << be_uidt_nl
<< "{" << be_idt_nl
<< "return proxy;" << be_uidt_nl
@@ -116,8 +116,8 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node)
*os << "TAO_"
<< node->flat_name () << "_Proxy_Factory_Adapter (void)" << be_idt_nl
<< ": proxy_factory_ (0)," << be_idt_nl
- << "one_shot_factory_ (false)," << be_nl
- << "disable_factory_ (false)" << be_uidt << be_uidt_nl
+ << "one_shot_factory_ (0)," << be_nl
+ << "disable_factory_ (0)" << be_uidt << be_uidt_nl
<< "{" << be_nl
<< "}\n\n";
@@ -157,7 +157,7 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node)
<< "_Proxy_Factory_Adapter::register_proxy_factory (" << be_idt << be_idt_nl
<< "TAO_" << node->flat_name ()
<< "_Default_Proxy_Factory *df," << be_nl
- << "bool one_shot_factory" << be_uidt_nl
+ << "int one_shot_factory" << env_decl << be_uidt_nl
<< ")" << be_uidt << be_uidt_nl
<< "{" << be_idt_nl
<< "ACE_MT (" << be_idt << be_idt_nl
@@ -169,7 +169,11 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node)
<< ");" <<be_uidt_nl << be_nl
<< "// Remove any existing <proxy_factory_> and "
<< "replace with the new one." << be_nl
- << "this->unregister_proxy_factory ();" << be_nl
+ << "this->unregister_proxy_factory ("
+ << (be_global->use_raw_throw ()
+ ? ""
+ : "ACE_ENV_SINGLE_ARG_PARAMETER")
+ << ");" << TAO_ACE_CHECK () << be_nl
<< "this->proxy_factory_ = df;" << be_nl
<< "this->one_shot_factory_ = one_shot_factory;" << be_uidt_nl
<< "}\n\n";
@@ -183,7 +187,10 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node)
*os << "::";
*os << "TAO_"<< node->flat_name ()
- << "_Proxy_Factory_Adapter::unregister_proxy_factory (void)" << be_nl
+ << "_Proxy_Factory_Adapter::unregister_proxy_factory ("
+ << be_idt << be_idt
+ << env_sngl_not << be_uidt_nl
+ << ")" << be_uidt_nl
<< "{" << be_idt_nl
<< "ACE_MT (" << be_idt << be_idt_nl
<< "ACE_GUARD (" << be_idt << be_idt_nl
@@ -192,12 +199,12 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node)
<< "this->lock_" << be_uidt_nl
<< ")" << be_uidt << be_uidt_nl
<< ");" <<be_uidt_nl << be_nl
- << "if (this->one_shot_factory_)" << be_idt_nl
+ << "if (this->one_shot_factory_ == 1)" << be_idt_nl
<< "{" << be_idt_nl
- << "this->disable_factory_ = true;" << be_uidt_nl
+ << "this->disable_factory_ = 1;" << be_uidt_nl
<< "}" << be_uidt_nl << be_nl
<< "if ("
- << "this->one_shot_factory_ == false && this->proxy_factory_ != 0)"
+ << "this->one_shot_factory_ == 0 && this->proxy_factory_ != 0)"
<< be_idt_nl
<< "{" << be_idt_nl
<< "delete "
@@ -217,7 +224,7 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node)
*os << "TAO_"<< node->flat_name ()
<< "_Proxy_Factory_Adapter::create_proxy (" << be_idt << be_idt_nl
<< "::" << node->full_name ()
- << "_ptr proxy" << be_uidt_nl
+ << "_ptr proxy" << env_not << be_uidt_nl
<< ")" << be_uidt << be_uidt_nl
<< "{" << be_idt_nl
<< "ACE_MT (ACE_GUARD_RETURN ("
@@ -225,9 +232,9 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node)
<< "this->lock_, 0));" << be_uidt_nl << be_nl
<< "// To take care of those <unchecked_narrow> methods where we " << be_nl
<< "// want to override the smart proxy factory if there exists one." << be_nl
- << "if (this->disable_factory_)" << be_idt_nl
+ << "if (this->disable_factory_ == 1)" << be_idt_nl
<< "{" << be_idt_nl
- << "this->disable_factory_ = false;" << be_nl
+ << "this->disable_factory_ = 0;" << be_nl
<< "return proxy;" << be_uidt_nl
<< "}" << be_uidt_nl << be_nl
<< "// Verify that an <proxy_factory_> is available else make one." << be_nl