summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp33
1 files changed, 25 insertions, 8 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
index f864979a317..6cac3b27f78 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp
@@ -749,11 +749,34 @@ be_visitor_interface_cs::gen_concrete_unchecked_narrow (be_interface *node,
<< "::_nil ();" << be_uidt_nl
<< "}" << be_uidt_nl << be_nl;
+ // Declare the default proxy.
+ *os << bt->nested_type_name (this->ctx_->scope ())
+ << "_ptr default_proxy = "
+ << bt->nested_type_name (this->ctx_->scope ())
+ <<"::_nil ();" << be_nl << be_nl;
+
+
+ // Code for lzay evaluation..
+ *os << "// Code for lazily evaluated IOR's" << be_nl;
+
+ *os << "if (!obj->is_evaluated ())" << be_idt_nl
+ << "{" << be_idt_nl
+ << "ACE_NEW_RETURN (" << be_idt << be_idt_nl
+ << "default_proxy," << be_nl
+ << "::" << bt->name ()
+ << " (" << be_idt << be_idt_nl
+ << "obj->steal_ior ()," << be_nl
+ << "obj->orb_core ()" << be_uidt_nl << ")," << be_uidt_nl
+ << bt->nested_type_name (this->ctx_->scope ())
+ << "::_nil ()" << be_uidt_nl << ");"
+ << "return default_proxy;" << be_nl
+ << be_uidt << be_uidt_nl
+ << "}" << be_uidt_nl << be_nl;
+
if (! node->is_local ())
{
// Remote _unchecked_narrow implementation.
- *os << "if (! obj->_is_local () &&" << be_idt_nl
- << "obj->is_evaluated ())" << be_idt_nl
+ *os << "if (! obj->_is_local ())" << be_idt_nl
<< "{" << be_idt_nl
<< "TAO_Stub* stub = obj->_stubobj ();" << be_nl << be_nl
<< "if (stub != 0)" << be_idt_nl
@@ -761,12 +784,6 @@ be_visitor_interface_cs::gen_concrete_unchecked_narrow (be_interface *node,
<< "stub->_incr_refcnt ();" << be_uidt_nl
<< "}" << be_uidt_nl << be_nl;
- // Declare the default proxy.
- *os << bt->nested_type_name (this->ctx_->scope ())
- << "_ptr default_proxy = "
- << bt->nested_type_name (this->ctx_->scope ())
- <<"::_nil ();" << be_nl << be_nl;
-
// If the policy didtates that the proxy be collocated, use the
// function to create one.
*os << "if (" << be_idt << be_idt_nl