3 //=============================================================================
7 * Header file for class containing compiler back end global data.
9 * @author Jeff Parsons <parsons@cs.wustl.edu>
11 //=============================================================================
14 #ifndef TAO_IFR_BE_GLOBAL_H
15 #define TAO_IFR_BE_GLOBAL_H
17 #include "TAO_IFR_BE_Export.h"
18 #include "tao/IFR_Client/IFR_BasicC.h"
20 #include "ace/Containers.h"
21 #include "ace/SString.h"
23 #if !defined (ACE_LACKS_PRAGMA_ONCE)
25 #endif /* ACE_LACKS_PRAGMA_ONCE */
29 // Defines a class containing all back end global data.
31 class TAO_IFR_BE_Export BE_GlobalData
38 // Storage of global data specific to the compiler back end
44 virtual ~BE_GlobalData (void);
48 bool removing (void) const;
49 void removing (bool value
);
51 CORBA::ORB_ptr
orb (void) const;
52 void orb (CORBA::ORB_ptr orb
);
54 CORBA::Repository_ptr
repository (void) const;
55 void repository (CORBA::Repository_ptr repo
);
57 ACE_Unbounded_Stack
<CORBA::Container_ptr
> &ifr_scopes (void);
62 const char *filename (void) const;
63 void filename (char *fname
);
65 bool enable_locking (void) const;
66 void enable_locking (bool value
);
68 bool do_included_files (void) const;
69 void do_included_files (bool val
);
71 bool allow_duplicate_typedefs () const;
72 void allow_duplicate_typedefs (bool val
);
74 ACE_CString
orb_args (void) const;
75 void orb_args (const ACE_CString
& args
);
77 /// Command line passed to ACE_Process::spawn. Different
78 /// implementations in IDL and IFR backends.
79 ACE_CString
spawn_options (void);
81 /// Parse an argument that might affect the backend.
82 void parse_args (long &i
, char **av
);
85 /// Are we removing IR objects from the repository?
88 /// Reference to our ORB.
91 /// Reference to the interface repository.
92 CORBA::Repository_var repository_
;
94 /// Must be something unlikely to clash.
95 CORBA::String_var holding_scope_name_
;
97 /// IR object scope stack.
98 ACE_Unbounded_Stack
<CORBA::Container_ptr
> ifr_scopes_
;
100 /// Name of the IDL file we are processing.
103 /// Option to lock at the IDL file level.
104 bool enable_locking_
;
106 /// Option to process included IDL files.
107 bool do_included_files_
;
109 /// Option to enable duplicate typedefs in parsed IDL.
110 bool allow_duplicate_typedefs_
;
112 /// Holder for -ORB args saved and passed to DRV_fork.
113 ACE_CString orb_args_
;
116 #endif /* TAO_IFR_BE_GLOBAL_H */