diff options
author | mk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-10-23 14:14:50 +0000 |
---|---|---|
committer | mk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-10-23 14:14:50 +0000 |
commit | 3a4bff49a967eb2eac9b1cc03fcc95e1f509cfbb (patch) | |
tree | cca38d566347253f6197d067fdbe6487935e83eb | |
parent | 186191ab2bbcb6e21f112296659ad575cbda0168 (diff) | |
download | ATCD-3a4bff49a967eb2eac9b1cc03fcc95e1f509cfbb.tar.gz |
ChangeLogTag: Sat Oct 23 09:10:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de>
-rw-r--r-- | TAO/ChangeLog-99c | 21 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp | 31 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp | 1 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_codegen.h | 4 |
4 files changed, 44 insertions, 13 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 06b1c3e91f2..b1e71457b24 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,24 @@ +Sat Oct 23 09:10:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de> + + * TAO_IDL/be/be_visitor_field/field_ch.cpp, + TAO_IDL/be/be_visitor_valuetype/valuetype.cpp, + TAO_IDL/be_include/be_codegen.h: + Fixed the usage of the ACE_NESTED_CLASS macro when + client header code for valuetypes was generated. Implmentations + of valuetypes need to inherit from a class in the OBV_xx + namespace. Because the code for the OBV_xx namespace is partly + generated by other, generic visitors a problem occured. The + problem was the assumption of these generic visitors, that + every code generated would be in the xx namespace, they were + not prepared to generate code inside other namespaces, + like the OBV_xx namespace. Therefor a sub state has been + added named "TAO_USE_FULL_NAME" to force in this case + the be_visitor_field_ch class to use full names instead + of using the ACE_NESTED_CLASS macro, which is actually + just a fix for non-compliant C++ compilers. + Thanks to Erik Johannes <ejohannes@oresis.com> for reporting + this. + Fri Oct 22 12:39:29 1999 Irfan Pyarali <irfan@cs.wustl.edu> * tao/Messaging_Policy_i.cpp (TAO_Sync_Scope_Policy and diff --git a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp index b3458c6bcfd..fc7cddad514 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp @@ -137,7 +137,8 @@ be_visitor_field_ch::visit_array (be_array *node) // ACE_NESTED_CLASS macro generated by nested_type_name // is not necessary in all cases. - if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface) + if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface + && this->ctx_->sub_state () != TAO_CodeGen::TAO_USE_FULL_NAME) *os << bt->nested_type_name (this->ctx_->scope ()); else *os << bt->name (); @@ -198,7 +199,8 @@ be_visitor_field_ch::visit_enum (be_enum *node) // ACE_NESTED_CLASS macro generated by nested_type_name // is not necessary in all cases. - if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface) + if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface + && this->ctx_->sub_state () != TAO_CodeGen::TAO_USE_FULL_NAME) *os << bt->nested_type_name (this->ctx_->scope ()); else *os << bt->name (); @@ -226,7 +228,8 @@ be_visitor_field_ch::visit_interface (be_interface *node) // ACE_NESTED_CLASS macro generated by nested_type_name // is not necessary in all cases. - if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface) + if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface + && this->ctx_->sub_state () != TAO_CodeGen::TAO_USE_FULL_NAME) { *os << bt->nested_type_name (this->ctx_->scope (), "") << ", "; // Must use another statement, nested_type_name has side effects... @@ -262,7 +265,8 @@ be_visitor_field_ch::visit_interface_fwd (be_interface_fwd *node) // ACE_NESTED_CLASS macro generated by nested_type_name // is not necessary in all cases. - if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface) + if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface + && this->ctx_->sub_state () != TAO_CodeGen::TAO_USE_FULL_NAME) { *os << bt->nested_type_name (this->ctx_->scope (), "") << ", "; // Must use another statement, nested_type_name has side effects... @@ -299,7 +303,8 @@ be_visitor_field_ch::visit_valuetype (be_valuetype *node) // ACE_NESTED_CLASS macro generated by nested_type_name // is not necessary in all cases. - if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface) + if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface + && this->ctx_->sub_state () != TAO_CodeGen::TAO_USE_FULL_NAME) *os << bt->nested_type_name (this->ctx_->scope (), "_var"); else *os << bt->name () << "_var"; @@ -326,7 +331,8 @@ be_visitor_field_ch::visit_valuetype_fwd (be_valuetype_fwd *node) // ACE_NESTED_CLASS macro generated by nested_type_name // is not necessary in all cases. - if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface) + if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface + && this->ctx_->sub_state () != TAO_CodeGen::TAO_USE_FULL_NAME) *os << bt->nested_type_name (this->ctx_->scope (), "_var"); else *os << bt->name () << "_var"; @@ -375,7 +381,8 @@ be_visitor_field_ch::visit_predefined_type (be_predefined_type *node) { // ACE_NESTED_CLASS macro generated by nested_type_name // is not necessary in all cases. - if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface) + if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface + && this->ctx_->sub_state () != TAO_CodeGen::TAO_USE_FULL_NAME) *os << bt->nested_type_name (this->ctx_->scope ()); else *os << bt->name (); @@ -455,7 +462,9 @@ be_visitor_field_ch::visit_sequence (be_sequence *node) // is not necessary in all cases. be_typedef *tdef = be_typedef::narrow_from_decl (bt); - if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface || !tdef) + if ((bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface + && this->ctx_->sub_state () != TAO_CodeGen::TAO_USE_FULL_NAME) + || !tdef) *os << bt->nested_type_name (this->ctx_->scope ()); else *os << bt->name (); @@ -536,7 +545,8 @@ be_visitor_field_ch::visit_structure (be_structure *node) // ACE_NESTED_CLASS macro generated by nested_type_name // is not necessary in all cases. - if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface) + if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface + && this->ctx_->sub_state () != TAO_CodeGen::TAO_USE_FULL_NAME) *os << bt->nested_type_name (this->ctx_->scope ()); else *os << bt->name (); @@ -617,7 +627,8 @@ be_visitor_field_ch::visit_union (be_union *node) // ACE_NESTED_CLASS macro generated by nested_type_name // is not necessary in all cases. - if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface) + if (bt->defined_in ()->scope_node_type () == AST_Decl::NT_interface + && this->ctx_->sub_state () != TAO_CodeGen::TAO_USE_FULL_NAME) *os << bt->nested_type_name (this->ctx_->scope ()); else *os << bt->name (); diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp index f33690018f4..8677dbbe844 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp @@ -739,6 +739,7 @@ be_visitor_valuetype::gen_field_pd (be_field *node) ctx.node (node); // set the node to be the node being visited. The scope is // still the same + ctx.sub_state (TAO_CodeGen::TAO_USE_FULL_NAME); ctx.state (TAO_CodeGen::TAO_FIELD_CH); be_visitor *visitor = tao_cg->make_visitor (&ctx); diff --git a/TAO/TAO_IDL/be_include/be_codegen.h b/TAO/TAO_IDL/be_include/be_codegen.h index 1cf6c42f8c7..93c105f661b 100644 --- a/TAO/TAO_IDL/be_include/be_codegen.h +++ b/TAO/TAO_IDL/be_include/be_codegen.h @@ -428,10 +428,8 @@ public: TAO_TC_DEFN_ENCAP_LEN, // encap size computation TAO_TC_DEFN_SCOPE_LEN, // scope size computation - TAO_AMI_HANDLER_TC_DEFN_TYPECODE, // For AMI Handler interface. - // means the upcall has arguments. - TAO_AMI_HANDLER_OPERATION_HAS_ARGUMENTS, + TAO_USE_FULL_NAME, // means we are not generating the assignment operator TAO_UNION_COPY_CONSTRUCTOR, |