summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_operation
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2003-08-26 16:08:00 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2003-08-26 16:08:00 +0000
commit10a845befea4c36b48a93b2546f11b30dd527c55 (patch)
tree25aa2a8f129f9479aaddd0232de9ec24185fa314 /TAO/TAO_IDL/be/be_visitor_operation
parentb377fed5aa2426cec3db1a07f5388a18e7ad985f (diff)
downloadATCD-10a845befea4c36b48a93b2546f11b30dd527c55.tar.gz
ChangeLogTag:Tue Aug 26 09:06:19 2003 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_operation')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/interceptors_cs.cpp8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp11
2 files changed, 12 insertions, 7 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_cs.cpp
index 2c8ba9fd294..a53f97e43ef 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_cs.cpp
@@ -75,7 +75,7 @@ be_visitor_operation_interceptors_cs::generate_class_declaration (
*os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
<< "// " << __FILE__ << ":" << __LINE__;
- *os << be_nl << be_nl
+ *os << be_nl << be_nl
<< "class TAO_ClientRequestInfo_" << node->flat_name ();
// We need the interface node in which this operation was defined. However,
@@ -552,7 +552,7 @@ be_visitor_operation_interceptors_cs::generate_class_definition (
// Now make sure that we have some in and inout
// parameters. Otherwise, there is nothing to be put into
// the Dyanmic::Paramlist.
- || (!(this->has_param_type (node, AST_Argument::dir_IN))
+ || (!(this->has_param_type (node, AST_Argument::dir_IN))
&& !(this->has_param_type (node, AST_Argument::dir_INOUT))))
{
*os << "return parameter_list;";
@@ -756,7 +756,7 @@ be_visitor_operation_interceptors_cs::generate_class_definition (
if (this->void_return_type (bt))
{
// Return an Any with tk_void TypeCode.
- *os << "CORBA::Boolean tk_void_any = 1;" << be_nl
+ *os << "const CORBA::Boolean tk_void_any = 1;" << be_nl
<< "CORBA::Any *result_any =" << be_idt_nl
<< "TAO_RequestInfo_Util::make_any "
<< "(tk_void_any ACE_ENV_ARG_PARAMETER);"
@@ -767,7 +767,7 @@ be_visitor_operation_interceptors_cs::generate_class_definition (
}
else
{
- *os << "CORBA::Boolean tk_void_any = 0;" << be_nl
+ *os << "const CORBA::Boolean tk_void_any = 0;" << be_nl
<< "CORBA::Any *result_any =" << be_idt_nl
<< "TAO_RequestInfo_Util::make_any "
<< "(tk_void_any ACE_ENV_ARG_PARAMETER);"
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp
index 7007d9f11ae..4c1198eaccf 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp
@@ -222,12 +222,17 @@ be_visitor_operation_interceptors_result::visit_structure (be_structure * node)
}
int
-be_visitor_operation_interceptors_result::visit_union (be_union *)
+be_visitor_operation_interceptors_result::visit_union (be_union * node)
{
TAO_OutStream *os = this->ctx_->stream ();
- // Force copying when inserting into the Any.
- *os << "(*result_any) <<= *this->_result;" << be_nl;
+ *os << "(*result_any) <<= ";
+
+ if (node->size_type () == AST_Type::VARIABLE)
+ *os << "*this->_result;" << be_nl; // Force copying when
+ // inserting into the Any.
+ else
+ *os << "this->_result;" << be_nl;
return 0;
}