diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-09-13 20:28:20 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-09-13 20:28:20 +0000 |
commit | 27198fb4a31db41e3792026a17db353121ba88d6 (patch) | |
tree | f542f024a154b12f96b926b2df4826d883e1e452 | |
parent | 2b02e0a12b032b247bef8f4614bfd6fb72c17c4b (diff) | |
download | ATCD-27198fb4a31db41e3792026a17db353121ba88d6.tar.gz |
ChangeLogTag: Wed Sep 13 15:17:45 2000 Jeff Parsons <parsons@cs.wustl.edu>
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_argument/request_info_result.cpp | 55 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp | 78 |
2 files changed, 43 insertions, 90 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_argument/request_info_result.cpp b/TAO/TAO_IDL/be/be_visitor_argument/request_info_result.cpp index 5c3a15fbdbd..83fe4584a89 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/request_info_result.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/request_info_result.cpp @@ -46,9 +46,6 @@ int be_visitor_args_request_info_result::visit_argument (be_argument *node) be_type *bt; os->indent (); - // *os << "this->result_val_ <<="; - // Insertion into an Any has some special cases which need to be - // dealt with. // retrieve the type bt = be_type::narrow_from_decl (node->field_type ()); @@ -60,58 +57,6 @@ int be_visitor_args_request_info_result::visit_argument (be_argument *node) "Bad return type\n"), -1); } - /* - switch (bt->node_type ()) - { - case AST_Decl::NT_pre_defined: - { - if (bt->accept (this) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_request_info_result::" - "visit_argument - " - "cannot accept visitor\n"), - -1); - } - - *os <<"result_;" ; - break; - } - case AST_Decl::NT_string: - { - if (bt->accept (this) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_paramlist::" - "visit_argument - " - "cannot accept visitor\n"), - -1); - } - - // *os <<node->local_name () << "_;" ; - - break; - } - case AST_Decl::NT_wstring: - { - if (bt->accept (this) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_paramlist::" - "visit_argument - " - "cannot accept visitor\n"), - -1); - } - - // *os <<node->local_name () << "_;" ; - break; - } - - default: - *os << " this->result_;" << be_nl; - - } - */ if (bt->accept (this) == -1) { 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 992d3fa736c..02480e1bc82 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp @@ -39,74 +39,81 @@ be_visitor_operation_interceptors_result::~be_visitor_operation_interceptors_res { } -int be_visitor_operation_interceptors_result::visit_array (be_array *node) +int +be_visitor_operation_interceptors_result::visit_array (be_array *node) { TAO_OutStream *os = this->ctx_->stream (); // get output stream // if the current type is an alias, use that be_type *bt; + if (this->ctx_->alias ()) - bt = this->ctx_->alias (); + { + bt = this->ctx_->alias (); + } else - bt = node; + { + bt = node; + } - os->indent (); *os << bt->name () << "_forany _tao_forany_result" << " (this->result_);" << be_nl << "this->result_val_ <<= _tao_forany_result;"<< be_nl; + return 0; } -int be_visitor_operation_interceptors_result::visit_enum (be_enum *) +int +be_visitor_operation_interceptors_result::visit_enum (be_enum *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream - os->indent (); + *os << "this->result_val_ <<= this->result_;"; return 0; } -int be_visitor_operation_interceptors_result::visit_interface (be_interface *) +int +be_visitor_operation_interceptors_result::visit_interface (be_interface *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream - os->indent (); *os << "this->result_val_ <<= this->result_;"; return 0; } -int be_visitor_operation_interceptors_result::visit_interface_fwd (be_interface_fwd *) + +int +be_visitor_operation_interceptors_result::visit_interface_fwd (be_interface_fwd *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream - os->indent (); + *os << "this->result_val_ <<= this->result_;"; return 0; - } #ifdef IDL_HAS_VALUETYPE -int be_visitor_operation_interceptors_result::visit_valuetype (be_valuetype *) +int +be_visitor_operation_interceptors_result::visit_valuetype (be_valuetype *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream - os->indent (); // Not supported since TAO doesnt support Any operators for valuetype yet. // *os << "this->result_val_ <<= this->result_;"; return 0; - } -int be_visitor_operation_interceptors_result::visit_valuetype_fwd (be_valuetype_fwd *) +int +be_visitor_operation_interceptors_result::visit_valuetype_fwd (be_valuetype_fwd *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream - os->indent (); + // Not supported since TAO doesnt support Any operators for valuetype yet. // *os << "this->result_val_ <<= this->result_;"; return 0; - } #endif /* IDL_HAS_VALUETYPE */ @@ -115,8 +122,9 @@ int be_visitor_operation_interceptors_result::visit_predefined_type (be_predefined_type *node) { TAO_OutStream *os = this->ctx_->stream (); // get output stream - os->indent (); + *os << "this->result_val_ <<= "; + switch (node->pt ()) { case AST_PredefinedType::PT_boolean: @@ -152,18 +160,18 @@ be_visitor_operation_interceptors_result::visit_predefined_type (be_predefined_t -1); } - return 0; + return 0; } -int be_visitor_operation_interceptors_result::visit_sequence (be_sequence *) +int +be_visitor_operation_interceptors_result::visit_sequence (be_sequence *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream - os->indent (); + *os << "this->result_val_ <<= this->result_;"; return 0; - } int @@ -171,8 +179,8 @@ be_visitor_operation_interceptors_result::visit_string (be_string *node) { TAO_OutStream *os = this->ctx_->stream (); // get output stream - os->indent (); *os << "this->result_val_ <<= "; + // we need to make a distinction between bounded and unbounded strings if (node->max_size ()->ev ()->u.ulval != 0) { @@ -185,44 +193,44 @@ be_visitor_operation_interceptors_result::visit_string (be_string *node) { *os << "CORBA::Any::from_wstring ((CORBA::WChar *)"; } + *os <<"this->result_, " << node->max_size ()->ev ()->u.ulval << ");"; } else + { *os << "this->result_; "; + } + return 0; } -int be_visitor_operation_interceptors_result::visit_structure (be_structure *) +int +be_visitor_operation_interceptors_result::visit_structure (be_structure *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream - os->indent (); *os << "this->result_val_ <<= this->result_;"; return 0; } -int be_visitor_operation_interceptors_result::visit_union (be_union *) +int +be_visitor_operation_interceptors_result::visit_union (be_union *) { - TAO_OutStream *os = this->ctx_->stream (); // get output stream + TAO_OutStream *os = this->ctx_->stream (); // get output stream - os->indent (); *os << "this->result_val_ <<= this->result_;"; return 0; - } -int be_visitor_operation_interceptors_result::visit_typedef (be_typedef *) +int +be_visitor_operation_interceptors_result::visit_typedef (be_typedef *node) { - TAO_OutStream *os = this->ctx_->stream (); // get output stream - - os->indent (); - *os << "this->result_val_ <<= this->result_;"; + node->primitive_base_type ()->accept (this); return 0; - } |