diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-09-18 02:39:10 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-09-18 02:39:10 +0000 |
commit | bb72e254b2bf8564621f48a69a9a66c00c88b3e8 (patch) | |
tree | 5a5d059b93c47b39bfacdf214c388c544892c6fd /TAO/TAO_IDL/be/be_visitor_argument | |
parent | 82d2cacd25cda3415309c1f66685b5220f6683f9 (diff) | |
download | ATCD-bb72e254b2bf8564621f48a69a9a66c00c88b3e8.tar.gz |
ChangeLogTag:Sun Sep 17 19:28:51 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_argument')
4 files changed, 72 insertions, 76 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/request_info_arglist.cpp b/TAO/TAO_IDL/be/be_visitor_argument/request_info_arglist.cpp index bed9320ecc6..557b97112fc 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/request_info_arglist.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/request_info_arglist.cpp @@ -84,16 +84,16 @@ int be_visitor_args_request_info_arglist::visit_array (be_array *node) // ACE_NESTED_CLASS macros needed for MSVC. - be_decl* scope = + be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); AST_Decl::NodeType nt = scope->node_type (); - + switch (this->direction ()) { case AST_Argument::dir_IN: { - if (bt->is_nested () + if (bt->is_nested () && (nt == AST_Decl::NT_interface || nt == AST_Decl::NT_union )) { *os << "const ACE_NESTED_CLASS ("; @@ -110,7 +110,7 @@ int be_visitor_args_request_info_arglist::visit_array (be_array *node) } case AST_Argument::dir_INOUT: { - if (bt->is_nested () + if (bt->is_nested () && (nt == AST_Decl::NT_interface || nt == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -127,7 +127,7 @@ int be_visitor_args_request_info_arglist::visit_array (be_array *node) } case AST_Argument::dir_OUT: { - if (bt->is_nested () + if (bt->is_nested () && (nt == AST_Decl::NT_interface || nt == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -160,33 +160,33 @@ int be_visitor_args_request_info_arglist::visit_enum (be_enum *node) // ACE_NESTED_CLASS macros needed for MSVC. - be_decl* scope = + be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - + AST_Decl::NodeType nt = scope->node_type (); - + switch (this->direction ()) { case AST_Argument::dir_IN: { - if (bt->is_nested () + if (bt->is_nested () && (nt == AST_Decl::NT_interface || nt == AST_Decl::NT_union )) { *os << "const ACE_NESTED_CLASS ("; *os << scope->name () << ","; *os << bt->local_name (); - *os << ")"; + *os << ")" << " &"; } else { - *os << this->type_name (node); + *os << this->type_name (node) << " &"; } break; } case AST_Argument::dir_INOUT: { - if (bt->is_nested () + if (bt->is_nested () && (nt == AST_Decl::NT_interface || nt == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -203,7 +203,7 @@ int be_visitor_args_request_info_arglist::visit_enum (be_enum *node) } case AST_Argument::dir_OUT: { - if (bt->is_nested () + if (bt->is_nested () && (nt == AST_Decl::NT_interface || nt == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -230,7 +230,7 @@ int be_visitor_args_request_info_arglist::visit_interface (be_interface *node) switch (this->direction ()) { case AST_Argument::dir_IN: - *os << this->type_name (node, "_ptr"); + *os << this->type_name (node, "_ptr") << " &"; break; case AST_Argument::dir_INOUT: // inout *os << this->type_name (node, "_ptr") << " &"; @@ -249,7 +249,7 @@ int be_visitor_args_request_info_arglist::visit_interface_fwd (be_interface_fwd switch (this->direction ()) { case AST_Argument::dir_IN: - *os << this->type_name (node, "_ptr"); + *os << this->type_name (node, "_ptr") << " &"; break; case AST_Argument::dir_INOUT: // inout *os << this->type_name (node, "_ptr") << " &"; @@ -305,7 +305,7 @@ int be_visitor_args_request_info_arglist::visit_predefined_type (be_predefined_t switch (this->direction ()) { case AST_Argument::dir_IN: - *os << this->type_name (node, "_ptr"); + *os << this->type_name (node, "_ptr") << " &"; break; case AST_Argument::dir_INOUT: *os << this->type_name (node, "_ptr") << " &"; @@ -320,7 +320,7 @@ int be_visitor_args_request_info_arglist::visit_predefined_type (be_predefined_t switch (this->direction ()) { case AST_Argument::dir_IN: - *os << this->type_name (node); + *os << this->type_name (node) << " &"; break; case AST_Argument::dir_INOUT: *os << this->type_name (node) << " &"; @@ -352,8 +352,8 @@ int be_visitor_args_request_info_arglist::visit_sequence (be_sequence *node) case AST_Argument::dir_IN: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "const ACE_NESTED_CLASS ("; @@ -368,8 +368,8 @@ int be_visitor_args_request_info_arglist::visit_sequence (be_sequence *node) case AST_Argument::dir_INOUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -384,8 +384,8 @@ int be_visitor_args_request_info_arglist::visit_sequence (be_sequence *node) case AST_Argument::dir_OUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -411,7 +411,7 @@ int be_visitor_args_request_info_arglist::visit_string (be_string *node) switch (this->direction ()) { case AST_Argument::dir_IN: - *os << "const char *"; + *os << "const char * &"; break; case AST_Argument::dir_INOUT: *os << "char *&"; @@ -426,7 +426,7 @@ int be_visitor_args_request_info_arglist::visit_string (be_string *node) switch (this->direction ()) { case AST_Argument::dir_IN: - *os << "const CORBA::WChar *"; + *os << "const CORBA::WChar * &"; break; case AST_Argument::dir_INOUT: *os << "CORBA::WChar *&"; @@ -458,8 +458,8 @@ int be_visitor_args_request_info_arglist::visit_structure (be_structure *node) case AST_Argument::dir_IN: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "const ACE_NESTED_CLASS ("; @@ -474,8 +474,8 @@ int be_visitor_args_request_info_arglist::visit_structure (be_structure *node) case AST_Argument::dir_INOUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -490,8 +490,8 @@ int be_visitor_args_request_info_arglist::visit_structure (be_structure *node) case AST_Argument::dir_OUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -524,8 +524,8 @@ int be_visitor_args_request_info_arglist::visit_union (be_union *node) case AST_Argument::dir_IN: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "const ACE_NESTED_CLASS ("; @@ -540,8 +540,8 @@ int be_visitor_args_request_info_arglist::visit_union (be_union *node) case AST_Argument::dir_INOUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -556,8 +556,8 @@ int be_visitor_args_request_info_arglist::visit_union (be_union *node) case AST_Argument::dir_OUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; diff --git a/TAO/TAO_IDL/be/be_visitor_argument/request_info_ch.cpp b/TAO/TAO_IDL/be/be_visitor_argument/request_info_ch.cpp index 03583f3596b..bb1051fd39e 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/request_info_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/request_info_ch.cpp @@ -91,8 +91,8 @@ int be_visitor_args_request_info_ch::visit_array (be_array *node) case AST_Argument::dir_IN: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "const ACE_NESTED_CLASS ("; @@ -110,8 +110,8 @@ int be_visitor_args_request_info_ch::visit_array (be_array *node) case AST_Argument::dir_INOUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -129,8 +129,8 @@ int be_visitor_args_request_info_ch::visit_array (be_array *node) case AST_Argument::dir_OUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -169,8 +169,8 @@ int be_visitor_args_request_info_ch::visit_enum (be_enum *node) case AST_Argument::dir_IN: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "const ACE_NESTED_CLASS ("; @@ -188,8 +188,8 @@ int be_visitor_args_request_info_ch::visit_enum (be_enum *node) case AST_Argument::dir_INOUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -207,8 +207,8 @@ int be_visitor_args_request_info_ch::visit_enum (be_enum *node) case AST_Argument::dir_OUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -358,8 +358,8 @@ int be_visitor_args_request_info_ch::visit_sequence (be_sequence *node) case AST_Argument::dir_IN: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "const ACE_NESTED_CLASS ("; @@ -374,8 +374,8 @@ int be_visitor_args_request_info_ch::visit_sequence (be_sequence *node) case AST_Argument::dir_INOUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -390,8 +390,8 @@ int be_visitor_args_request_info_ch::visit_sequence (be_sequence *node) case AST_Argument::dir_OUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -412,7 +412,7 @@ int be_visitor_args_request_info_ch::visit_string (be_string *node) { TAO_OutStream *os = this->ctx_->stream (); // get the stream - if (node->width () == sizeof (char)) + if (node->width () == 1) { switch (this->direction ()) { @@ -464,8 +464,8 @@ int be_visitor_args_request_info_ch::visit_structure (be_structure *node) case AST_Argument::dir_IN: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "const ACE_NESTED_CLASS ("; @@ -480,8 +480,8 @@ int be_visitor_args_request_info_ch::visit_structure (be_structure *node) case AST_Argument::dir_INOUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -496,8 +496,8 @@ int be_visitor_args_request_info_ch::visit_structure (be_structure *node) case AST_Argument::dir_OUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -532,8 +532,8 @@ int be_visitor_args_request_info_ch::visit_union (be_union *node) case AST_Argument::dir_IN: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "const ACE_NESTED_CLASS ("; @@ -548,8 +548,8 @@ int be_visitor_args_request_info_ch::visit_union (be_union *node) case AST_Argument::dir_INOUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; @@ -564,8 +564,8 @@ int be_visitor_args_request_info_ch::visit_union (be_union *node) case AST_Argument::dir_OUT: { be_decl* scope = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - - if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface + + if (bt->is_nested () && (scope->node_type () == AST_Decl::NT_interface || scope->node_type () == AST_Decl::NT_union )) { *os << "ACE_NESTED_CLASS ("; diff --git a/TAO/TAO_IDL/be/be_visitor_argument/request_info_sh.cpp b/TAO/TAO_IDL/be/be_visitor_argument/request_info_sh.cpp index 194c97861ff..5e504a854c5 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/request_info_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/request_info_sh.cpp @@ -244,18 +244,18 @@ int be_visitor_args_request_info_sh::visit_string (be_string *node) { TAO_OutStream *os = this->ctx_->stream (); // get the stream - if (node->width () == sizeof (char)) + if (node->width () == 1) { switch (this->direction ()) { case AST_Argument::dir_IN: - *os << "const char *"<<" &"; + *os << "const char *"; break; case AST_Argument::dir_INOUT: - *os << "char *&"; + *os << "char *"; break; case AST_Argument::dir_OUT: - *os << "CORBA::String_out"; + *os << "CORBA::String_out "; break; } } diff --git a/TAO/TAO_IDL/be/be_visitor_argument/request_info_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/request_info_ss.cpp index 6c0dba61dd1..937c7a75edf 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/request_info_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/request_info_ss.cpp @@ -54,7 +54,6 @@ int be_visitor_args_request_info_ss::visit_argument (be_argument *node) -1); } - os->indent (); switch (this->ctx_->state ()) { @@ -105,6 +104,3 @@ int be_visitor_args_request_info_ss::visit_argument (be_argument *node) } return 0; } - - - |