2 //=============================================================================
6 * Extension of class AST_Union that provides additional means for C++
9 * @author Copyright 1994-1995 by Sun Microsystems
10 * @author Inc. and Aniruddha Gokhale
12 //=============================================================================
19 #include "ast_union.h"
21 class AST_ConcreteType
;
24 class be_union
: public virtual AST_Union
,
25 public virtual be_scope
,
26 public virtual be_type
29 be_union (AST_ConcreteType
*dt
,
34 /// Catch BE-specific member values before delegating to the base class.
35 virtual void redefine (AST_Structure
*from
);
37 /// Do we have at least one member with multiple case labels?
38 virtual bool has_duplicate_case_labels (void);
40 /// Overridden from class be_type.
41 virtual void gen_ostream_operator (TAO_OutStream
*os
,
45 virtual void destroy (void);
48 virtual int accept (be_visitor
*visitor
);
50 /// Decides whether a default switch case label in the generated copy
51 /// constructor, assignment operator, etc. is needed.
52 bool gen_empty_default_label (void);
54 /// Just a way to get at fe_add_union_branch() from the backend.
55 AST_UnionBranch
*be_add_union_branch (AST_UnionBranch
*b
);
57 /// Returns total number of labels, useful when the union has
58 /// multiple case labels.
59 ACE_UINT64
nlabels (void);
63 DEF_NARROW_FROM_DECL(be_union
);
64 DEF_NARROW_FROM_SCOPE(be_union
);