Remove redundant void from tao_idl
[ACE_TAO.git] / TAO / TAO_IDL / be / be_generator.cpp
bloba49a1800b61997985a5fc500b80cfaa18b9fb2b9
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 // Implementation of BE generator class.
67 // This implements the same protocol as AST_Generator but creates instances
68 // of the BE-subclassed classes instead of of AST classes.
70 #include "be_generator.h"
71 #include "be_root.h"
72 #include "be_predefined_type.h"
73 #include "be_module.h"
74 #include "be_valuebox.h"
75 #include "be_valuetype.h"
76 #include "be_valuetype_fwd.h"
77 #include "be_eventtype.h"
78 #include "be_eventtype_fwd.h"
79 #include "be_component.h"
80 #include "be_component_fwd.h"
81 #include "be_home.h"
82 #include "be_porttype.h"
83 #include "be_mirror_port.h"
84 #include "be_connector.h"
85 #include "be_template_module.h"
86 #include "be_template_module_inst.h"
87 #include "be_template_module_ref.h"
88 #include "be_param_holder.h"
89 #include "be_provides.h"
90 #include "be_uses.h"
91 #include "be_publishes.h"
92 #include "be_emits.h"
93 #include "be_consumes.h"
94 #include "be_union.h"
95 #include "be_union_fwd.h"
96 #include "be_structure.h"
97 #include "be_structure_fwd.h"
98 #include "be_exception.h"
99 #include "be_operation.h"
100 #include "be_enum.h"
101 #include "be_field.h"
102 #include "be_argument.h"
103 #include "be_attribute.h"
104 #include "be_union_branch.h"
105 #include "be_union_label.h"
106 #include "be_constant.h"
107 #include "be_expression.h"
108 #include "be_enum_val.h"
109 #include "be_array.h"
110 #include "be_sequence.h"
111 #include "be_string.h"
112 #include "be_typedef.h"
113 #include "be_native.h"
114 #include "be_fixed.h"
115 #include "be_factory.h"
116 #include "be_finder.h"
117 #include "utl_identifier.h"
118 #include "nr_extern.h"
119 #include "ace/config-all.h"
121 AST_Root *
122 be_generator::create_root (UTL_ScopedName *n)
124 be_root *retval = 0;
125 ACE_NEW_RETURN (retval,
126 be_root (n),
129 return retval;
132 AST_PredefinedType *
133 be_generator::create_predefined_type (AST_PredefinedType::PredefinedType t,
134 UTL_ScopedName *n)
136 be_predefined_type *retval = 0;
137 ACE_NEW_RETURN (retval,
138 be_predefined_type (t,
142 return retval;
145 AST_Module *
146 be_generator::create_module (UTL_Scope *s,
147 UTL_ScopedName *n)
149 AST_Module *retval = 0;
151 // Check for another module of the same name in this scope.
152 for (UTL_ScopeActiveIterator iter (s, UTL_Scope::IK_decls);
153 !iter.is_done ();
154 iter.next ())
156 // Can't just check node type here, since it could be a
157 // template module or template module instantiation.
158 AST_Module *m = dynamic_cast<AST_Module*> (iter.item ());
160 if (m && m->local_name ()->compare (n->last_component ()))
162 // Create this new module with referance to the
163 // "first" previous module found in scope.
164 ACE_NEW_RETURN (retval, be_module (n, m), 0);
165 retval->prefix (const_cast<char *> (m->prefix ()));
166 return retval;
170 // Since the scope didn't contain the same module name, it
171 // doesn't mean that we haven't see it before. If the scope
172 // is itself a module, and has been previously opened, any
173 // of the previous openings may contain a previous opening
174 // of the module we're creating.
175 AST_Module *prev_module = dynamic_cast<AST_Module*> (s);
176 if (prev_module)
178 while (!!(prev_module = prev_module->previous_opening ()))
180 for (UTL_ScopeActiveIterator iter (prev_module, UTL_Scope::IK_decls);
181 !iter.is_done ();
182 iter.next ())
184 AST_Module *m = dynamic_cast<AST_Module*> (iter.item ());
185 if (m && m->local_name ()->compare (n->last_component ()))
187 // Create this new module with referance to the
188 // "first" previous module found in scope.
189 ACE_NEW_RETURN (retval, be_module (n, m), 0);
190 return retval;
196 // There is no previous module to be found
197 ACE_NEW_RETURN (retval, be_module (n), 0);
198 return retval;
201 AST_Interface *
202 be_generator::create_interface (UTL_ScopedName *n,
203 AST_Type **ih,
204 long nih,
205 AST_Interface **ih_flat,
206 long nih_flat,
207 bool l,
208 bool a)
210 be_interface *retval = 0;
211 ACE_NEW_RETURN (retval,
212 be_interface (n,
214 nih,
215 ih_flat,
216 nih_flat,
221 /// Trigger this interation over the included pragmas when the
222 /// first local interface is seen in the main file. In an
223 /// executor IDL file (the case we want), this happens near the
224 /// top. In other files, it will do no harm.
225 if (l && idl_global->in_main_file ())
227 FE_Utils::create_implied_ami_uses_stuff ();
230 return retval;
233 AST_InterfaceFwd *
234 be_generator::create_interface_fwd (UTL_ScopedName *n,
235 bool is_local,
236 bool is_abstract)
238 AST_Interface *full_defn = this->create_interface (n,
243 is_local,
244 is_abstract);
246 be_interface_fwd *retval = 0;
247 ACE_NEW_RETURN (retval,
248 be_interface_fwd (full_defn,
252 full_defn->fwd_decl (retval);
253 return retval;
256 AST_ValueBox *
257 be_generator::create_valuebox (UTL_ScopedName *n,
258 AST_Type *boxed_type)
260 be_valuebox *retval = 0;
261 ACE_NEW_RETURN (retval,
262 be_valuebox (boxed_type,
266 return retval;
269 AST_ValueType *
270 be_generator::create_valuetype (UTL_ScopedName *n,
271 AST_Type **inherits,
272 long n_inherits,
273 AST_Type *inherits_concrete,
274 AST_Interface **inherits_flat,
275 long n_inherits_flat,
276 AST_Type **supports_list,
277 long n_supports,
278 AST_Type *supports_concrete,
279 bool is_abstract,
280 bool is_truncatable,
281 bool is_custom)
283 be_valuetype *retval = 0;
284 ACE_NEW_RETURN (retval,
285 be_valuetype (n,
286 inherits,
287 n_inherits,
288 inherits_concrete,
289 inherits_flat,
290 n_inherits_flat,
291 supports_list,
292 n_supports,
293 supports_concrete,
294 is_abstract,
295 is_truncatable,
296 is_custom),
299 return retval;
302 AST_ValueTypeFwd *
303 be_generator::create_valuetype_fwd (UTL_ScopedName *n,
304 bool is_abstract)
306 AST_ValueType *full_defn = this->create_valuetype (n,
315 is_abstract,
316 false,
317 false);
319 be_valuetype_fwd *retval = 0;
320 ACE_NEW_RETURN (retval,
321 be_valuetype_fwd (full_defn,
325 full_defn->fwd_decl (retval);
326 return retval;
329 AST_EventType *
330 be_generator::create_eventtype (UTL_ScopedName *n,
331 AST_Type **inherits,
332 long n_inherits,
333 AST_Type *inherits_concrete,
334 AST_Interface **inherits_flat,
335 long n_inherits_flat,
336 AST_Type **supports_list,
337 long n_supports,
338 AST_Type *supports_concrete,
339 bool is_abstract,
340 bool is_truncatable,
341 bool is_custom)
343 be_eventtype *retval = 0;
344 ACE_NEW_RETURN (retval,
345 be_eventtype (n,
346 inherits,
347 n_inherits,
348 inherits_concrete,
349 inherits_flat,
350 n_inherits_flat,
351 supports_list,
352 n_supports,
353 supports_concrete,
354 is_abstract,
355 is_truncatable,
356 is_custom),
359 return retval;
362 AST_EventTypeFwd *
363 be_generator::create_eventtype_fwd (UTL_ScopedName *n,
364 bool is_abstract)
366 AST_EventType *full_defn = this->create_eventtype (n,
375 is_abstract,
376 false,
377 false);
379 be_eventtype_fwd *retval = 0;
380 ACE_NEW_RETURN (retval,
381 be_eventtype_fwd (full_defn,
385 full_defn->fwd_decl (retval);
386 return retval;
389 AST_Component *
390 be_generator::create_component (UTL_ScopedName *n,
391 AST_Component *base_component,
392 AST_Type **supports_list,
393 long n_supports,
394 AST_Interface **supports_flat,
395 long n_supports_flat)
397 be_component *retval = 0;
398 ACE_NEW_RETURN (retval,
399 be_component (n,
400 base_component,
401 supports_list,
402 n_supports,
403 supports_flat,
404 n_supports_flat),
407 return retval;
410 AST_ComponentFwd *
411 be_generator::create_component_fwd (UTL_ScopedName *n)
413 AST_Component *full_defn = this->create_component (n,
420 be_component_fwd *retval = 0;
421 ACE_NEW_RETURN (retval,
422 be_component_fwd (full_defn,
426 full_defn->fwd_decl (retval);
427 return retval;
430 AST_Home *
431 be_generator::create_home (UTL_ScopedName *n,
432 AST_Home *base_home,
433 AST_Component *managed_component,
434 AST_Type *primary_key,
435 AST_Type **supports_list,
436 long n_supports,
437 AST_Interface **supports_flat,
438 long n_supports_flat)
440 be_home *retval = 0;
441 ACE_NEW_RETURN (retval,
442 be_home (n,
443 base_home,
444 managed_component,
445 primary_key,
446 supports_list,
447 n_supports,
448 supports_flat,
449 n_supports_flat),
452 return retval;
455 AST_Exception *
456 be_generator::create_exception (UTL_ScopedName *n,
457 bool is_local,
458 bool is_abstract)
460 be_exception *retval = 0;
461 ACE_NEW_RETURN (retval,
462 be_exception (n,
463 is_local,
464 is_abstract),
467 return retval;
470 AST_Structure *
471 be_generator::create_structure (UTL_ScopedName *n,
472 bool is_local,
473 bool is_abstract)
475 be_structure *retval = 0;
476 ACE_NEW_RETURN (retval,
477 be_structure (n,
478 is_local,
479 is_abstract),
482 return retval;
485 AST_StructureFwd *
486 be_generator::create_structure_fwd (UTL_ScopedName *n)
489 AST_Structure *full_defn = this->create_structure (n,
490 false,
491 false);
492 be_structure_fwd *retval = 0;
493 ACE_NEW_RETURN (retval,
494 be_structure_fwd (full_defn,
498 full_defn->fwd_decl (retval);
499 return retval;
502 AST_Enum *
503 be_generator::create_enum (UTL_ScopedName *n,
504 bool is_local,
505 bool is_abstract)
507 be_enum *retval = 0;
508 ACE_NEW_RETURN (retval,
509 be_enum (n,
510 is_local,
511 is_abstract),
514 return retval;
517 AST_Operation *
518 be_generator::create_operation (AST_Type *rt,
519 AST_Operation::Flags fl,
520 UTL_ScopedName *n,
521 bool is_local,
522 bool is_abstract)
524 be_operation *retval = 0;
525 ACE_NEW_RETURN (retval,
526 be_operation (rt,
529 is_local,
530 is_abstract),
533 return retval;
536 AST_Field *
537 be_generator::create_field (AST_Type *ft,
538 UTL_ScopedName *n,
539 AST_Field::Visibility vis)
541 be_field *retval = 0;
542 ACE_NEW_RETURN (retval,
543 be_field (ft,
545 vis),
548 return retval;
551 AST_Argument *
552 be_generator::create_argument (AST_Argument::Direction d,
553 AST_Type *ft,
554 UTL_ScopedName *n)
556 be_argument *retval = 0;
557 ACE_NEW_RETURN (retval,
558 be_argument (d,
563 return retval;
566 AST_Attribute *
567 be_generator::create_attribute (bool ro,
568 AST_Type *ft,
569 UTL_ScopedName *n,
570 bool is_local,
571 bool is_abstract)
573 be_attribute *retval = 0;
574 ACE_NEW_RETURN (retval,
575 be_attribute (ro,
578 is_local,
579 is_abstract),
582 return retval;
585 AST_Union *
586 be_generator::create_union (AST_ConcreteType *dt,
587 UTL_ScopedName *n,
588 bool is_local,
589 bool is_abstract)
591 be_union *retval = 0;
592 ACE_NEW_RETURN (retval,
593 be_union (dt,
595 is_local,
596 is_abstract),
599 return retval;
602 AST_UnionFwd *
603 be_generator::create_union_fwd (UTL_ScopedName *n)
605 AST_Union *full_defn = this->create_union (0,
607 false,
608 false);
609 be_union_fwd *retval = 0;
610 ACE_NEW_RETURN (retval,
611 be_union_fwd (full_defn,
615 full_defn->fwd_decl (retval);
616 return retval;
619 AST_UnionBranch *
620 be_generator::create_union_branch (UTL_LabelList *ll,
621 AST_Type *ft,
622 UTL_ScopedName *n)
624 be_union_branch *retval = 0;
625 ACE_NEW_RETURN (retval,
626 be_union_branch (ll,
631 return retval;
634 AST_UnionLabel *
635 be_generator::create_union_label (AST_UnionLabel::UnionLabel ul,
636 AST_Expression *lv)
638 be_union_label *retval = 0;
639 ACE_NEW_RETURN (retval,
640 be_union_label (ul,
641 lv),
644 return retval;
647 AST_Constant *
648 be_generator::create_constant (AST_Expression::ExprType et,
649 AST_Expression *ev,
650 UTL_ScopedName *n)
652 be_constant *retval = 0;
653 ACE_NEW_RETURN (retval,
654 be_constant (et,
659 return retval;
662 AST_Expression *
663 be_generator::create_expr (UTL_ScopedName *n)
665 be_expression *retval = 0;
666 ACE_NEW_RETURN (retval,
667 be_expression (n),
670 return retval;
673 AST_Expression *
674 be_generator::create_expr (AST_Expression *b,
675 AST_Expression::ExprType t)
677 be_expression *retval = 0;
678 ACE_NEW_RETURN (retval,
679 be_expression (b,
683 return retval;
686 AST_Expression *
687 be_generator::create_expr (AST_Expression::ExprComb c,
688 AST_Expression *v1,
689 AST_Expression *v2)
691 be_expression *retval = 0;
692 ACE_NEW_RETURN (retval,
693 be_expression (c,
695 v2),
698 return retval;
701 AST_Expression *
702 be_generator::create_expr (ACE_CDR::Long l)
704 be_expression *retval = 0;
705 ACE_NEW_RETURN (retval,
706 be_expression (l),
709 return retval;
712 AST_Expression *
713 be_generator::create_expr (ACE_CDR::LongLong l)
715 be_expression *retval = 0;
716 ACE_NEW_RETURN (retval,
717 be_expression (l),
720 return retval;
723 AST_Expression *
724 be_generator::create_expr (ACE_CDR::Boolean b)
726 be_expression *retval = 0;
727 ACE_NEW_RETURN (retval,
728 be_expression (b),
731 return retval;
734 AST_Expression *
735 be_generator::create_expr (ACE_CDR::ULong l)
737 be_expression *retval = 0;
738 ACE_NEW_RETURN (retval,
739 be_expression (l),
742 return retval;
745 AST_Expression *
746 be_generator::create_expr (ACE_CDR::ULongLong l)
748 be_expression *retval = 0;
749 ACE_NEW_RETURN (retval,
750 be_expression (l),
753 return retval;
756 AST_Expression *
757 be_generator::create_expr (ACE_CDR::ULong l,
758 AST_Expression::ExprType t)
760 be_expression *retval = 0;
761 ACE_NEW_RETURN (retval,
762 be_expression (l, t),
765 return retval;
768 AST_Expression *
769 be_generator::create_expr (UTL_String *s)
771 be_expression *retval = 0;
772 ACE_NEW_RETURN (retval,
773 be_expression (s),
776 return retval;
779 AST_Expression *
780 be_generator::create_expr (ACE_CDR::Char c)
782 be_expression *retval = 0;
783 ACE_NEW_RETURN (retval,
784 be_expression (c),
787 return retval;
790 AST_Expression *
791 be_generator::create_expr (ACE_OutputCDR::from_wchar wc)
793 be_expression *retval = 0;
794 ACE_NEW_RETURN (retval,
795 be_expression (wc),
798 return retval;
801 AST_Expression *
802 be_generator::create_expr (char *s)
804 be_expression *retval = 0;
805 ACE_NEW_RETURN (retval,
806 be_expression (s),
809 return retval;
812 AST_Expression *
813 be_generator::create_expr (ACE_CDR::Double d)
815 be_expression *retval = 0;
816 ACE_NEW_RETURN (retval,
817 be_expression (d),
820 return retval;
823 AST_Expression *
824 be_generator::create_expr (const ACE_CDR::Fixed &f)
826 be_expression *retval = 0;
827 ACE_NEW_RETURN (retval,
828 be_expression (f),
831 return retval;
834 AST_EnumVal *
835 be_generator::create_enum_val (ACE_CDR::ULong v,
836 UTL_ScopedName *n)
838 be_enum_val *retval = 0;
839 ACE_NEW_RETURN (retval,
840 be_enum_val (v,
844 return retval;
847 AST_Array *
848 be_generator::create_array (UTL_ScopedName *n,
849 ACE_CDR::ULong ndims,
850 UTL_ExprList *dims,
851 bool is_local,
852 bool is_abstract)
854 be_array *retval = 0;
855 ACE_NEW_RETURN (retval,
856 be_array (n,
857 ndims,
858 dims,
859 is_local,
860 is_abstract),
863 return retval;
866 AST_Sequence *
867 be_generator::create_sequence (AST_Expression *v,
868 AST_Type *bt,
869 UTL_ScopedName *n,
870 bool is_local,
871 bool is_abstract)
873 be_sequence *retval = 0;
874 ACE_NEW_RETURN (retval,
875 be_sequence (v,
878 is_local,
879 is_abstract),
882 return retval;
885 AST_String *
886 be_generator::create_string (AST_Expression *v)
888 Identifier id ("string");
889 UTL_ScopedName n (&id,
892 be_string *retval = 0;
893 ACE_NEW_RETURN (retval,
894 be_string (AST_Decl::NT_string,
900 return retval;
903 AST_String *
904 be_generator::create_wstring (AST_Expression *v)
906 Identifier id (sizeof (ACE_CDR::WChar) == 1
907 ? "string"
908 : "wstring");
909 UTL_ScopedName n (&id,
911 AST_Decl::NodeType nt = sizeof (ACE_CDR::WChar) == 1
912 ? AST_Decl::NT_string
913 : AST_Decl::NT_wstring;
915 be_string *retval = 0;
916 ACE_NEW_RETURN (retval,
917 be_string (nt,
920 sizeof (ACE_CDR::WChar)),
923 return retval;
926 AST_Fixed *
927 be_generator::create_fixed (AST_Expression *digits,
928 AST_Expression *scale)
930 Identifier id ("fixed");
931 UTL_ScopedName name (&id, 0);
932 AST_Fixed *retval = 0;
933 ACE_NEW_RETURN (retval, be_fixed (&name, digits, scale), 0);
934 return retval;
937 AST_Typedef *
938 be_generator::create_typedef (AST_Type *bt,
939 UTL_ScopedName *n,
940 bool is_local,
941 bool is_abstract)
943 be_typedef *retval = 0;
944 ACE_NEW_RETURN (retval,
945 be_typedef (bt,
947 is_local,
948 is_abstract),
951 return retval;
954 AST_Native *
955 be_generator::create_native (UTL_ScopedName *n)
957 be_native *retval = 0;
958 ACE_NEW_RETURN (retval,
959 be_native (n),
962 return retval;
965 AST_Factory *
966 be_generator::create_factory (UTL_ScopedName *n)
968 be_factory *retval = 0;
969 ACE_NEW_RETURN (retval,
970 be_factory (n),
973 return retval;
976 AST_Finder *
977 be_generator::create_finder (UTL_ScopedName *n)
979 be_finder *retval = 0;
980 ACE_NEW_RETURN (retval,
981 be_finder (n),
984 return retval;
987 AST_PortType *
988 be_generator::create_porttype (UTL_ScopedName *n)
990 be_porttype *retval = 0;
991 ACE_NEW_RETURN (retval,
992 be_porttype (n),
995 return retval;
998 AST_Provides *
999 be_generator::create_provides (UTL_ScopedName *n,
1000 AST_Type *provides_type)
1002 be_provides *retval = 0;
1003 ACE_NEW_RETURN (retval,
1004 be_provides (n,
1005 provides_type),
1008 return retval;
1011 AST_Uses *
1012 be_generator::create_uses (UTL_ScopedName *n,
1013 AST_Type *uses_type,
1014 bool is_multiple)
1016 be_uses *retval = 0;
1017 ACE_NEW_RETURN (retval,
1018 be_uses (n,
1019 uses_type,
1020 is_multiple),
1023 return retval;
1026 AST_Publishes *
1027 be_generator::create_publishes (UTL_ScopedName *n,
1028 AST_Type *publishes_type)
1030 be_publishes *retval = 0;
1031 ACE_NEW_RETURN (retval,
1032 be_publishes (n,
1033 publishes_type),
1036 return retval;
1039 AST_Emits *
1040 be_generator::create_emits (UTL_ScopedName *n,
1041 AST_Type *emits_type)
1043 be_emits *retval = 0;
1044 ACE_NEW_RETURN (retval,
1045 be_emits (n,
1046 emits_type),
1049 return retval;
1051 AST_Consumes *
1052 be_generator::create_consumes (UTL_ScopedName *n,
1053 AST_Type *consumes_type)
1055 be_consumes *retval = 0;
1056 ACE_NEW_RETURN (retval,
1057 be_consumes (n,
1058 consumes_type),
1061 return retval;
1064 AST_Extended_Port *
1065 be_generator::create_extended_port (
1066 UTL_ScopedName *n,
1067 AST_PortType *porttype_ref)
1069 be_extended_port *retval = 0;
1070 ACE_NEW_RETURN (retval,
1071 be_extended_port (n,
1072 porttype_ref),
1075 return retval;
1078 AST_Mirror_Port *
1079 be_generator::create_mirror_port (
1080 UTL_ScopedName *n,
1081 AST_PortType *porttype_ref)
1083 be_mirror_port *retval = 0;
1084 ACE_NEW_RETURN (retval,
1085 be_mirror_port (n,
1086 porttype_ref),
1089 return retval;
1092 AST_Connector *
1093 be_generator::create_connector (
1094 UTL_ScopedName *n,
1095 AST_Connector *base_connector)
1097 be_connector *retval = 0;
1098 ACE_NEW_RETURN (retval,
1099 be_connector (n,
1100 base_connector),
1103 return retval;
1106 AST_Template_Module *
1107 be_generator::create_template_module (
1108 UTL_ScopedName *n,
1109 FE_Utils::T_PARAMLIST_INFO *template_params)
1111 be_template_module *retval = 0;
1112 ACE_NEW_RETURN (retval,
1113 be_template_module (n,
1114 template_params),
1117 return retval;
1120 AST_Template_Module_Inst *
1121 be_generator::create_template_module_inst (
1122 UTL_ScopedName *n,
1123 AST_Template_Module *ref,
1124 FE_Utils::T_ARGLIST *template_args)
1126 be_template_module_inst *retval = 0;
1127 ACE_NEW_RETURN (retval,
1128 be_template_module_inst (n,
1129 ref,
1130 template_args),
1133 return retval;
1136 AST_Template_Module_Ref *
1137 be_generator::create_template_module_ref (
1138 UTL_ScopedName *n,
1139 AST_Template_Module *ref,
1140 UTL_StrList *param_refs)
1142 be_template_module_ref *retval = 0;
1143 ACE_NEW_RETURN (retval,
1144 be_template_module_ref (n,
1145 ref,
1146 param_refs),
1149 return retval;
1152 AST_Param_Holder *
1153 be_generator::create_param_holder (
1154 UTL_ScopedName *parameter_name,
1155 FE_Utils::T_Param_Info *info)
1157 be_param_holder *retval = 0;
1158 ACE_NEW_RETURN (retval,
1159 be_param_holder (parameter_name,
1160 info),
1163 return retval;