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
51 Sun, Sun Microsystems and the Sun logo are trademarks or registered
52 trademarks of Sun Microsystems, Inc.
56 Mountain View, California 94043
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
79 // Create a node representing a module which is the root of an AST made
81 virtual AST_Root
*create_root (UTL_ScopedName
*n
);
83 virtual AST_PredefinedType
*create_predefined_type (
84 AST_PredefinedType::PredefinedType t
,
88 virtual AST_Module
*create_module (UTL_Scope
*s
,
91 virtual AST_Interface
*create_interface (UTL_ScopedName
*n
,
94 AST_Interface
**ih_flat
,
99 virtual AST_InterfaceFwd
*create_interface_fwd (UTL_ScopedName
*n
,
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
,
110 AST_Type
*inherits_concrete
,
111 AST_Interface
**inherits_flat
,
112 long n_inherits_flat
,
113 AST_Type
**supports_list
,
115 AST_Type
*supports_concrete
,
120 virtual AST_ValueTypeFwd
*create_valuetype_fwd (UTL_ScopedName
*n
,
123 virtual AST_EventType
*create_eventtype (UTL_ScopedName
*n
,
126 AST_Type
*inherits_concrete
,
127 AST_Interface
**inherits_flat
,
128 long n_inherits_flat
,
129 AST_Type
**supports_list
,
131 AST_Type
*supports_concrete
,
136 virtual AST_EventTypeFwd
*create_eventtype_fwd (UTL_ScopedName
*n
,
139 virtual AST_Component
*create_component (UTL_ScopedName
*n
,
140 AST_Component
*base_component
,
141 AST_Type
**supports_list
,
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
,
150 AST_Component
*managed_component
,
151 AST_Type
*primary_key
,
152 AST_Type
**supports_list
,
154 AST_Interface
**supports_flat
,
155 long n_supports_flat
);
157 virtual AST_Exception
*create_exception (UTL_ScopedName
*n
,
161 virtual AST_Structure
*create_structure (UTL_ScopedName
*n
,
165 virtual AST_StructureFwd
*create_structure_fwd (UTL_ScopedName
*n
);
167 virtual AST_Enum
*create_enum (UTL_ScopedName
*n
,
171 virtual AST_Operation
*create_operation (AST_Type
*rt
,
172 AST_Operation::Flags fl
,
177 virtual AST_Field
*create_field (AST_Type
*ft
,
179 AST_Field::Visibility vis
=
182 virtual AST_Argument
*create_argument (AST_Argument::Direction d
,
186 virtual AST_Attribute
*create_attribute (bool ro
,
192 virtual AST_Union
*create_union (AST_ConcreteType
*dt
,
197 virtual AST_UnionFwd
*create_union_fwd (UTL_ScopedName
*n
);
199 virtual AST_UnionBranch
*create_union_branch (UTL_LabelList
*ll
,
203 virtual AST_UnionLabel
*create_union_label (AST_UnionLabel::UnionLabel ul
,
206 virtual AST_Constant
*create_constant (AST_Expression::ExprType et
,
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
,
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
,
247 virtual AST_Array
*create_array (UTL_ScopedName
*n
,
248 ACE_CDR::ULong ndims
,
253 virtual AST_Sequence
*create_sequence (AST_Expression
*v
,
259 virtual AST_Map
*create_map (AST_Expression
*v
,
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
,
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
);
288 AST_PortType
*create_porttype (UTL_ScopedName
*n
);
291 AST_Provides
*create_provides (UTL_ScopedName
*n
,
292 AST_Type
*provides_type
);
295 AST_Uses
*create_uses (UTL_ScopedName
*n
,
300 AST_Publishes
*create_publishes (UTL_ScopedName
*n
,
301 AST_Type
*publishes_type
);
304 AST_Emits
*create_emits (UTL_ScopedName
*n
,
305 AST_Type
*emits_type
);
308 AST_Consumes
*create_consumes (UTL_ScopedName
*n
,
309 AST_Type
*consumes_type
);
311 AST_Extended_Port
*create_extended_port (
313 AST_PortType
*porttype_ref
);
316 AST_Mirror_Port
*create_mirror_port (
318 AST_PortType
*porttype_ref
);
321 AST_Connector
*create_connector (
323 AST_Connector
*base_connector
);
326 AST_Template_Module
*create_template_module (
328 FE_Utils::T_PARAMLIST_INFO
*template_params
);
331 AST_Template_Module_Inst
*create_template_module_inst (
333 AST_Template_Module
*ref
,
334 FE_Utils::T_ARGLIST
*template_args
);
337 AST_Template_Module_Ref
*create_template_module_ref (
339 AST_Template_Module
*ref
,
340 UTL_StrList
*param_refs
);
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