summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
index cd511a70aef..3a15ff9d5a6 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp
@@ -115,6 +115,35 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
<< ");" << be_uidt << be_uidt << be_uidt_nl
<< "}";
+ // Since we don't generate CDR stream operators for types that
+ // explicitly contain a local interface (at some level), we
+ // must override these Any template class methods to avoid
+ // calling the non-existent operators. The zero return value
+ // will eventually cause CORBA::MARSHAL to be raised if this
+ // type is inserted into an Any and then marshaled.
+ if (node->is_local ())
+ {
+ TAO_OutStream *os = this->ctx_->stream ();
+
+ *os << be_nl << be_nl
+ << "ACE_TEMPLATE_SPECIALIZATION" << be_nl
+ << "CORBA::Boolean" << be_nl
+ << "TAO::Any_Dual_Impl_T<" << node->name ()
+ << ">::marshal_value (TAO_OutputCDR &)" << be_nl
+ << "{" << be_idt_nl
+ << "return 0;" << be_uidt_nl
+ << "}";
+
+ *os << be_nl << be_nl
+ << "ACE_TEMPLATE_SPECIALIZATION" << be_nl
+ << "CORBA::Boolean" << be_nl
+ << "TAO::Any_Dual_Impl_T<" << node->name ()
+ << ">::demarshal_value (TAO_InputCDR &)" << be_nl
+ << "{" << be_idt_nl
+ << "return 0;" << be_uidt_nl
+ << "}";
+ }
+
node->cli_stub_any_op_gen (1);
return 0;
}