summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_argument/compiled_marshal_cs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_argument/compiled_marshal_cs.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_argument/compiled_marshal_cs.cpp145
1 files changed, 12 insertions, 133 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/compiled_marshal_cs.cpp b/TAO/TAO_IDL/be/be_visitor_argument/compiled_marshal_cs.cpp
index e8105746d40..3b1ce2ebfc9 100644
--- a/TAO/TAO_IDL/be/be_visitor_argument/compiled_marshal_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_argument/compiled_marshal_cs.cpp
@@ -151,12 +151,12 @@ int be_visitor_args_compiled_marshal_cs::visit_array (be_array *node)
switch (this->direction ())
{
case AST_Argument::dir_IN:
- *os << node->name () << "_forany ("
+ *os << node->name () << "_forany ("
<< "(" << node->name () << "_slice *)"
<< arg->local_name () << ")";
break;
case AST_Argument::dir_INOUT:
- *os << node->name () << "_forany ("
+ *os << node->name () << "_forany ("
<< arg->local_name () << ")";
break;
case AST_Argument::dir_OUT:
@@ -170,16 +170,19 @@ int be_visitor_args_compiled_marshal_cs::visit_array (be_array *node)
case AST_Argument::dir_IN:
break;
case AST_Argument::dir_INOUT:
- *os << "_tao_argument_" << arg->local_name ();
+ *os << node->name () << "_forany ("
+ << arg->local_name () << ")";
break;
case AST_Argument::dir_OUT:
if (node->size_type () == be_decl::VARIABLE)
{
- *os << "_tao_argument_" << arg->local_name ();
+ *os << node->name () << "_forany ("
+ << arg->local_name () << ".ptr ())";
}
else
{
- *os << "_tao_argument_" << arg->local_name ();
+ *os << node->name () << "_forany ("
+ << arg->local_name () << ")";
}
break;
}
@@ -322,97 +325,6 @@ int be_visitor_args_compiled_marshal_cs::visit_interface_fwd (be_interface_fwd *
return 0;
}
-#ifdef IDL_HAS_VALUETYPE
-
-int be_visitor_args_compiled_marshal_cs::visit_valuetype (be_valuetype *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_OUTPUT)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- *os << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- }
- else if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- *os << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- *os << arg->local_name () << ".ptr ()";
- break;
- }
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_compiled_marshal_cs::"
- "visit_valuetype - "
- "Bad substate\n"),
- -1);
- }
- return 0;
-}
-
-int
-be_visitor_args_compiled_marshal_cs::visit_valuetype_fwd (be_valuetype_fwd *)
-{
- TAO_OutStream *os = this->ctx_->stream (); // get output stream
- be_argument *arg = this->ctx_->be_node_as_argument (); // get the argument
- // node
-
- if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_OUTPUT)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- case AST_Argument::dir_INOUT:
- *os << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- break;
- }
- }
- else if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT)
- {
- switch (this->direction ())
- {
- case AST_Argument::dir_IN:
- break;
- case AST_Argument::dir_INOUT:
- *os << arg->local_name ();
- break;
- case AST_Argument::dir_OUT:
- *os << arg->local_name () << ".ptr ()";
- break;
- }
- }
- else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_args_compiled_marshal_cs::"
- "visit_valuetype - "
- "Bad substate\n"),
- -1);
- }
- return 0;
-}
-
-#endif /* IDL_HAS_VALUETYPE */
-
int be_visitor_args_compiled_marshal_cs::visit_predefined_type (be_predefined_type *node)
{
TAO_OutStream *os = this->ctx_->stream (); // get output stream
@@ -470,41 +382,8 @@ int be_visitor_args_compiled_marshal_cs::visit_predefined_type (be_predefined_ty
case AST_Argument::dir_IN:
break;
case AST_Argument::dir_INOUT:
- switch (node->pt ())
- {
- case AST_PredefinedType::PT_pseudo:
- case AST_PredefinedType::PT_any:
- case AST_PredefinedType::PT_long:
- case AST_PredefinedType::PT_ulong:
- case AST_PredefinedType::PT_longlong:
- case AST_PredefinedType::PT_ulonglong:
- case AST_PredefinedType::PT_short:
- case AST_PredefinedType::PT_ushort:
- case AST_PredefinedType::PT_float:
- case AST_PredefinedType::PT_double:
- case AST_PredefinedType::PT_longdouble:
- *os << arg->local_name ();
- break;
- case AST_PredefinedType::PT_char:
- *os << "CORBA::Any::to_char (" << arg->local_name () << ")";
- break;
- case AST_PredefinedType::PT_wchar:
- *os << "CORBA::Any::to_wchar (" << arg->local_name () << ")";
- break;
- case AST_PredefinedType::PT_boolean:
- *os << "CORBA::Any::to_boolean (" << arg->local_name () << ")";
- break;
- case AST_PredefinedType::PT_octet:
- *os << "CORBA::Any::to_octet (" << arg->local_name () << ")";
- break;
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_operation_rettype_compiled_marshal_cs::"
- "visit_array - "
- "Bad predefined type\n"),
- -1);
- }
- break;
+ *os << arg->local_name ();
+ break;
case AST_Argument::dir_OUT:
switch (node->pt ())
{
@@ -645,12 +524,12 @@ int be_visitor_args_compiled_marshal_cs::visit_string (be_string *node)
case AST_Argument::dir_IN:
break;
case AST_Argument::dir_INOUT:
- *os << "CORBA::Any::to_string ("
+ *os << "CORBA::Any::to_string ("
<< arg->local_name () << ", "
<< node->max_size ()->ev ()->u.ulval - 1 << ")";
break;
case AST_Argument::dir_OUT:
- *os << "CORBA::Any::to_string ("
+ *os << "CORBA::Any::to_string ("
<< arg->local_name () << ".ptr (), "
<< node->max_size ()->ev ()->u.ulval - 1 << ")";
break;