Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / IFR_Service / ifr_adding_visitor_structure.h
blobbbb2dca51eb5359b684903cd9302435dfc40e8fa
2 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file ifr_adding_visitor_structure.h
7 * Header file for class ifr_adding_visitor_structure.
9 * @author Jeff Parsons <parsons@cs.wustl.edu>
11 //=============================================================================
14 #ifndef TAO_IFR_ADDING_VISITOR_STRUCTURE_H
15 #define TAO_IFR_ADDING_VISITOR_STRUCTURE_H
17 #include "ifr_adding_visitor.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 /**
24 * @class ifr_adding_visitor_structure
26 * @brief ifr_adding_visitor_structure.
28 * This visitor overrides a few of the visit methods
29 * for the case when a struct or exception node is seen in the AST.
31 class ifr_adding_visitor_structure : public ifr_adding_visitor
33 public:
34 ifr_adding_visitor_structure (AST_Decl *scope);
36 virtual ~ifr_adding_visitor_structure (void);
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 (void) const;
46 private:
47 /// Common code called whether we are creating a new struct
48 /// or filling out a forward declaration.
49 int add_members (AST_Structure *node, CORBA::StructDef_ptr struct_def);
51 private:
52 /// Holder for the member list passed to create_struct() or
53 /// create_exception().
54 CORBA::StructMemberSeq members_;
57 #endif /* TAO_IFR_ADDING_VISITOR_STRUCTURE_H */