diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-03-25 12:25:52 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-03-25 12:25:52 +0000 |
commit | 91bc317fab1a00cdf0ff009f822bb63b7d5a87bf (patch) | |
tree | d4d51ec1512e138a4c39b627c2c845f582cafadf | |
parent | bef779a324aa808fd48f0267b9fa7b365b7fb012 (diff) | |
download | ATCD-91bc317fab1a00cdf0ff009f822bb63b7d5a87bf.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp index 09b47ce52e6..1c1f35e9235 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp @@ -108,6 +108,9 @@ TAO::be_visitor_union_typecode::visit_cases (be_union * node, default_case = 0; + be_type * const discriminant_type = + be_type::narrow_from_decl (node->disc_type ()); + for (size_t i = 0; i < count; ++i) { node->field (member_ptr, i); @@ -122,7 +125,9 @@ TAO::be_visitor_union_typecode::visit_cases (be_union * node, // Only deal with non-default cases. The default case has // special handling in the union TypeCode implementation. - os << "{ "; + os << "TAO::TypeCode::Non_Default_Case<" + << discriminant_type->full_name () << ", " + << "char const *> ("; // Generate the label value. Only the first label value is // used in the case where multiple labels are used for the @@ -136,9 +141,9 @@ TAO::be_visitor_union_typecode::visit_cases (be_union * node, os << "\"" << branch->original_local_name () << "\", " << "&" << type->tc_name () - << " }"; + << ")"; - if (i < count - 1) + if (i < count - (node->default_index () != -1 ? 2 : 1)) os << ","; os << be_nl; |