diff options
-rw-r--r-- | TAO/ChangeLog-98c | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_sequence.cpp | 31 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp | 13 |
3 files changed, 46 insertions, 6 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index a4aa2e7e313..ae6fd76141e 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,9 @@ +Mon Jun 22 21:30:00 1998 Michael Kircher <mk1@cs.wustl.edu> + + * TAO_IDL/be/be_sequence.cpp + * TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp: Making + a special treatment for sequence of octets. + Mon Jun 22 20:32:25 1998 Seth Benjamin Widoff <sbw1@waltz.cs.wustl.edu> * orbsvcs/orbsvcs/Trader/Attributes.{h,cpp}: @@ -36,7 +42,7 @@ Mon Jun 22 11:54:20 1998 Carlos O'Ryan <coryan@cs.wustl.edu> Mon Jun 22 11:32:00 1998 Michael Kircher <mk1@cs.wustl.edu> - * TAO/docs/releasenotes/index.html: Added documentation + * docs/releasenotes/index.html: Added documentation about the changes in the TAO IDL compiler. Mon Jun 22 11:32:00 1998 Michael Kircher <mk1@cs.wustl.edu> diff --git a/TAO/TAO_IDL/be/be_sequence.cpp b/TAO/TAO_IDL/be/be_sequence.cpp index 9f7cd0c1082..f52c40ed49c 100644 --- a/TAO/TAO_IDL/be/be_sequence.cpp +++ b/TAO/TAO_IDL/be/be_sequence.cpp @@ -376,10 +376,33 @@ be_sequence::instance_name () break; default: // not a managed type if (this->unbounded ()) - ACE_OS::sprintf (namebuf, - "_TAO_Unbounded_Sequence_%s", - this->flatname()); - //prim_type->flatname ()); + { + // @@ This needs to be fixed. (Michael) + //determine if it is a primitive type, if yes do all of that + be_predefined_type * bpt = + be_predefined_type::narrow_from_decl (this->base_type()); + if (bpt) + { + /*ACE_DEBUG ((LM_ERROR, + "(%N:%l) be_visitor_sequence_ch::" + "gen_instantiate_name - " + "Bad element type\n")); + return 0;*/ + if (bpt->pt() == AST_PredefinedType::PT_octet) + ACE_OS::sprintf (namebuf, + "TAO_Unbounded_Sequence<CORBA::Octet>"); + else + ACE_OS::sprintf (namebuf, + "_TAO_Unbounded_Sequence_%s", + this->flatname()); + // or prim_type->flatname ()); + } + else + ACE_OS::sprintf (namebuf, + "_TAO_Unbounded_Sequence_%s", + this->flatname()); + // or prim_type->flatname ()); + } else ACE_OS::sprintf (namebuf, "_TAO_Bounded_Sequence_%s_%d", diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp index 1dc38566f7f..e7c4990acf2 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp @@ -157,7 +157,18 @@ be_visitor_sequence_ch::instantiate_sequence (be_sequence *node) break; default: // not a managed type if (node->unbounded ()) - this->gen_unbounded_sequence (node); + { + // @@ This needs to be fixed. (Michael) + be_predefined_type * bpt = + be_predefined_type::narrow_from_decl (node->base_type()); + if (bpt) + { + if (bpt->pt() != AST_PredefinedType::PT_octet) + this->gen_unbounded_sequence (node); + } + else + this->gen_unbounded_sequence (node); + } else this->gen_bounded_sequence (node); break; |