summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp10
-rw-r--r--TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp5
-rw-r--r--TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp11
-rw-r--r--TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp12
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp12
7 files changed, 38 insertions, 36 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp
index 2a9c2fb903b..3a71d919239 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp
@@ -61,13 +61,14 @@ be_visitor_array_any_op_cs::visit_array (be_array *node)
<< "else // copy" << be_idt_nl
<< "_tao_any.replace (" << node->tc_name () << ", " << node->name ()
<< "_dup (_tao_elem.ptr ()), 1, _tao_env);" << be_uidt_nl
- << be_uidt_nl << "}" << be_nl;
+ << be_uidt_nl << "}\n" << be_nl;
*os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, "
<< node->name () << "_forany &_tao_elem)" << be_nl
<< "{" << be_idt_nl
<< "CORBA::Environment _tao_env;" << be_nl
- << "if (!_tao_any.type ()->equal (" << node->tc_name ()
+ << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl
+ << "if (!type->equal (" << node->tc_name ()
<< ", _tao_env)) return 0; // not equal" << be_nl
<< "if (_tao_any.any_owns_data ())" << be_nl
<< "{" << be_idt_nl
@@ -80,9 +81,8 @@ be_visitor_array_any_op_cs::visit_array (be_array *node)
<< ", _tao_elem_ptr, 0, _tao_env)" << be_nl
<< " == CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_nl
<< "{" << be_idt_nl
- << "((CORBA::Any *)&_tao_any)->replace (_tao_any.type (), "
- << "_tao_elem_ptr, 1, _tao_env);"
- << be_nl
+ << "((CORBA::Any *)&_tao_any)->replace ("
+ << node->tc_name () << ", _tao_elem_ptr, 1, _tao_env);" << be_nl
<< " return 1;" << be_uidt_nl
<< "}" << be_nl
<< "else" << be_nl // decode failed
diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp
index e24522eef1a..0f05d7e5c3e 100644
--- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp
@@ -56,13 +56,14 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node)
<< "CORBA::Environment _tao_env;" << be_nl
<< "_tao_any.replace (" << node->tc_name () << ", new "
<< node->name () << "(_tao_elem), 1, _tao_env);" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, "
<< node->name () << " &_tao_elem)" << be_nl
<< "{" << be_idt_nl
<< "CORBA::Environment _tao_env;" << be_nl
- << "if (!_tao_any.type ()->equal (" << node->tc_name ()
+ << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl
+ << "if (!type->equal (" << node->tc_name ()
<< ", _tao_env)) return 0; // not equal" << be_nl
<< "TAO_InputCDR stream ((ACE_Message_Block *)_tao_any.value ());"
<< be_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp
index 652f7c991d7..6d2850202c9 100644
--- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp
@@ -57,7 +57,7 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node)
<< "CORBA::Environment _tao_env;" << be_nl
<< "_tao_any.replace (" << node->tc_name () << ", new "
<< node->name () << "(_tao_elem), 1, _tao_env);" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "void operator<<= (CORBA::Any &_tao_any, "
<< node->name () << " *_tao_elem) // non copying" << be_nl
@@ -65,13 +65,14 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node)
<< "CORBA::Environment _tao_env;" << be_nl
<< "_tao_any.replace (" << node->tc_name () << ", "
<< "_tao_elem, 1, _tao_env); // consume it" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, "
<< node->name () << " *&_tao_elem)" << be_nl
<< "{" << be_idt_nl
<< "CORBA::Environment _tao_env;" << be_nl
- << "if (!_tao_any.type ()->equal (" << node->tc_name ()
+ << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl
+ << "if (!type->equal (" << node->tc_name ()
<< ", _tao_env)) return 0; // not equal" << be_nl
<< "if (_tao_any.any_owns_data ())" << be_nl
<< "{" << be_idt_nl
@@ -83,9 +84,8 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node)
<< ", _tao_elem, 0, _tao_env)" << be_nl
<< " == CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_nl
<< "{" << be_idt_nl
- << "((CORBA::Any *)&_tao_any)->replace (_tao_any.type (), "
- << "_tao_elem, 1, _tao_env);"
- << be_nl
+ << "((CORBA::Any *)&_tao_any)->replace ("
+ << node->tc_name () << ", _tao_elem, 1, _tao_env);" << be_nl
<< " return 1;" << be_uidt_nl
<< "}" << be_nl
<< "else" << be_nl // decode failed
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
index 0fd468600e8..f6b5520587c 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp
@@ -62,7 +62,7 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node)
<< "::_duplicate (_tao_elem);" << be_nl
<< "_tao_any.replace (" << node->tc_name () << ", "
<< "_tao_obj_ptr, 1, _tao_env);" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "void operator<<= (CORBA::Any &_tao_any, "
<< node->name () << "_ptr *_tao_elem) // non copying" << be_nl
@@ -70,14 +70,15 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node)
<< "CORBA::Environment _tao_env;" << be_nl
<< "_tao_any.replace (" << node->tc_name () << ", "
<< "_tao_elem, 1, _tao_env); // consume it" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, "
<< node->name () << "_ptr &_tao_elem)" << be_nl
<< "{" << be_idt_nl
<< "CORBA::Environment _tao_env;" << be_nl
<< "_tao_elem = " << node->name () << "::_nil ();" << be_nl
- << "if (!_tao_any.type ()->equal (" << node->tc_name ()
+ << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl
+ << "if (!type->equal (" << node->tc_name ()
<< ", _tao_env)) return 0; // not equal" << be_nl
<< "TAO_InputCDR stream ((ACE_Message_Block *)_tao_any.value ());"
<< be_nl
@@ -92,9 +93,8 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node)
<< "if (_tao_env.exception ()) return 0; // narrow failed" << be_nl
<< "CORBA::release (*_tao_obj_ptr);" << be_nl
<< "*_tao_obj_ptr = _tao_elem;" << be_nl
- << "((CORBA::Any *)&_tao_any)->replace (_tao_any.type (), "
- << "_tao_obj_ptr, 1, _tao_env);"
- << be_nl
+ << "((CORBA::Any *)&_tao_any)->replace ("
+ << node->tc_name () << ", _tao_obj_ptr, 1, _tao_env);" << be_nl
<< "if (_tao_env.exception ()) return 0; // narrow failed" << be_nl
<< "return 1;" << be_uidt_nl
<< "}" << be_nl
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 1533b67856c..a2985a8bb25 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
@@ -57,7 +57,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
<< "_tao_any.replace (" << node->tc_name () << ", new "
<< node->name () << "(_tao_elem), 1, _tao_env);"
<< " // copy the value" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "void operator<<= (CORBA::Any &_tao_any, "
<< node->name () << " *_tao_elem) // non copying" << be_nl
@@ -65,13 +65,14 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
<< "CORBA::Environment _tao_env;" << be_nl
<< "_tao_any.replace (" << node->tc_name () << ", "
<< "_tao_elem, 0, _tao_env);" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, "
<< node->name () << " *&_tao_elem)" << be_nl
<< "{" << be_idt_nl
<< "CORBA::Environment _tao_env;" << be_nl
- << "if (!_tao_any.type ()->equal (" << node->tc_name ()
+ << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl
+ << "if (!type->equal (" << node->tc_name ()
<< ", _tao_env)) return 0; // not equal" << be_nl
<< "if (_tao_any.any_owns_data ())" << be_nl
<< "{" << be_idt_nl
@@ -83,8 +84,8 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node)
<< ", _tao_elem, 0, _tao_env)" << be_nl
<< " == CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_nl
<< "{" << be_idt_nl
- << "((CORBA::Any *)&_tao_any)->replace (_tao_any.type (), "
- << "_tao_elem, 1, _tao_env);"
+ << "((CORBA::Any *)&_tao_any)->replace ("
+ << node->tc_name () << ", _tao_elem, 1, _tao_env);"
<< be_nl
<< " return 1;" << be_uidt_nl
<< "}" << be_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp
index 43078696baa..c1f5c82f0ff 100644
--- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp
@@ -58,7 +58,7 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node)
<< "_tao_any.replace (" << node->tc_name () << ", new "
<< node->name () << "(_tao_elem), 1, _tao_env);"
<< " // copy the value" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "void operator<<= (CORBA::Any &_tao_any, "
<< node->name () << " *_tao_elem) // non copying" << be_nl
@@ -66,13 +66,14 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node)
<< "CORBA::Environment _tao_env;" << be_nl
<< "_tao_any.replace (" << node->tc_name () << ", "
<< "_tao_elem, 1, _tao_env); // consume it" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, "
<< node->name () << " *&_tao_elem)" << be_nl
<< "{" << be_idt_nl
<< "CORBA::Environment _tao_env;" << be_nl
- << "if (!_tao_any.type ()->equal (" << node->tc_name ()
+ << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl
+ << "if (!type->equal (" << node->tc_name ()
<< ", _tao_env)) return 0; // not equal" << be_nl
<< "if (_tao_any.any_owns_data ())" << be_nl
<< "{" << be_idt_nl
@@ -84,9 +85,8 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node)
<< ", _tao_elem, 0, _tao_env)" << be_nl
<< " == CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_nl
<< "{" << be_idt_nl
- << "((CORBA::Any *)&_tao_any)->replace (_tao_any.type (), "
- << "_tao_elem, 1, _tao_env);"
- << be_nl
+ << "((CORBA::Any *)&_tao_any)->replace ("
+ << node->tc_name () << ", _tao_elem, 1, _tao_env);" << be_nl
<< " return 1;" << be_uidt_nl
<< "}" << be_nl
<< "else" << be_nl // decode failed
diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp
index 78e2fca68d3..ac5b5aeb2ab 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp
@@ -56,7 +56,7 @@ be_visitor_union_any_op_cs::visit_union (be_union *node)
<< "CORBA::Environment _tao_env;" << be_nl
<< "_tao_any.replace (" << node->tc_name () << ", new "
<< node->name () << "(_tao_elem), 1, _tao_env);" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "void operator<<= (CORBA::Any &_tao_any, "
<< node->name () << " *_tao_elem) // non copying" << be_nl
@@ -64,13 +64,14 @@ be_visitor_union_any_op_cs::visit_union (be_union *node)
<< "CORBA::Environment _tao_env;" << be_nl
<< "_tao_any.replace (" << node->tc_name () << ", "
<< "_tao_elem, 1, _tao_env); // consume it" << be_uidt_nl
- << "}" << be_nl;
+ << "}\n" << be_nl;
*os << "CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, "
<< node->name () << " *&_tao_elem)" << be_nl
<< "{" << be_idt_nl
<< "CORBA::Environment _tao_env;" << be_nl
- << "if (!_tao_any.type ()->equal (" << node->tc_name ()
+ << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl
+ << "if (!type->equal (" << node->tc_name ()
<< ", _tao_env)) return 0; // not equal" << be_nl
<< "if (_tao_any.any_owns_data ())" << be_nl
<< "{" << be_idt_nl
@@ -82,9 +83,8 @@ be_visitor_union_any_op_cs::visit_union (be_union *node)
<< ", _tao_elem, 0, _tao_env)" << be_nl
<< " == CORBA::TypeCode::TRAVERSE_CONTINUE)" << be_nl
<< "{" << be_idt_nl
- << "((CORBA::Any *)&_tao_any)->replace (_tao_any.type (), "
- << "_tao_elem, 1, _tao_env);"
- << be_nl
+ << "((CORBA::Any *)&_tao_any)->replace ("
+ << node->tc_name () << ", _tao_elem, 1, _tao_env);" << be_nl
<< " return 1;" << be_uidt_nl
<< "}" << be_nl
<< "else" << be_nl // decode failed