ifr_adding_visitor_structure.h

Go to the documentation of this file.
00001 // $Id: ifr_adding_visitor_structure.h 78850 2007-07-12 10:50:02Z parsons $
00002 
00003 /* -*- C++ -*- */
00004 // ============================================================================
00005 //
00006 // = LIBRARY
00007 //    TAO_IFR_BE_DLL
00008 //
00009 // = FILENAME
00010 //    ifr_adding_visitor_structure.h
00011 //
00012 // = DESCRIPTION
00013 //    Header file for class ifr_adding_visitor_structure.
00014 //
00015 // = AUTHOR
00016 //    Jeff Parsons <parsons@cs.wustl.edu>
00017 //
00018 // ============================================================================
00019 
00020 #ifndef TAO_IFR_ADDING_VISITOR_STRUCTURE_H
00021 #define TAO_IFR_ADDING_VISITOR_STRUCTURE_H
00022 
00023 #include "ifr_adding_visitor.h"
00024 
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif /* ACE_LACKS_PRAGMA_ONCE */
00028 
00029 class ifr_adding_visitor_structure : public ifr_adding_visitor
00030 {
00031   //
00032   // = TITLE
00033   //    ifr_adding_visitor_structure.
00034   //
00035   // = DESCRIPTION
00036   //    This visitor overrides a few of the visit methods
00037   //    for the case when a struct or exception node is seen in the AST.
00038   //
00039 public:
00040   ifr_adding_visitor_structure (AST_Decl *scope,
00041                                 bool is_nested);
00042 
00043   virtual ~ifr_adding_visitor_structure (void);
00044 
00045   virtual int visit_scope (UTL_Scope *node);
00046   virtual int visit_structure (AST_Structure *node);
00047   virtual int visit_enum (AST_Enum *node);
00048   virtual int visit_union (AST_Union *node);
00049   
00050   virtual CORBA::IDLType_ptr ir_current (void) const;
00051   // Lets the visitor one level above acess this value.
00052 
00053 private:
00054   int add_members (AST_Structure *node, CORBA::StructDef_ptr struct_def);
00055   // Common code called whether we are creating a new struct
00056   // or filling out a forward declaration.
00057 
00058 private:
00059   bool is_nested_;
00060   // Is this visitor visiting a struct that was defined inside
00061   // a union, an exception, or another struct?
00062 
00063   CORBA::StructMemberSeq members_;
00064   // Holder for the member list passed to create_struct() or
00065   // create_exception().
00066 
00067   ACE_Unbounded_Queue<CORBA::Contained_ptr> move_queue_;
00068   // IR objects that must be moved into the scope (struct or
00069   // exception) where they were declared in the IDL file.
00070 };
00071 
00072 #endif /* TAO_IFR_ADDING_VISITOR_STRUCTURE_H */

Generated on Sun Jan 27 16:31:52 2008 for TAO_IFR by doxygen 1.3.6