Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / TAO_IDL / be_include / be_union_branch.h
blob1eb44df7c8b69ecaaa21c2121f8645d129405f70
2 //=============================================================================
3 /**
4 * @file be_union_branch.h
6 * Extension of class AST_UnionBranch that provides additional means for C++
7 * mapping.
9 * @author Copyright 1994-1995 by Sun Microsystems
10 * @author Inc. and Aniruddha Gokhale
12 //=============================================================================
14 #ifndef BE_UNION_BRANCH_H
15 #define BE_UNION_BRANCH_H
17 #include "be_field.h"
18 #include "ast_union_branch.h"
20 class UTL_LabelList;
21 class AST_Type;
22 class be_visitor;
23 class TAO_OutStream;
24 class be_union;
26 class be_union_branch : public virtual AST_UnionBranch,
27 public virtual be_field
29 public:
30 be_union_branch (UTL_LabelList *ll,
31 AST_Type *ft,
32 UTL_ScopedName *n);
34 /// Generate the label value (as in a switch/case statement).
35 int gen_label_value (TAO_OutStream *os,
36 unsigned long index = 0);
38 /// Generate the default label value (as in a switch/case statement).
39 int gen_default_label_value (TAO_OutStream *os,
40 be_union *bu);
42 // Visiting.
43 virtual int accept (be_visitor *visitor);
45 // Cleanup.
46 virtual void destroy (void);
48 // Narrowing.
49 DEF_NARROW_FROM_DECL (be_union_branch);
52 #endif