Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / TAO_IDL / be_include / be_generator.h
blob115ac3a31a45aec297c9347ff17ab46d26a3f227
1 /*
3 COPYRIGHT
5 Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
6 States of America. All Rights Reserved.
8 This product is protected by copyright and distributed under the following
9 license restricting its use.
11 The Interface Definition Language Compiler Front End (CFE) is made
12 available for your use provided that you include this license and copyright
13 notice on all media and documentation and the software program in which
14 this product is incorporated in whole or part. You may copy and extend
15 functionality (but may not remove functionality) of the Interface
16 Definition Language CFE without charge, but you are not authorized to
17 license or distribute it to anyone else except as part of a product or
18 program developed by you or with the express written consent of Sun
19 Microsystems, Inc. ("Sun").
21 The names of Sun Microsystems, Inc. and any of its subsidiaries or
22 affiliates may not be used in advertising or publicity pertaining to
23 distribution of Interface Definition Language CFE as permitted herein.
25 This license is effective until terminated by Sun for failure to comply
26 with this license. Upon termination, you shall destroy or return all code
27 and documentation for the Interface Definition Language CFE.
29 INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
30 ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
31 FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
32 DEALING, USAGE OR TRADE PRACTICE.
34 INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
35 ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
36 TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
38 SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
39 RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
40 INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
42 IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
43 ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
44 DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
46 Use, duplication, or disclosure by the government is subject to
47 restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
48 Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
49 52.227-19.
51 Sun, Sun Microsystems and the Sun logo are trademarks or registered
52 trademarks of Sun Microsystems, Inc.
54 SunSoft, Inc.
55 2550 Garcia Avenue
56 Mountain View, California 94043
58 NOTE:
60 SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
61 trademarks or registered trademarks of Sun Microsystems, Inc.
65 #ifndef _BE_GENERATOR_BE_GENERATOR_HH
66 #define _BE_GENERATOR_BE_GENERATOR_HH
68 // Defines BE class for generator
70 // This defines the same protocol as the AST_Generator class but actually
71 // is implemented to create nodes of AST classes subclassed in this BE
73 #include "TAO_IDL_BE_Export.h"
74 #include "ast_generator.h"
76 class TAO_IDL_BE_Export be_generator : public AST_Generator
78 public:
79 // Create a node representing a module which is the root of an AST made
80 // up of BE nodes.
81 virtual AST_Root *create_root (UTL_ScopedName *n);
83 virtual AST_PredefinedType *create_predefined_type (
84 AST_PredefinedType::PredefinedType t,
85 UTL_ScopedName *n
88 virtual AST_Module *create_module (UTL_Scope *s,
89 UTL_ScopedName *n);
91 virtual AST_Interface *create_interface (UTL_ScopedName *n,
92 AST_Type **ih,
93 long nih,
94 AST_Interface **ih_flat,
95 long nih_flat,
96 bool is_local,
97 bool is_abstract);
99 virtual AST_InterfaceFwd *create_interface_fwd (UTL_ScopedName *n,
100 bool is_local,
101 bool is_abstract);
103 // Create a node representing a boxed value type
104 virtual AST_ValueBox *create_valuebox (UTL_ScopedName *n,
105 AST_Type *boxed_type);
107 virtual AST_ValueType *create_valuetype (UTL_ScopedName *n,
108 AST_Type **inherits,
109 long n_inherits,
110 AST_Type *inherits_concrete,
111 AST_Interface **inherits_flat,
112 long n_inherits_flat,
113 AST_Type **supports_list,
114 long n_supports,
115 AST_Type *supports_concrete,
116 bool is_abstract,
117 bool is_truncatable,
118 bool is_custom);
120 virtual AST_ValueTypeFwd *create_valuetype_fwd (UTL_ScopedName *n,
121 bool abstract);
123 virtual AST_EventType *create_eventtype (UTL_ScopedName *n,
124 AST_Type **inherits,
125 long n_inherits,
126 AST_Type *inherits_concrete,
127 AST_Interface **inherits_flat,
128 long n_inherits_flat,
129 AST_Type **supports_list,
130 long n_supports,
131 AST_Type *supports_concrete,
132 bool is_abstract,
133 bool is_truncatable,
134 bool is_custom);
136 virtual AST_EventTypeFwd *create_eventtype_fwd (UTL_ScopedName *n,
137 bool abstract);
139 virtual AST_Component *create_component (UTL_ScopedName *n,
140 AST_Component *base_component,
141 AST_Type **supports_list,
142 long n_supports,
143 AST_Interface **supports_flat,
144 long n_supports_flat);
146 virtual AST_ComponentFwd *create_component_fwd (UTL_ScopedName *n);
148 virtual AST_Home *create_home (UTL_ScopedName *n,
149 AST_Home *base_home,
150 AST_Component *managed_component,
151 AST_Type *primary_key,
152 AST_Type **supports_list,
153 long n_supports,
154 AST_Interface **supports_flat,
155 long n_supports_flat);
157 virtual AST_Exception *create_exception (UTL_ScopedName *n,
158 bool is_local,
159 bool is_abstract);
161 virtual AST_Structure *create_structure (UTL_ScopedName *n,
162 bool is_local,
163 bool is_abstract);
165 virtual AST_StructureFwd *create_structure_fwd (UTL_ScopedName *n);
167 virtual AST_Enum *create_enum (UTL_ScopedName *n,
168 bool is_local,
169 bool is_abstract);
171 virtual AST_Operation *create_operation (AST_Type *rt,
172 AST_Operation::Flags fl,
173 UTL_ScopedName *n,
174 bool is_local,
175 bool is_abstract);
177 virtual AST_Field *create_field (AST_Type *ft,
178 UTL_ScopedName *n,
179 AST_Field::Visibility vis =
180 AST_Field::vis_NA);
182 virtual AST_Argument *create_argument (AST_Argument::Direction d,
183 AST_Type *ft,
184 UTL_ScopedName *n);
186 virtual AST_Attribute *create_attribute (bool ro,
187 AST_Type *ft,
188 UTL_ScopedName *n,
189 bool is_local,
190 bool is_abstract);
192 virtual AST_Union *create_union (AST_ConcreteType *dt,
193 UTL_ScopedName *n,
194 bool is_local,
195 bool is_abstract);
197 virtual AST_UnionFwd *create_union_fwd (UTL_ScopedName *n);
199 virtual AST_UnionBranch *create_union_branch (UTL_LabelList *ll,
200 AST_Type *ft,
201 UTL_ScopedName *n);
203 virtual AST_UnionLabel *create_union_label (AST_UnionLabel::UnionLabel ul,
204 AST_Expression *lv);
206 virtual AST_Constant *create_constant (AST_Expression::ExprType et,
207 AST_Expression *ev,
208 UTL_ScopedName *n);
210 virtual AST_Expression *create_expr (UTL_ScopedName *n);
212 virtual AST_Expression *create_expr (AST_Expression *v,
213 AST_Expression::ExprType t);
215 virtual AST_Expression *create_expr (AST_Expression::ExprComb c,
216 AST_Expression *v1,
217 AST_Expression *v2);
219 virtual AST_Expression *create_expr (ACE_CDR::Long v);
221 virtual AST_Expression *create_expr (ACE_CDR::LongLong v);
223 virtual AST_Expression *create_expr (ACE_CDR::Boolean b);
225 virtual AST_Expression *create_expr (ACE_CDR::ULong v);
227 virtual AST_Expression *create_expr (ACE_CDR::ULongLong v);
229 virtual AST_Expression *create_expr (ACE_CDR::ULong v,
230 AST_Expression::ExprType t);
232 virtual AST_Expression *create_expr (UTL_String *s);
234 virtual AST_Expression *create_expr (char *s);
236 virtual AST_Expression *create_expr (ACE_CDR::Char c);
238 virtual AST_Expression *create_expr (ACE_OutputCDR::from_wchar wc);
240 virtual AST_Expression *create_expr (ACE_CDR::Double d);
242 virtual AST_Expression *create_expr (const ACE_CDR::Fixed &f);
244 virtual AST_EnumVal *create_enum_val (ACE_CDR::ULong v,
245 UTL_ScopedName *n);
247 virtual AST_Array *create_array (UTL_ScopedName *n,
248 ACE_CDR::ULong ndims,
249 UTL_ExprList *dims,
250 bool is_local,
251 bool is_abstract);
253 virtual AST_Sequence *create_sequence (AST_Expression *v,
254 AST_Type *bt,
255 UTL_ScopedName *n,
256 bool is_local,
257 bool is_abstract);
259 virtual AST_Map *create_map (AST_Expression *v,
260 AST_Type *kt,
261 AST_Type *vt,
262 UTL_ScopedName *n,
263 bool is_local,
264 bool is_abstract);
266 virtual AST_String *create_string (AST_Expression *v);
268 virtual AST_String *create_wstring (AST_Expression *v);
270 virtual AST_Fixed *create_fixed (AST_Expression *digits,
271 AST_Expression *scale);
273 virtual AST_Typedef *create_typedef (AST_Type *bt,
274 UTL_ScopedName *n,
275 bool is_local,
276 bool is_abstract);
278 // Create a node representing a native
279 virtual AST_Native *create_native (UTL_ScopedName *n);
281 // Create a node representing a OBV or home factory construct
282 virtual AST_Factory *create_factory (UTL_ScopedName *n);
284 // Create a node representing an home finder construct.
285 virtual AST_Finder *create_finder (UTL_ScopedName *n);
287 virtual
288 AST_PortType *create_porttype (UTL_ScopedName *n);
290 virtual
291 AST_Provides *create_provides (UTL_ScopedName *n,
292 AST_Type *provides_type);
294 virtual
295 AST_Uses *create_uses (UTL_ScopedName *n,
296 AST_Type *uses_type,
297 bool is_multiple);
299 virtual
300 AST_Publishes *create_publishes (UTL_ScopedName *n,
301 AST_Type *publishes_type);
303 virtual
304 AST_Emits *create_emits (UTL_ScopedName *n,
305 AST_Type *emits_type);
307 virtual
308 AST_Consumes *create_consumes (UTL_ScopedName *n,
309 AST_Type *consumes_type);
310 virtual
311 AST_Extended_Port *create_extended_port (
312 UTL_ScopedName *n,
313 AST_PortType *porttype_ref);
315 virtual
316 AST_Mirror_Port *create_mirror_port (
317 UTL_ScopedName *n,
318 AST_PortType *porttype_ref);
320 virtual
321 AST_Connector *create_connector (
322 UTL_ScopedName *n,
323 AST_Connector *base_connector);
325 virtual
326 AST_Template_Module *create_template_module (
327 UTL_ScopedName *n,
328 FE_Utils::T_PARAMLIST_INFO *template_params);
330 virtual
331 AST_Template_Module_Inst *create_template_module_inst (
332 UTL_ScopedName *n,
333 AST_Template_Module *ref,
334 FE_Utils::T_ARGLIST *template_args);
336 virtual
337 AST_Template_Module_Ref *create_template_module_ref (
338 UTL_ScopedName *n,
339 AST_Template_Module *ref,
340 UTL_StrList *param_refs);
342 virtual
343 AST_Param_Holder *create_param_holder (
344 UTL_ScopedName *parameter_name,
345 FE_Utils::T_Param_Info *info);
348 #endif // _BE_GENERATOR_BE_GENERATOR_HH