summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-03-27 02:18:38 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-03-27 02:18:38 +0000
commitcd7881146c859823660dd8390c223feec603dbcf (patch)
treec675d0ba5dac821250ab4be9fd956feaf7022036
parent59bb825e8ee58c8cd7bfb007ec69ba34d50ceafc (diff)
downloadATCD-cd7881146c859823660dd8390c223feec603dbcf.tar.gz
Added implementation for <_stubobj> method in the Smart Proxy Base
class
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_cs.cpp16
2 files changed, 21 insertions, 1 deletions
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 01fc2b38d0f..1db4f17c7af 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
@@ -127,7 +127,11 @@ int be_visitor_interface_smart_proxy_ch::visit_interface (be_interface *node)
<< "_ptr proxy);" << be_nl
// Just to keep Old g++ complier (version: 2.7.2.3) happy its necessary
// to declare and define the destructor explicitly.
- << "~TAO_"<< node->flat_name () << "_Smart_Proxy_Base (void);"<<be_uidt_nl;
+ << "~TAO_"<< node->flat_name () << "_Smart_Proxy_Base (void);"<<be_nl
+ // This method will delegate thsi method to the <base_proxy_>
+ // member of the smart proxy and so the smart proxy's (nil)
+ // stubobj will not be returned.
+ << "virtual TAO_Stub *_stubobj (void) const;"<<be_uidt_nl;
// generate code for the interface definition by traversing thru the
// elements of its scope. We depend on the front-end to have made sure
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 573c55c1493..6a0078aa52e 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
@@ -251,6 +251,22 @@ int be_visitor_interface_smart_proxy_cs::visit_interface (be_interface *node)
<< "{" << be_nl
<< "}\n\n";
+ // Implement the <stubobj> method of the base class
+ os->indent ();
+ *os << "TAO_Stub *"<<be_nl;
+ *os << scope->full_name ();
+
+ // Only if there exists any nesting "::" is needed!
+ if (node->is_nested ())
+ *os << "::";
+
+ *os << "TAO_" << node->flat_name () << "_Smart_Proxy_Base::";
+ *os << "_stubobj (void) const"<<be_nl
+ << "{" << be_idt_nl
+ << "return this->base_proxy_->_stubobj ();"<< be_uidt_nl
+ << "}\n\n";
+
+
if (this->visit_scope (node) == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,