3 //=============================================================================
5 * @file ifr_adding_visitor_union.h
7 * Header file for class ifr_adding_visitor_union.
9 * @author Jeff Parsons <parsons@cs.wustl.edu>
11 //=============================================================================
14 #ifndef TAO_IFR_ADDING_VISITOR_UNION_H
15 #define TAO_IFR_ADDING_VISITOR_UNION_H
17 #include "ifr_adding_visitor.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 * @class ifr_adding_visitor_union
26 * @brief ifr_adding_visitor_exception.
28 * This visitor overrides a few of the visit methods
29 * for the case when a union node is seen in the AST.
31 class ifr_adding_visitor_union
: public ifr_adding_visitor
34 ifr_adding_visitor_union (AST_Decl
*scope
);
36 virtual ~ifr_adding_visitor_union ();
38 virtual int visit_scope (UTL_Scope
*node
);
39 virtual int visit_structure (AST_Structure
*node
);
40 virtual int visit_enum (AST_Enum
*node
);
41 virtual int visit_union (AST_Union
*node
);
43 /// Lets the visitor one level above acess this value.
44 virtual CORBA::IDLType_ptr
ir_current () const;
47 /// Common code called whether we are creating a new union
48 /// or filling out a forward declaration.
49 int add_members (AST_Union
*node
, CORBA::UnionDef_ptr union_def
);
52 /// Holder for the member list passed to create_struct() or
53 /// create_exception().
54 CORBA::UnionMemberSeq members_
;
57 * Holds the typecode of the discriminator (used only if the
58 * discriminator is an enum type, so we can insert the label
59 * values into Anys for UnionMemberSeq[i].label).
61 CORBA::TypeCode_var disc_tc_
;
64 #endif /* TAO_IFR_ADDING_VISITOR_UNION_H */