be_global.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 // be_global.h,v 1.10 2006/02/09 16:48:01 parsons Exp
00003 
00004 // ============================================================================
00005 //
00006 // = LIBRARY
00007 //    TAO_IFR_BE_DLL
00008 //
00009 // = FILENAME
00010 //    be_global.h
00011 //
00012 // = DESCRIPTION
00013 //    Header file for class containing compiler back end global data.
00014 //
00015 // = AUTHOR
00016 //    Jeff Parsons <parsons@cs.wustl.edu>
00017 //
00018 // ============================================================================
00019 
00020 #ifndef TAO_IFR_BE_GLOBAL_H
00021 #define TAO_IFR_BE_GLOBAL_H
00022 
00023 #include "TAO_IFR_BE_Export.h"
00024 #include "tao/IFR_Client/IFR_BasicC.h"
00025 #include "tao/ORB.h"
00026 #include "ace/Containers.h"
00027 #include "ace/SString.h"
00028 
00029 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00030 # pragma once
00031 #endif /* ACE_LACKS_PRAGMA_ONCE */
00032 
00033 class AST_Generator;
00034 
00035 // Defines a class containing all back end global data.
00036 
00037 class TAO_IFR_BE_Export BE_GlobalData
00038 {
00039 public:
00040   // = TITLE
00041   //    BE_GlobalData
00042   //
00043   // = DESCRIPTION
00044   //    Storage of global data specific to the compiler back end
00045   //
00046   BE_GlobalData (void);
00047   // Constructor.
00048 
00049   virtual ~BE_GlobalData (void);
00050   // Destructor.
00051 
00052   // Data accessors.
00053 
00054   bool removing (void) const;
00055   void removing (bool value);
00056 
00057   CORBA::ORB_ptr orb (void) const;
00058   void orb (CORBA::ORB_ptr orb);
00059 
00060   CORBA::Repository_ptr repository (void) const;
00061   void repository (CORBA::Repository_ptr repo);
00062 
00063   CORBA::ModuleDef_ptr holding_scope (void) const;
00064   void holding_scope (CORBA::ModuleDef_ptr scope);
00065 
00066   const char *holding_scope_name (void) const;
00067 
00068   ACE_Unbounded_Stack<CORBA::Container_ptr> &ifr_scopes (void);
00069 
00070   void destroy (void);
00071   // Cleanup function.
00072 
00073   const char *filename (void) const;
00074   void filename (char *fname);
00075 
00076   bool enable_locking (void) const;
00077   void enable_locking (bool value);
00078 
00079   bool do_included_files (void) const;
00080   void do_included_files (bool val);
00081 
00082   ACE_CString orb_args (void) const;
00083   void orb_args (const ACE_CString& args);
00084 
00085   ACE_CString spawn_options (void);
00086   // Command line passed to ACE_Process::spawn. Different
00087   // implementations in IDL and IFR backends.
00088 
00089   void parse_args (long &i, char **av);
00090   // Parse args that affect the backend.
00091 
00092   void prep_be_arg (char *s);
00093   // Special BE arg call factored out of DRV_args.
00094 
00095   void arg_post_proc (void);
00096   // Checks made after parsing args.
00097 
00098   void usage (void) const;
00099   // Display usage of BE-specific options.
00100 
00101   AST_Generator *generator_init (void);
00102   // Create an AST node generator.
00103 
00104 private:
00105   bool removing_;
00106   // Are we removing IR objects from the repository?
00107 
00108   CORBA::ORB_var orb_;
00109   // Reference to our ORB.
00110 
00111   CORBA::Repository_var repository_;
00112   // Reference to the interface repository.
00113 
00114   CORBA::ModuleDef_var holding_scope_;
00115   // Used to hold struct/union/exception member defns until
00116   // they are moved into their permanent scope.
00117 
00118   CORBA::String_var holding_scope_name_;
00119   // Must be something unlikely to clash.
00120 
00121   ACE_Unbounded_Stack<CORBA::Container_ptr> ifr_scopes_;
00122   // IR object scope stack.
00123 
00124   char *filename_;
00125   // Name of the IDL file we are processing.
00126 
00127   bool enable_locking_;
00128   // Option to lock at the IDL file level.
00129 
00130   bool do_included_files_;
00131   // Option to process included IDL files.
00132 
00133   ACE_CString orb_args_;
00134   //Holder for -ORB args saved and passed to DRV_fork.
00135 };
00136 
00137 #endif /* TAO_IFR_BE_GLOBAL_H */

Generated on Thu Nov 9 14:11:49 2006 for TAO_IFR by doxygen 1.3.6