summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp
index b170b425627..8790e6a339b 100644
--- a/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp
@@ -88,63 +88,6 @@ int be_visitor_union_ci::visit_union (be_union *node)
<< "return &this->disc_;" << be_uidt_nl
<< "}\n\n";
- // now check if we need to generate the _default () method
- be_union::DefaultValue dv;
- if (node->default_value (dv) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ci::"
- "visit_union - "
- "computing default value failed\n"),
- -1);
- }
- if ((dv.computed_ != 0) && (node->default_index () == -1))
- {
- // only if all cases are not covered AND there is no explicit
- // default, we get the _default () method
- os->indent ();
- *os << "// the implicit _default () method" << be_nl;
- *os << "ACE_INLINE void " << be_nl
- << node->name () << "::_default ()" << be_nl
- << "{" << be_idt_nl
- << "this->disc_ = ";
- switch (node->udisc_type ())
- {
- case AST_Expression::EV_short:
- *os << dv.u.short_val;
- break;
- case AST_Expression::EV_ushort:
- *os << dv.u.ushort_val;
- break;
- case AST_Expression::EV_long:
- *os << dv.u.long_val;
- break;
- case AST_Expression::EV_ulong:
- *os << dv.u.ulong_val;
- break;
- case AST_Expression::EV_char:
- os->print ("%d", dv.u.char_val);
- break;
- case AST_Expression::EV_bool:
- *os << dv.u.bool_val;
- break;
- case AST_Expression::EV_any:
- *os << dv.u.enum_val;
- break;
- case AST_Expression::EV_longlong:
- case AST_Expression::EV_ulonglong:
- // unimplemented
- default:
- // error caught earlier.
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_union_ci::"
- "visit_union - "
- "bad or unimplemented discriminant type\n"),
- -1);
- }
- *os << ";" << be_uidt_nl << "}\n\n";
- }
-
// the discriminant type may have to be defined here if it was an enum
// declaration inside of the union statement.