Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / TAO_IDL / be / be_global.cpp
blob752cb0f9da818f4076c0ca619280429b0bc6b5e5
2 //=============================================================================
3 /**
4 * @file be_global.cpp
6 * Stores global data specific to the compiler back end.
8 * @author Jeff Parsons <parsons@cs.wustl.edu>
9 */
10 //=============================================================================
12 #include "be_global.h"
13 #include "be_codegen.h"
14 #include "be_generator.h"
15 #include "be_module.h"
16 #include "be_valuetype.h"
17 #include "be_interface.h"
18 #include "be_util.h"
20 #include "ast_predefined_type.h"
21 #include "ast_root.h"
23 #include "utl_identifier.h"
24 #include "utl_string.h"
25 #include "global_extern.h"
26 #include "idl_defines.h"
28 #include "ace/ACE.h"
29 #include "ace/OS_NS_stdio.h"
30 #include "ace/OS_NS_sys_stat.h"
31 #include "ace/OS_NS_ctype.h"
33 TAO_IDL_BE_Export BE_GlobalData *be_global = nullptr;
35 const char *const BE_GlobalData::core_versioned_ns_begin =
36 "\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n";
37 const char *const BE_GlobalData::core_versioned_ns_end =
38 "\nTAO_END_VERSIONED_NAMESPACE_DECL\n";
40 BE_GlobalData::BE_GlobalData ()
41 : changing_standard_include_files_ (1),
42 skel_export_macro_ (nullptr),
43 skel_export_include_ (nullptr),
44 skel_export_file_ (nullptr),
45 stub_export_macro_ (nullptr),
46 stub_export_include_ (nullptr),
47 stub_export_file_ (nullptr),
48 anyop_export_macro_ (nullptr),
49 anyop_export_include_ (nullptr),
50 exec_export_macro_ (nullptr),
51 exec_export_include_ (nullptr),
52 svnt_export_macro_ (nullptr),
53 svnt_export_include_ (nullptr),
54 conn_export_macro_ (nullptr),
55 conn_export_include_ (nullptr),
56 pch_include_ (nullptr),
57 pre_include_ (nullptr),
58 post_include_ (nullptr),
59 include_guard_ (nullptr),
60 safe_include_ (nullptr),
61 unique_include_ (nullptr),
62 stripped_filename_ (nullptr),
63 core_versioning_begin_ (core_versioned_ns_begin),
64 core_versioning_end_ (core_versioned_ns_end),
65 anyops_versioning_begin_ (core_versioning_begin_ + "namespace CORBA {\n"),
66 anyops_versioning_end_ ("\n}" + core_versioning_end_),
67 versioning_begin_ (),
68 versioning_end_ (),
69 versioning_include_ (),
70 client_hdr_ending_ (ACE::strnew ("C.h")),
71 client_stub_ending_ (ACE::strnew ("C.cpp")),
72 client_inline_ending_ (ACE::strnew ("C.inl")),
73 server_hdr_ending_ (ACE::strnew ("S.h")),
74 implementation_hdr_ending_ (ACE::strnew ("I.h")),
75 implementation_skel_ending_ (ACE::strnew ("I.cpp")),
76 impl_class_prefix_ (ACE::strnew ("")),
77 impl_class_suffix_ (ACE::strnew ("_i")),
78 server_template_hdr_ending_ (ACE::strnew ("S_T.h")),
79 server_skeleton_ending_ (ACE::strnew ("S.cpp")),
80 server_template_skeleton_ending_ (ACE::strnew ("S_T.cpp")),
81 anyop_hdr_ending_ (ACE::strnew ("A.h")),
82 anyop_src_ending_ (ACE::strnew ("A.cpp")),
83 ciao_svnt_hdr_template_ending_ (ACE::strnew ("_svnt_T.h")),
84 ciao_svnt_src_template_ending_ (ACE::strnew ("_svnt_T.cpp")),
85 ciao_svnt_hdr_ending_ (ACE::strnew ("_svnt.h")),
86 ciao_svnt_src_ending_ (ACE::strnew ("_svnt.cpp")),
87 ciao_exec_hdr_ending_ (ACE::strnew ("_exec.h")),
88 ciao_exec_src_ending_ (ACE::strnew ("_exec.cpp")),
89 ciao_exec_stub_hdr_ending_ (ACE::strnew ("EC.h")),
90 ciao_exec_idl_ending_ (ACE::strnew ("E.idl")),
91 ciao_conn_hdr_ending_ (ACE::strnew ("_conn.h")),
92 ciao_conn_src_ending_ (ACE::strnew ("_conn.cpp")),
93 dds_typesupport_hdr_ending_ (ACE::strnew ("Support.h")),
94 ciao_ami_conn_idl_ending_ (ACE::strnew ("A.idl")),
95 ciao_ami_conn_impl_hdr_ending_ (ACE::strnew ("_conn_i.h")),
96 ciao_ami_conn_impl_src_ending_ (ACE::strnew ("_conn_i.cpp")),
97 ciao_container_type_ (ACE::strnew ("Session")),
98 output_dir_ (nullptr),
99 stub_include_dir_ (nullptr),
100 skel_output_dir_ (nullptr),
101 anyop_output_dir_ (nullptr),
102 exec_output_dir_ (nullptr),
103 any_support_ (true),
104 cdr_support_ (true),
105 tc_support_ (true),
106 obv_opt_accessor_ (false),
107 gen_impl_files_ (false),
108 gen_impl_debug_info_ (false),
109 gen_copy_ctor_ (false),
110 gen_assign_op_ (false),
111 gen_thru_poa_collocation_ (true), // Default is thru_poa.
112 gen_direct_collocation_ (false),
113 gen_corba_e_ (false),
114 gen_minimum_corba_ (false),
115 gen_lwccm_ (false),
116 gen_noeventccm_ (false),
117 opt_tc_ (false),
118 ami4ccm_call_back_ (false),
119 ami_call_back_ (false),
120 gen_amh_classes_ (false),
121 gen_tie_classes_ (false),
122 gen_smart_proxies_ (false),
123 gen_inline_constants_ (true),
124 gen_orb_h_include_ (true),
125 gen_empty_anyop_header_ (false),
126 lookup_strategy_ (TAO_PERFECT_HASH),
127 dds_impl_ (DDS_NONE),
128 void_type_ (nullptr),
129 ccmobject_ (nullptr),
130 messaging_ (nullptr),
131 messaging_exceptionholder_ (nullptr),
132 messaging_replyhandler_ (nullptr),
133 gen_anyop_files_ (false),
134 gen_skel_files_ (true),
135 gen_svnt_cpp_files_ (true),
136 gen_svnt_t_files_ (true),
137 gen_client_inline_ (true),
138 gen_client_stub_ (true),
139 gen_client_header_ (true),
140 gen_server_skeleton_ (true),
141 gen_server_header_ (true),
142 gen_local_iface_anyops_ (true),
143 use_clonable_in_args_ (false),
144 gen_template_export_ (false),
145 gen_ostream_operators_ (false),
146 gen_static_desc_operations_ (false),
147 gen_custom_ending_ (true),
148 gen_unique_guards_ (true),
149 gen_ciao_svnt_ (false),
150 gen_ciao_exec_idl_ (false),
151 gen_ciao_exec_impl_ (false),
152 gen_ciao_exec_reactor_impl_ (false),
153 overwrite_not_exec_(false),
154 gen_ciao_conn_impl_ (false),
155 gen_dds_typesupport_idl_ (false),
156 gen_ciao_valuefactory_reg_ (true),
157 gen_stub_export_hdr_file_ (false),
158 gen_skel_export_hdr_file_ (false),
159 gen_svnt_export_hdr_file_ (false),
160 gen_exec_export_hdr_file_ (false),
161 gen_conn_export_hdr_file_ (false),
162 tab_size_ (2),
163 alt_mapping_ (false),
164 in_facet_servant_ (false),
165 gen_arg_traits_ (true),
166 gen_anytypecode_adapter_ (false),
167 no_fixed_err_ (false)
171 BE_GlobalData::~BE_GlobalData ()
175 // To switch between changing or non-changing standard include files
176 // include files, so that #include statements can be
177 // generated with ""s or <>s respectively, for the standard include
178 // files (e.g. tao/corba.h)
179 void
180 BE_GlobalData::changing_standard_include_files (size_t changing)
182 this->changing_standard_include_files_ = changing;
185 size_t
186 BE_GlobalData::changing_standard_include_files ()
188 return this->changing_standard_include_files_;
191 /************ Helper functions **************/
192 static const char*
193 be_change_idl_file_extension (UTL_String* idl_file,
194 const char *new_extension,
195 bool base_name_only = false,
196 bool for_anyop = false,
197 bool for_skel = false,
198 bool for_exec = false)
200 // @@ This shouldn't happen anyway; but a better error handling
201 // mechanism is needed.
202 if (idl_file == nullptr || new_extension == nullptr)
204 return nullptr;
207 static char fname[MAXPATHLEN];
208 ACE_OS::memset (fname, 0, MAXPATHLEN);
210 // Get the char* from the UTL_String.
211 const char* string = idl_file->get_string ();
213 // Get the base part of the filename, we try several extensions
214 // before giving up.
215 const char *base = nullptr;
217 static const char* extensions[] = {
218 ".idl",
219 ".pidl",
220 ".IDL",
221 ".PIDL"
224 static int nextensions = sizeof(extensions)/sizeof(extensions[0]);
226 for (int k = 0; k < nextensions; ++k)
228 base = ACE_OS::strstr (string, extensions[k]);
230 if (base != nullptr)
232 break;
236 if (base == nullptr)
238 return nullptr;
241 // Anyop * skel file output defaults to general output dir if not set.
242 const char *output_path =
243 be_util::get_output_path (for_anyop, for_skel, for_exec);
245 if (!base_name_only && output_path != nullptr)
247 // Path info should also be added to fname.
249 // Add path and "/".
250 ACE_OS::sprintf (fname, "%s/", output_path);
252 // Append the base part to fname.
253 ACE_OS::strncpy (fname + ACE_OS::strlen (fname),
254 string,
255 base - string);
257 else
259 // Base_name_only or no putput_dir specified by user. JUST put the
260 // base part to fname.
261 ACE_OS::strncpy (fname, string, base - string);
264 // Turn '\' and '\\' into '/'.
265 char* i = fname;
267 for (char* j = fname; *j != 0; ++i, ++j)
269 if (*j == '\\')
271 *i = '/';
273 if (*(j + 1) == '\\')
275 ++j;
278 else
280 *i = *j;
284 *i = 0;
286 // Append the newextension.
287 ACE_OS::strcat (fname, new_extension);
288 return fname;
291 const char *
292 BE_GlobalData::be_get_client_hdr (UTL_String *idl_file_name,
293 bool base_name_only)
295 // User-defined file extensions don't apply to .pidl files.
296 ACE_CString fn (idl_file_name->get_string ());
297 ACE_CString fn_ext = fn.substr (fn.length () - 5);
298 bool orb_file = (fn_ext == ".pidl" || fn_ext == ".PIDL");
300 if (!orb_file && !be_global->gen_custom_ending ()
301 && FE_Utils::validate_orb_include (idl_file_name))
303 orb_file = true;
306 return be_change_idl_file_extension (idl_file_name,
307 orb_file
308 ? "C.h"
309 : be_global->client_hdr_ending (),
310 base_name_only);
313 const char *
314 BE_GlobalData::be_get_client_stub (UTL_String *idl_file_name)
316 return be_change_idl_file_extension (idl_file_name,
317 be_global->client_stub_ending ());
320 const char *
321 BE_GlobalData::be_get_client_inline (UTL_String *idl_file_name,
322 bool base_name_only)
324 return be_change_idl_file_extension (idl_file_name,
325 be_global->client_inline_ending (),
326 base_name_only);
329 const char *
330 BE_GlobalData::be_get_server_hdr (UTL_String *idl_file_name,
331 bool base_name_only)
333 // User-defined file extensions don't apply to .pidl files.
334 ACE_CString fn (idl_file_name->get_string ());
335 ACE_CString fn_ext = fn.substr (fn.length () - 5);
336 bool orb_file = (fn_ext == ".pidl" || fn_ext == ".PIDL");
338 if (!orb_file && !be_global->gen_custom_ending ()
339 && FE_Utils::validate_orb_include (idl_file_name))
341 orb_file = true;
344 return be_change_idl_file_extension (idl_file_name,
345 orb_file
346 ? "S.h"
347 : be_global->server_hdr_ending (),
348 base_name_only,
349 false,
350 true);
353 const char *
354 BE_GlobalData::be_get_svnt_template_hdr (UTL_String *idl_file_name,
355 bool base_name_only)
357 // User-defined file extensions don't apply to .pidl files.
358 ACE_CString fn (idl_file_name->get_string ());
359 ACE_CString fn_ext = fn.substr (fn.length () - 5);
360 bool orb_file = (fn_ext == ".pidl" || fn_ext == ".PIDL");
362 if (!orb_file && !be_global->gen_custom_ending ()
363 && FE_Utils::validate_orb_include (idl_file_name))
365 orb_file = true;
368 return be_change_idl_file_extension (idl_file_name,
369 orb_file
370 ? "S.h"
371 : be_global->ciao_svnt_header_template_ending (),
372 base_name_only,
373 false,
374 true);
377 const char *
378 BE_GlobalData::be_get_implementation_hdr (UTL_String *idl_file_name,
379 bool base_name_only)
381 return be_change_idl_file_extension (idl_file_name,
382 be_global->implementation_hdr_ending (),
383 base_name_only);
386 const char *
387 BE_GlobalData::be_get_implementation_skel (UTL_String *idl_file_name,
388 bool base_name_only)
390 return be_change_idl_file_extension (idl_file_name,
391 be_global->implementation_skel_ending (),
392 base_name_only);
395 const char *
396 BE_GlobalData::be_get_server_template_hdr (UTL_String *idl_file_name,
397 bool base_name_only)
399 return be_change_idl_file_extension (idl_file_name,
400 be_global->server_template_hdr_ending (),
401 base_name_only,
402 false,
403 true);
406 const char *
407 BE_GlobalData::be_get_server_skeleton (UTL_String *idl_file_name)
409 return be_change_idl_file_extension (idl_file_name,
410 be_global->server_skeleton_ending (),
411 false,
412 false,
413 true);
416 const char *
417 BE_GlobalData::be_get_server_template_skeleton (UTL_String *idl_file_name,
418 bool base_name_only)
420 return be_change_idl_file_extension (idl_file_name,
421 be_global->server_template_skeleton_ending (),
422 base_name_only,
423 false,
424 true);
427 const char *
428 BE_GlobalData::be_get_anyop_header (UTL_String *idl_file_name,
429 bool base_name_only)
431 return be_change_idl_file_extension (idl_file_name,
432 be_global->anyop_header_ending (),
433 base_name_only,
434 true);
437 const char *
438 BE_GlobalData::be_get_anyop_source (UTL_String *idl_file_name,
439 bool base_name_only)
441 return be_change_idl_file_extension (idl_file_name,
442 be_global->anyop_source_ending (),
443 base_name_only,
444 true);
447 const char *
448 BE_GlobalData::be_get_ciao_svnt_header (UTL_String *idl_file_name,
449 bool base_name_only)
451 return be_change_idl_file_extension (idl_file_name,
452 be_global->ciao_svnt_header_ending (),
453 base_name_only);
456 const char *
457 BE_GlobalData::be_get_ciao_svnt_template_header (UTL_String *idl_file_name,
458 bool base_name_only)
460 return be_change_idl_file_extension (idl_file_name,
461 be_global->ciao_svnt_header_template_ending (),
462 base_name_only);
466 const char *
467 BE_GlobalData::be_get_ciao_svnt_source (UTL_String *idl_file_name,
468 bool base_name_only)
470 return be_change_idl_file_extension (idl_file_name,
471 be_global->ciao_svnt_source_ending (),
472 base_name_only);
475 const char *
476 BE_GlobalData::be_get_ciao_svnt_template_source (UTL_String *idl_file_name,
477 bool base_name_only)
479 return be_change_idl_file_extension (idl_file_name,
480 be_global->ciao_svnt_source_template_ending (),
481 base_name_only);
484 const char *
485 BE_GlobalData::be_get_ciao_exec_header (UTL_String *idl_file_name,
486 bool base_name_only)
488 return be_change_idl_file_extension (idl_file_name,
489 be_global->ciao_exec_header_ending (),
490 base_name_only,
491 false,
492 false,
493 true);
496 const char *
497 BE_GlobalData::be_get_ciao_exec_source (UTL_String *idl_file_name,
498 bool base_name_only)
500 return be_change_idl_file_extension (idl_file_name,
501 be_global->ciao_exec_source_ending (),
502 base_name_only,
503 false,
504 false,
505 true);
508 const char *
509 BE_GlobalData::be_get_ciao_exec_stub_header (
510 UTL_String *idl_file_name,
511 bool base_name_only)
513 return
514 be_change_idl_file_extension (
515 idl_file_name,
516 be_global->ciao_exec_stub_header_ending (),
517 base_name_only);
520 const char *
521 BE_GlobalData::be_get_ciao_exec_idl (
522 UTL_String *idl_file_name,
523 bool base_name_only)
525 return
526 be_change_idl_file_extension (
527 idl_file_name,
528 be_global->ciao_exec_idl_ending (),
529 base_name_only);
532 const char *
533 BE_GlobalData::be_get_ciao_conn_header (UTL_String *idl_file_name,
534 bool base_name_only)
536 return be_change_idl_file_extension (idl_file_name,
537 be_global->ciao_conn_header_ending (),
538 base_name_only);
541 const char *
542 BE_GlobalData::be_get_ciao_conn_source (UTL_String *idl_file_name,
543 bool base_name_only)
545 return be_change_idl_file_extension (idl_file_name,
546 be_global->ciao_conn_source_ending (),
547 base_name_only);
550 const char *
551 BE_GlobalData::be_get_dds_typesupport_header (
552 UTL_String *idl_file_name,
553 bool base_name_only)
555 return
556 be_change_idl_file_extension (
557 idl_file_name,
558 be_global->dds_typesupport_hdr_ending (),
559 base_name_only);
562 const char *
563 BE_GlobalData::be_get_ciao_ami_conn_idl (
564 UTL_String *idl_file_name,
565 bool base_name_only)
567 return
568 be_change_idl_file_extension (
569 idl_file_name,
570 be_global->ciao_ami_conn_idl_ending (),
571 base_name_only);
574 const char *
575 BE_GlobalData::be_get_ciao_ami_conn_impl_hdr (
576 UTL_String *idl_file_name,
577 bool base_name_only)
579 return
580 be_change_idl_file_extension (
581 idl_file_name,
582 be_global->ciao_ami_conn_impl_hdr_ending (),
583 base_name_only);
586 const char *
587 BE_GlobalData::be_get_ciao_ami_conn_impl_src (
588 UTL_String *idl_file_name,
589 bool base_name_only)
591 return
592 be_change_idl_file_extension (
593 idl_file_name,
594 be_global->ciao_ami_conn_impl_src_ending (),
595 base_name_only);
598 const char *
599 BE_GlobalData::be_get_client_hdr_fname (
600 bool base_name_only)
602 return
603 be_get_client_hdr (idl_global->stripped_filename (),
604 base_name_only);
607 const char *
608 BE_GlobalData::be_get_client_stub_fname ()
610 return
611 be_get_client_stub (idl_global->stripped_filename ());
614 const char *
615 BE_GlobalData::be_get_client_inline_fname (
616 bool base_name_only)
618 return
619 be_get_client_inline (idl_global->stripped_filename (),
620 base_name_only);
623 const char *
624 BE_GlobalData::be_get_server_hdr_fname (
625 bool base_name_only)
627 return
628 be_get_server_hdr (idl_global->stripped_filename (),
629 base_name_only);
632 const char *
633 BE_GlobalData::be_get_implementation_hdr_fname (
634 bool base_name_only)
636 return
637 be_get_implementation_hdr (idl_global->stripped_filename (),
638 base_name_only);
641 const char *
642 BE_GlobalData::be_get_implementation_skel_fname (
643 bool base_name_only)
645 return
646 be_get_implementation_skel (idl_global->stripped_filename (),
647 base_name_only);
650 const char *
651 BE_GlobalData::be_get_server_template_hdr_fname (
652 bool base_name_only)
654 return
655 be_get_server_template_hdr (idl_global->stripped_filename (),
656 base_name_only);
659 const char *
660 BE_GlobalData::be_get_server_skeleton_fname ()
662 return
663 be_get_server_skeleton (idl_global->stripped_filename ());
666 const char *
667 BE_GlobalData::be_get_implementation_skeleton_fname ()
669 return
670 be_get_implementation_skel (idl_global->stripped_filename ());
673 const char *
674 BE_GlobalData::be_get_server_template_skeleton_fname (
675 bool base_name_only)
677 return
678 be_get_server_template_skeleton (idl_global->stripped_filename (),
679 base_name_only);
682 const char *
683 BE_GlobalData::be_get_anyop_source_fname (
684 bool base_name_only)
686 return
687 be_get_anyop_source (idl_global->stripped_filename (),
688 base_name_only);
691 const char *
692 BE_GlobalData::be_get_anyop_header_fname (
693 bool base_name_only)
695 return
696 be_get_anyop_header (idl_global->stripped_filename (),
697 base_name_only);
700 const char *
701 BE_GlobalData::be_get_ciao_svnt_hdr_fname (bool base_name_only)
703 return
704 be_get_ciao_svnt_header (idl_global->stripped_filename (),
705 base_name_only);
708 const char *
709 BE_GlobalData::be_get_ciao_tmpl_svnt_hdr_fname (bool base_name_only)
711 return
712 be_get_ciao_svnt_template_header (idl_global->stripped_filename (),
713 base_name_only);
716 const char *
717 BE_GlobalData::be_get_ciao_svnt_src_fname (
718 bool base_name_only)
720 return
721 be_get_ciao_svnt_source (idl_global->stripped_filename (),
722 base_name_only);
725 const char *
726 BE_GlobalData::be_get_ciao_tmpl_svnt_src_fname (
727 bool base_name_only)
729 return
730 be_get_ciao_svnt_template_source (idl_global->stripped_filename (),
731 base_name_only);
734 const char *
735 BE_GlobalData::be_get_ciao_exec_hdr_fname (
736 bool base_name_only)
738 return
739 be_get_ciao_exec_header (idl_global->stripped_filename (),
740 base_name_only);
743 const char *
744 BE_GlobalData::be_get_ciao_exec_src_fname (
745 bool base_name_only)
747 return
748 be_get_ciao_exec_source (idl_global->stripped_filename (),
749 base_name_only);
752 const char *
753 BE_GlobalData::be_get_ciao_exec_stub_hdr_fname (
754 bool base_name_only)
756 return
757 be_get_ciao_exec_stub_header (
758 idl_global->stripped_filename (),
759 base_name_only);
762 const char *
763 BE_GlobalData::be_get_ciao_exec_idl_fname (
764 bool base_name_only)
766 return
767 be_get_ciao_exec_idl (
768 idl_global->stripped_filename (),
769 base_name_only);
772 const char *
773 BE_GlobalData::be_get_ciao_conn_hdr_fname (
774 bool base_name_only)
776 return
777 be_get_ciao_conn_header (idl_global->stripped_filename (),
778 base_name_only);
781 const char *
782 BE_GlobalData::be_get_ciao_conn_src_fname (
783 bool base_name_only)
785 return
786 be_get_ciao_conn_source (idl_global->stripped_filename (),
787 base_name_only);
790 const char *
791 BE_GlobalData::be_get_ciao_ami_conn_idl_fname (
792 bool base_name_only)
794 return
795 be_get_ciao_ami_conn_idl (idl_global->stripped_filename (),
796 base_name_only);
799 const char *
800 BE_GlobalData::be_get_ciao_ami_conn_impl_hdr_fname (
801 bool base_name_only)
803 return
804 be_get_ciao_ami_conn_impl_hdr (idl_global->stripped_filename (),
805 base_name_only);
808 const char *
809 BE_GlobalData::be_get_ciao_ami_conn_impl_src_fname (
810 bool base_name_only)
812 return
813 be_get_ciao_ami_conn_impl_src (idl_global->stripped_filename (),
814 base_name_only);
817 const char*
818 BE_GlobalData::skel_export_macro () const
820 if (this->skel_export_macro_ == nullptr)
822 return "";
825 return this->skel_export_macro_;
828 void
829 BE_GlobalData::skel_export_macro (const char *s)
831 ACE::strdelete (this->skel_export_macro_);
832 this->skel_export_macro_ = ACE::strnew (s);
835 const char*
836 BE_GlobalData::skel_export_include () const
838 return this->skel_export_include_;
841 void
842 BE_GlobalData::skel_export_include (const char *s)
844 ACE::strdelete (this->skel_export_include_);
845 this->skel_export_include_ = ACE::strnew (s);
848 const char*
849 BE_GlobalData::skel_export_file () const
851 return this->skel_export_file_;
854 void
855 BE_GlobalData::skel_export_file (const char *s)
857 ACE::strdelete (this->skel_export_file_);
858 this->skel_export_file_ = ACE::strnew (s);
861 const char*
862 BE_GlobalData::stub_export_macro () const
864 if (this->stub_export_macro_ == nullptr)
866 return "";
869 return this->stub_export_macro_;
872 void
873 BE_GlobalData::stub_export_macro (const char *s)
875 ACE::strdelete (this->stub_export_macro_);
876 this->stub_export_macro_ = ACE::strnew (s);
879 const char*
880 BE_GlobalData::stub_export_include () const
882 return this->stub_export_include_;
885 void
886 BE_GlobalData::stub_export_include (const char *s)
888 ACE::strdelete (this->stub_export_include_);
889 this->stub_export_include_ = ACE::strnew (s);
892 const char*
893 BE_GlobalData::stub_export_file () const
895 return this->stub_export_file_;
898 void
899 BE_GlobalData::stub_export_file (const char *s)
901 ACE::strdelete (this->stub_export_file_);
902 this->stub_export_file_ = ACE::strnew (s);
905 const char*
906 BE_GlobalData::anyop_export_macro () const
908 if (this->anyop_export_macro_ == nullptr)
910 return "";
913 return this->anyop_export_macro_;
916 void
917 BE_GlobalData::anyop_export_macro (const char *s)
919 ACE::strdelete (this->anyop_export_macro_);
920 this->anyop_export_macro_ = ACE::strnew (s);
923 const char*
924 BE_GlobalData::anyop_export_include () const
926 return this->anyop_export_include_;
929 void
930 BE_GlobalData::anyop_export_include (const char *s)
932 ACE::strdelete (this->anyop_export_include_);
933 this->anyop_export_include_ = ACE::strnew (s);
936 const char*
937 BE_GlobalData::exec_export_macro () const
939 if (this->exec_export_macro_ == nullptr)
941 return "";
944 return this->exec_export_macro_;
947 void
948 BE_GlobalData::exec_export_macro (const char *s)
950 ACE::strdelete (this->exec_export_macro_);
951 this->exec_export_macro_ = ACE::strnew (s);
954 const char*
955 BE_GlobalData::exec_export_include () const
957 return this->exec_export_include_;
960 void
961 BE_GlobalData::exec_export_include (const char *s)
963 ACE::strdelete (this->exec_export_include_);
964 this->exec_export_include_ = ACE::strnew (s);
967 const char*
968 BE_GlobalData::svnt_export_macro () const
970 if (this->svnt_export_macro_ == nullptr)
972 return "";
975 return this->svnt_export_macro_;
978 void
979 BE_GlobalData::svnt_export_macro (const char *s)
981 ACE::strdelete (this->svnt_export_macro_);
982 this->svnt_export_macro_ = ACE::strnew (s);
985 const char*
986 BE_GlobalData::svnt_export_include () const
988 return this->svnt_export_include_;
991 void
992 BE_GlobalData::svnt_export_include (const char *s)
994 ACE::strdelete (this->svnt_export_include_);
995 this->svnt_export_include_ = ACE::strnew (s);
998 const char*
999 BE_GlobalData::conn_export_macro () const
1001 if (this->conn_export_macro_ == nullptr)
1003 return "";
1006 return this->conn_export_macro_;
1009 void
1010 BE_GlobalData::conn_export_macro (const char *s)
1012 ACE::strdelete (this->conn_export_macro_);
1013 this->conn_export_macro_ = ACE::strnew (s);
1016 const char*
1017 BE_GlobalData::conn_export_include () const
1019 return this->conn_export_include_;
1022 void
1023 BE_GlobalData::conn_export_include (const char *s)
1025 ACE::strdelete (this->conn_export_include_);
1026 this->conn_export_include_ = ACE::strnew (s);
1029 const char*
1030 BE_GlobalData::pch_include () const
1032 return this->pch_include_;
1035 void
1036 BE_GlobalData::pch_include (const char *s)
1038 ACE::strdelete (this->pch_include_);
1039 this->pch_include_ = ACE::strnew (s);
1042 const char*
1043 BE_GlobalData::pre_include () const
1045 return this->pre_include_;
1048 void
1049 BE_GlobalData::pre_include (const char *s)
1051 ACE::strdelete (this->pre_include_);
1052 this->pre_include_ = ACE::strnew (s);
1055 const char*
1056 BE_GlobalData::post_include () const
1058 return this->post_include_;
1061 void
1062 BE_GlobalData::post_include (const char *s)
1064 ACE::strdelete (this->post_include_);
1065 this->post_include_ = ACE::strnew (s);
1068 const char*
1069 BE_GlobalData::include_guard () const
1071 return this->include_guard_;
1074 void
1075 BE_GlobalData::include_guard (const char *s)
1077 ACE::strdelete (this->include_guard_);
1078 this->include_guard_ = ACE::strnew (s);
1081 const char*
1082 BE_GlobalData::safe_include () const
1084 return this->safe_include_;
1087 void
1088 BE_GlobalData::safe_include (const char *s)
1090 ACE::strdelete (this->safe_include_);
1091 this->safe_include_ = ACE::strnew (s);
1094 const char*
1095 BE_GlobalData::unique_include () const
1097 return this->unique_include_;
1100 void
1101 BE_GlobalData::unique_include (const char *s)
1103 ACE::strdelete (this->unique_include_);
1104 this->unique_include_ = ACE::strnew (s);
1107 const char*
1108 BE_GlobalData::stripped_filename () const
1110 return this->stripped_filename_;
1113 void
1114 BE_GlobalData::stripped_filename (const char *s)
1116 ACE::strdelete (this->stripped_filename_);
1117 this->stripped_filename_ = ACE::strnew (s);
1120 const char *
1121 BE_GlobalData::versioning_begin () const
1123 return this->versioning_begin_.c_str ();
1126 void
1127 BE_GlobalData::versioning_include (const char * s)
1129 this->versioning_include_ = s;
1132 const char *
1133 BE_GlobalData::versioning_include () const
1135 return this->versioning_include_.c_str ();
1138 const char *
1139 BE_GlobalData::core_versioning_begin () const
1141 return this->core_versioning_begin_.c_str ();
1144 void
1145 BE_GlobalData::versioning_end (const char * s)
1147 this->versioning_end_ =
1148 ACE_CString ("\n\n")
1149 + ACE_CString (s)
1150 + ACE_CString ("\n\n");
1152 this->core_versioning_begin_ =
1153 this->versioning_end_ + // Yes, "end".
1154 core_versioned_ns_begin;
1156 this->anyops_versioning_begin_ =
1157 this->core_versioning_begin_ + "namespace CORBA {\n";
1160 void
1161 BE_GlobalData::versioning_begin (const char * s)
1163 this->versioning_begin_ =
1164 ACE_CString ("\n\n")
1165 + ACE_CString (s)
1166 + ACE_CString ("\n\n");
1168 this->core_versioning_end_ =
1169 core_versioned_ns_end
1170 + this->versioning_begin_; // Yes, "begin".
1172 this->anyops_versioning_end_ =
1173 "\n}" + this->core_versioning_end_;
1176 const char *
1177 BE_GlobalData::versioning_end () const
1179 return this->versioning_end_.c_str ();
1182 const char *
1183 BE_GlobalData::core_versioning_end () const
1185 return this->core_versioning_end_.c_str ();
1188 const char *
1189 BE_GlobalData::anyops_versioning_begin () const
1191 return this->anyops_versioning_begin_.c_str ();
1194 const char *
1195 BE_GlobalData::anyops_versioning_end () const
1197 return this->anyops_versioning_end_.c_str ();
1200 // Set the client_hdr_ending.
1201 void
1202 BE_GlobalData::client_hdr_ending (const char* s)
1204 ACE::strdelete (client_hdr_ending_);
1205 this->client_hdr_ending_ = ACE::strnew (s);
1208 // Get the client_hdr_ending.
1209 const char*
1210 BE_GlobalData::client_hdr_ending () const
1212 return this->client_hdr_ending_;
1215 void
1216 BE_GlobalData::client_inline_ending (const char* s)
1218 ACE::strdelete (client_inline_ending_);
1219 this->client_inline_ending_ = ACE::strnew (s);
1222 const char*
1223 BE_GlobalData::client_inline_ending () const
1225 return this->client_inline_ending_;
1228 // Set the client_stub_ending.
1229 void
1230 BE_GlobalData::client_stub_ending (const char* s)
1232 ACE::strdelete (this->client_stub_ending_);
1233 this->client_stub_ending_ = ACE::strnew (s);
1236 const char*
1237 BE_GlobalData::client_stub_ending () const
1239 return this->client_stub_ending_;
1242 void
1243 BE_GlobalData::server_hdr_ending (const char* s)
1245 ACE::strdelete (this->server_hdr_ending_);
1246 this->server_hdr_ending_ = ACE::strnew (s);
1249 const char*
1250 BE_GlobalData::server_hdr_ending () const
1252 return this->server_hdr_ending_;
1255 void
1256 BE_GlobalData::implementation_hdr_ending (const char* s)
1258 ACE::strdelete (this->implementation_hdr_ending_);
1259 this->implementation_hdr_ending_ = ACE::strnew (s);
1262 void
1263 BE_GlobalData::implementation_skel_ending (const char* s)
1265 ACE::strdelete (this->implementation_skel_ending_);
1266 this->implementation_skel_ending_ = ACE::strnew (s);
1269 void
1270 BE_GlobalData::impl_class_prefix (const char* s)
1272 ACE::strdelete (this->impl_class_prefix_);
1273 this->impl_class_prefix_ = ACE::strnew (s);
1276 void
1277 BE_GlobalData::impl_class_suffix (const char* s)
1279 ACE::strdelete (this->impl_class_suffix_);
1280 this->impl_class_suffix_ = ACE::strnew (s);
1283 const char*
1284 BE_GlobalData::impl_class_prefix () const
1286 return this->impl_class_prefix_;
1289 const char*
1290 BE_GlobalData::implementation_hdr_ending () const
1292 return this->implementation_hdr_ending_;
1295 const char*
1296 BE_GlobalData::impl_class_suffix () const
1298 return this->impl_class_suffix_;
1301 const char*
1302 BE_GlobalData::implementation_skel_ending () const
1304 return this->implementation_skel_ending_;
1307 void
1308 BE_GlobalData::server_template_hdr_ending (const char* s)
1310 ACE::strdelete (this->server_template_hdr_ending_);
1311 this->server_template_hdr_ending_ = ACE::strnew (s);
1314 const char*
1315 BE_GlobalData::server_template_hdr_ending () const
1317 return this->server_template_hdr_ending_;
1320 void
1321 BE_GlobalData::server_skeleton_ending (const char* s)
1323 ACE::strdelete (this->server_skeleton_ending_);
1324 this->server_skeleton_ending_ = ACE::strnew (s);
1327 const char*
1328 BE_GlobalData::server_skeleton_ending () const
1330 return this->server_skeleton_ending_;
1333 void
1334 BE_GlobalData::server_template_skeleton_ending (const char* s)
1336 ACE::strdelete (this->server_template_skeleton_ending_);
1337 this->server_template_skeleton_ending_ = ACE::strnew (s);
1340 const char*
1341 BE_GlobalData::server_template_skeleton_ending () const
1343 return this->server_template_skeleton_ending_;
1346 void
1347 BE_GlobalData::anyop_header_ending (const char* s)
1349 ACE::strdelete (this->anyop_hdr_ending_);
1350 this->anyop_hdr_ending_ = ACE::strnew (s);
1353 void
1354 BE_GlobalData::use_clonable_in_args (bool clonable)
1356 this->use_clonable_in_args_ = clonable;
1359 bool
1360 BE_GlobalData::use_clonable_in_args () const
1362 return this->use_clonable_in_args_;
1365 bool
1366 BE_GlobalData::gen_template_export () const
1368 return this->gen_template_export_;
1371 void
1372 BE_GlobalData::gen_template_export (bool val)
1374 this->gen_template_export_ = val;
1377 bool
1378 BE_GlobalData::gen_ostream_operators () const
1380 return this->gen_ostream_operators_;
1383 void
1384 BE_GlobalData::gen_ostream_operators (bool val)
1386 this->gen_ostream_operators_ = val;
1390 bool
1391 BE_GlobalData::gen_static_desc_operations () const
1393 return this->gen_static_desc_operations_;
1396 void
1397 BE_GlobalData::gen_static_desc_operations (bool val)
1399 this->gen_static_desc_operations_ = val;
1402 const char*
1403 BE_GlobalData::anyop_header_ending () const
1405 return this->anyop_hdr_ending_;
1408 void
1409 BE_GlobalData::anyop_source_ending (const char* s)
1411 ACE::strdelete (this->anyop_src_ending_);
1412 this->anyop_src_ending_ = ACE::strnew (s);
1415 const char*
1416 BE_GlobalData::anyop_source_ending () const
1418 return this->anyop_src_ending_;
1421 void
1422 BE_GlobalData::ciao_svnt_header_ending (const char* s)
1424 ACE::strdelete (this->ciao_svnt_hdr_ending_);
1425 this->ciao_svnt_hdr_ending_ = ACE::strnew (s);
1428 const char*
1429 BE_GlobalData::ciao_svnt_header_ending () const
1431 return this->ciao_svnt_hdr_ending_;
1434 void
1435 BE_GlobalData::ciao_svnt_source_ending (const char* s)
1437 ACE::strdelete (this->ciao_svnt_src_ending_);
1438 this->ciao_svnt_src_ending_ = ACE::strnew (s);
1441 const char*
1442 BE_GlobalData::ciao_svnt_source_ending () const
1444 return this->ciao_svnt_src_ending_;
1447 void
1448 BE_GlobalData::ciao_svnt_header_template_ending (const char* s)
1450 ACE::strdelete (this->ciao_svnt_hdr_template_ending_);
1451 this->ciao_svnt_hdr_template_ending_ = ACE::strnew (s);
1454 const char*
1455 BE_GlobalData::ciao_svnt_header_template_ending () const
1457 return this->ciao_svnt_hdr_template_ending_;
1460 void
1461 BE_GlobalData::ciao_svnt_source_template_ending (const char* s)
1463 ACE::strdelete (this->ciao_svnt_src_template_ending_);
1464 this->ciao_svnt_src_template_ending_ = ACE::strnew (s);
1467 const char*
1468 BE_GlobalData::ciao_svnt_source_template_ending () const
1470 return this->ciao_svnt_src_template_ending_;
1473 void
1474 BE_GlobalData::ciao_exec_header_ending (const char* s)
1476 ACE::strdelete (this->ciao_exec_hdr_ending_);
1477 this->ciao_exec_hdr_ending_ = ACE::strnew (s);
1480 const char*
1481 BE_GlobalData::ciao_exec_header_ending () const
1483 return this->ciao_exec_hdr_ending_;
1486 void
1487 BE_GlobalData::ciao_exec_source_ending (const char* s)
1489 ACE::strdelete (this->ciao_exec_src_ending_);
1490 this->ciao_exec_src_ending_ = ACE::strnew (s);
1493 const char*
1494 BE_GlobalData::ciao_exec_source_ending () const
1496 return this->ciao_exec_src_ending_;
1499 void
1500 BE_GlobalData::ciao_exec_stub_header_ending (const char* s)
1502 ACE::strdelete (this->ciao_exec_stub_hdr_ending_);
1503 this->ciao_exec_stub_hdr_ending_ = ACE::strnew (s);
1506 const char*
1507 BE_GlobalData::ciao_exec_stub_header_ending () const
1509 return this->ciao_exec_stub_hdr_ending_;
1512 void
1513 BE_GlobalData::ciao_exec_idl_ending (const char* s)
1515 ACE::strdelete (this->ciao_exec_idl_ending_);
1516 this->ciao_exec_idl_ending_ = ACE::strnew (s);
1519 const char*
1520 BE_GlobalData::ciao_exec_idl_ending () const
1522 return this->ciao_exec_idl_ending_;
1525 void
1526 BE_GlobalData::ciao_conn_header_ending (const char* s)
1528 ACE::strdelete (this->ciao_conn_hdr_ending_);
1529 this->ciao_conn_hdr_ending_ = ACE::strnew (s);
1532 const char*
1533 BE_GlobalData::ciao_conn_header_ending () const
1535 return this->ciao_conn_hdr_ending_;
1538 void
1539 BE_GlobalData::ciao_conn_source_ending (const char* s)
1541 ACE::strdelete (this->ciao_conn_src_ending_);
1542 this->ciao_conn_src_ending_ = ACE::strnew (s);
1545 const char*
1546 BE_GlobalData::ciao_conn_source_ending () const
1548 return this->ciao_conn_src_ending_;
1551 void
1552 BE_GlobalData::dds_typesupport_hdr_ending (const char* s)
1554 ACE::strdelete (this->dds_typesupport_hdr_ending_);
1555 this->dds_typesupport_hdr_ending_ = ACE::strnew (s);
1558 const char*
1559 BE_GlobalData::dds_typesupport_hdr_ending () const
1561 return this->dds_typesupport_hdr_ending_;
1564 void
1565 BE_GlobalData::ciao_ami_conn_idl_ending (const char* s)
1567 ACE::strdelete (this->ciao_ami_conn_idl_ending_);
1568 this->ciao_ami_conn_idl_ending_ = ACE::strnew (s);
1571 const char *
1572 BE_GlobalData::ciao_ami_conn_idl_ending () const
1574 return this->ciao_ami_conn_idl_ending_;
1577 void
1578 BE_GlobalData::ciao_ami_conn_impl_hdr_ending (const char* s)
1580 ACE::strdelete (this->ciao_ami_conn_impl_hdr_ending_);
1581 this->ciao_ami_conn_impl_hdr_ending_ = ACE::strnew (s);
1584 const char *
1585 BE_GlobalData::ciao_ami_conn_impl_hdr_ending () const
1587 return this->ciao_ami_conn_impl_hdr_ending_;
1590 void
1591 BE_GlobalData::ciao_ami_conn_impl_src_ending (const char* s)
1593 ACE::strdelete (this->ciao_ami_conn_impl_src_ending_);
1594 this->ciao_ami_conn_impl_src_ending_ = ACE::strnew (s);
1597 const char *
1598 BE_GlobalData::ciao_ami_conn_impl_src_ending () const
1600 return this->ciao_ami_conn_impl_src_ending_;
1603 void
1604 BE_GlobalData::ciao_container_type (const char* s)
1606 ACE::strdelete (this->ciao_container_type_);
1607 this->ciao_container_type_ = ACE::strnew (s);
1610 const char *
1611 BE_GlobalData::ciao_container_type () const
1613 return this->ciao_container_type_;
1616 void
1617 BE_GlobalData::output_dir (const char* s)
1619 ACE::strdelete (this->output_dir_);
1620 this->output_dir_ = ACE::strnew (s);
1623 const char*
1624 BE_GlobalData::output_dir () const
1626 return this->output_dir_;
1628 bool
1629 BE_GlobalData::overwrite_not_exec () const
1631 return this->overwrite_not_exec_;
1634 void
1635 BE_GlobalData::overwrite_not_exec (bool val)
1637 this->overwrite_not_exec_ = val;
1640 void
1641 BE_GlobalData::skel_output_dir (const char* s)
1643 ACE::strdelete (this->skel_output_dir_);
1644 this->skel_output_dir_ = ACE::strnew (s);
1647 const char*
1648 BE_GlobalData::skel_output_dir () const
1650 return this->skel_output_dir_;
1653 void
1654 BE_GlobalData::stub_include_dir (const char* s)
1656 ACE::strdelete (this->stub_include_dir_);
1657 this->stub_include_dir_ = ACE::strnew (s);
1660 const char*
1661 BE_GlobalData::stub_include_dir () const
1663 return this->stub_include_dir_;
1666 void
1667 BE_GlobalData::anyop_output_dir (const char* s)
1669 ACE::strdelete (this->anyop_output_dir_);
1670 this->anyop_output_dir_ = ACE::strnew (s);
1673 const char*
1674 BE_GlobalData::anyop_output_dir () const
1676 return this->anyop_output_dir_;
1679 void
1680 BE_GlobalData::exec_output_dir (const char* s)
1682 ACE::strdelete (this->exec_output_dir_);
1683 this->exec_output_dir_ = ACE::strnew (s);
1686 const char*
1687 BE_GlobalData::exec_output_dir () const
1689 return this->exec_output_dir_;
1691 void
1692 BE_GlobalData::any_support (bool val)
1694 this->any_support_ = val;
1697 bool
1698 BE_GlobalData::any_support () const
1700 return this->any_support_;
1703 void
1704 BE_GlobalData::cdr_support (bool val)
1706 this->cdr_support_ = val;
1709 bool
1710 BE_GlobalData::cdr_support () const
1712 return this->cdr_support_;
1715 void
1716 BE_GlobalData::tc_support (bool val)
1718 this->tc_support_ = val;
1721 bool
1722 BE_GlobalData::tc_support () const
1724 return this->tc_support_;
1727 void
1728 BE_GlobalData::obv_opt_accessor (bool val)
1730 this->obv_opt_accessor_ = val;
1733 bool
1734 BE_GlobalData::obv_opt_accessor () const
1736 return this->obv_opt_accessor_;
1739 void
1740 BE_GlobalData::gen_impl_files (bool val)
1742 this->gen_impl_files_ = val;
1745 bool
1746 BE_GlobalData::gen_impl_files () const
1748 return this->gen_impl_files_;
1751 void
1752 BE_GlobalData::gen_impl_debug_info (bool val)
1754 this->gen_impl_debug_info_ = val;
1757 bool
1758 BE_GlobalData::gen_impl_debug_info () const
1760 return this->gen_impl_debug_info_;
1763 void
1764 BE_GlobalData::gen_copy_ctor (bool val)
1766 this->gen_copy_ctor_ = val;
1769 bool
1770 BE_GlobalData::gen_copy_ctor () const
1772 return this->gen_copy_ctor_;
1775 void
1776 BE_GlobalData::gen_assign_op (bool val)
1778 this->gen_assign_op_ = val;
1781 bool
1782 BE_GlobalData::gen_assign_op () const
1784 return this->gen_assign_op_;
1787 void
1788 BE_GlobalData::gen_thru_poa_collocation (bool val)
1790 this->gen_thru_poa_collocation_ = val;
1793 bool
1794 BE_GlobalData::gen_thru_poa_collocation () const
1796 return this->gen_thru_poa_collocation_;
1799 void
1800 BE_GlobalData::gen_direct_collocation (bool val)
1802 this->gen_direct_collocation_ = val;
1805 bool
1806 BE_GlobalData::gen_direct_collocation () const
1808 return this->gen_direct_collocation_;
1811 void
1812 BE_GlobalData::gen_corba_e (bool val)
1814 this->gen_corba_e_ = val;
1817 bool
1818 BE_GlobalData::gen_corba_e () const
1820 return this->gen_corba_e_;
1823 void
1824 BE_GlobalData::gen_minimum_corba (bool val)
1826 this->gen_minimum_corba_ = val;
1829 bool
1830 BE_GlobalData::gen_minimum_corba () const
1832 return this->gen_minimum_corba_;
1835 void
1836 BE_GlobalData::gen_noeventccm (bool val)
1838 this->gen_noeventccm_ = val;
1841 bool
1842 BE_GlobalData::gen_noeventccm () const
1844 return this->gen_noeventccm_;
1847 void
1848 BE_GlobalData::gen_lwccm (bool val)
1850 this->gen_lwccm_ = val;
1853 bool
1854 BE_GlobalData::gen_lwccm () const
1856 return this->gen_lwccm_;
1860 void
1861 BE_GlobalData::opt_tc (bool val)
1863 this->opt_tc_ = val;
1866 bool
1867 BE_GlobalData::opt_tc () const
1869 return this->opt_tc_;
1872 void
1873 BE_GlobalData::ami4ccm_call_back (bool val)
1875 this->ami4ccm_call_back_ = val;
1878 bool
1879 BE_GlobalData::ami4ccm_call_back () const
1881 return this->ami4ccm_call_back_;
1884 void
1885 BE_GlobalData::ami_call_back (bool val)
1887 this->ami_call_back_ = val;
1890 bool
1891 BE_GlobalData::ami_call_back () const
1893 return this->ami_call_back_;
1896 void
1897 BE_GlobalData::gen_amh_classes (bool val)
1899 this->gen_amh_classes_ = val;
1902 bool
1903 BE_GlobalData::gen_amh_classes () const
1905 return this->gen_amh_classes_;
1908 void
1909 BE_GlobalData::gen_tie_classes (bool val)
1911 this->gen_tie_classes_ = val;
1914 bool
1915 BE_GlobalData::gen_tie_classes () const
1917 return this->gen_tie_classes_;
1920 void
1921 BE_GlobalData::gen_smart_proxies (bool val)
1923 this->gen_smart_proxies_ = val;
1926 bool
1927 BE_GlobalData::gen_smart_proxies () const
1929 return this->gen_smart_proxies_;
1932 void
1933 BE_GlobalData::gen_inline_constants (bool val)
1935 this->gen_inline_constants_ = val;
1938 bool
1939 BE_GlobalData::gen_inline_constants () const
1941 return this->gen_inline_constants_;
1944 void
1945 BE_GlobalData::gen_orb_h_include (bool val)
1947 this->gen_orb_h_include_ = val;
1950 bool
1951 BE_GlobalData::gen_orb_h_include () const
1953 return this->gen_orb_h_include_;
1956 void
1957 BE_GlobalData::gen_empty_anyop_header (bool val)
1959 this->gen_empty_anyop_header_ = val;
1962 bool
1963 BE_GlobalData::gen_empty_anyop_header () const
1965 return this->gen_empty_anyop_header_;
1968 void
1969 BE_GlobalData::lookup_strategy (LOOKUP_STRATEGY s)
1971 this->lookup_strategy_ = s;
1974 BE_GlobalData::LOOKUP_STRATEGY
1975 BE_GlobalData::lookup_strategy () const
1977 return this->lookup_strategy_;
1980 void
1981 BE_GlobalData::dds_impl (char const * const val)
1983 ACE_CString tmp (val, nullptr, false);
1985 if (tmp == "ndds")
1987 this->dds_impl_ = NDDS;
1989 else if (tmp == "opensplice")
1991 this->dds_impl_ = OPENSPLICE;
1993 else if (tmp == "opendds")
1995 this->dds_impl_ = OPENDDS;
1997 else if (tmp == "coredx")
1999 this->dds_impl_ = COREDX;
2001 else
2003 ACE_ERROR ((LM_ERROR,
2004 ACE_TEXT ("%C: invalid or unknown ")
2005 ACE_TEXT ("argument <%C> to -Wb,dds_impl\n"),
2006 idl_global->prog_name (),
2007 val));
2011 BE_GlobalData::DDS_IMPL
2012 BE_GlobalData::dds_impl () const
2014 return this->dds_impl_;
2017 void
2018 BE_GlobalData::destroy ()
2020 ACE::strdelete (this->skel_export_macro_);
2021 this->skel_export_macro_ = nullptr;
2023 ACE::strdelete (this->skel_export_include_);
2024 this->skel_export_include_ = nullptr;
2026 ACE::strdelete (this->skel_export_file_);
2027 this->skel_export_file_ = nullptr;
2029 ACE::strdelete (this->stub_export_macro_);
2030 this->stub_export_macro_ = nullptr;
2032 ACE::strdelete (this->stub_export_include_);
2033 this->stub_export_include_ = nullptr;
2035 ACE::strdelete (this->stub_export_file_);
2036 this->stub_export_file_ = nullptr;
2038 ACE::strdelete (this->anyop_export_macro_);
2039 this->anyop_export_macro_ = nullptr;
2041 ACE::strdelete (this->anyop_export_include_);
2042 this->anyop_export_include_ = nullptr;
2044 ACE::strdelete (this->exec_export_macro_);
2045 this->exec_export_macro_ = nullptr;
2047 ACE::strdelete (this->exec_export_include_);
2048 this->exec_export_include_ = nullptr;
2050 ACE::strdelete (this->svnt_export_macro_);
2051 this->svnt_export_macro_ = nullptr;
2053 ACE::strdelete (this->svnt_export_include_);
2054 this->svnt_export_include_ = nullptr;
2056 ACE::strdelete (this->conn_export_macro_);
2057 this->conn_export_macro_ = nullptr;
2059 ACE::strdelete (this->conn_export_include_);
2060 this->conn_export_include_ = nullptr;
2062 ACE::strdelete (this->pch_include_);
2063 this->pch_include_ = nullptr;
2065 ACE::strdelete (this->pre_include_);
2066 this->pre_include_ = nullptr;
2068 ACE::strdelete (this->post_include_);
2069 this->post_include_ = nullptr;
2071 ACE::strdelete (this->include_guard_);
2072 this->include_guard_ = nullptr;
2074 ACE::strdelete (this->safe_include_);
2075 this->safe_include_ = nullptr;
2077 ACE::strdelete (this->unique_include_);
2078 this->unique_include_ = nullptr;
2080 ACE::strdelete (this->stripped_filename_);
2081 this->stripped_filename_ = nullptr;
2083 ACE::strdelete (this->client_hdr_ending_);
2084 this->client_hdr_ending_ = nullptr;
2086 ACE::strdelete (this->client_stub_ending_);
2087 this->client_stub_ending_ = nullptr;
2089 ACE::strdelete (this->client_inline_ending_);
2090 this->client_inline_ending_ = nullptr;
2092 ACE::strdelete (this->server_hdr_ending_);
2093 this->server_hdr_ending_ = nullptr;
2095 ACE::strdelete (this->implementation_hdr_ending_);
2096 this->implementation_hdr_ending_ = nullptr;
2098 ACE::strdelete (this->implementation_skel_ending_);
2099 this->implementation_skel_ending_ = nullptr;
2101 ACE::strdelete (this->impl_class_prefix_);
2102 this->impl_class_prefix_ = nullptr;
2104 ACE::strdelete (this->impl_class_suffix_);
2105 this->impl_class_suffix_ = nullptr;
2107 ACE::strdelete (this->server_template_hdr_ending_);
2108 this->server_template_hdr_ending_ = nullptr;
2110 ACE::strdelete (this->server_skeleton_ending_);
2111 this->server_skeleton_ending_ = nullptr;
2113 ACE::strdelete (this->server_template_skeleton_ending_);
2114 this->server_template_skeleton_ending_ = nullptr;
2116 ACE::strdelete (this->anyop_hdr_ending_);
2117 this->anyop_hdr_ending_ = nullptr;
2119 ACE::strdelete (this->anyop_src_ending_);
2120 this->anyop_src_ending_ = nullptr;
2122 ACE::strdelete (this->ciao_svnt_hdr_ending_);
2123 this->ciao_svnt_hdr_ending_ = nullptr;
2125 ACE::strdelete (this->ciao_svnt_src_ending_);
2126 this->ciao_svnt_src_ending_ = nullptr;
2128 ACE::strdelete (this->ciao_svnt_hdr_template_ending_);
2129 this->ciao_svnt_hdr_template_ending_ = nullptr;
2131 ACE::strdelete (this->ciao_svnt_src_template_ending_);
2132 this->ciao_svnt_src_template_ending_ = nullptr;
2134 ACE::strdelete (this->ciao_exec_hdr_ending_);
2135 this->ciao_exec_hdr_ending_ = nullptr;
2137 ACE::strdelete (this->ciao_exec_src_ending_);
2138 this->ciao_exec_src_ending_ = nullptr;
2140 ACE::strdelete (this->ciao_exec_stub_hdr_ending_);
2141 this->ciao_exec_stub_hdr_ending_ = nullptr;
2143 ACE::strdelete (this->ciao_exec_idl_ending_);
2144 this->ciao_exec_idl_ending_ = nullptr;
2146 ACE::strdelete (this->ciao_conn_hdr_ending_);
2147 this->ciao_conn_hdr_ending_ = nullptr;
2149 ACE::strdelete (this->ciao_conn_src_ending_);
2150 this->ciao_conn_src_ending_ = nullptr;
2152 ACE::strdelete (this->dds_typesupport_hdr_ending_);
2153 this->dds_typesupport_hdr_ending_ = nullptr;
2155 ACE::strdelete (this->ciao_ami_conn_idl_ending_);
2156 this->ciao_ami_conn_idl_ending_ = nullptr;
2158 ACE::strdelete (this->ciao_ami_conn_impl_hdr_ending_);
2159 this->ciao_ami_conn_impl_hdr_ending_ = nullptr;
2161 ACE::strdelete (this->ciao_ami_conn_impl_src_ending_);
2162 this->ciao_ami_conn_impl_src_ending_ = nullptr;
2164 ACE::strdelete (this->ciao_container_type_);
2165 this->ciao_container_type_ = nullptr;
2167 ACE::strdelete (this->output_dir_);
2168 this->output_dir_ = nullptr;
2170 ACE::strdelete (this->stub_include_dir_);
2171 this->stub_include_dir_ = nullptr;
2173 ACE::strdelete (this->skel_output_dir_);
2174 this->skel_output_dir_ = nullptr;
2176 ACE::strdelete (this->anyop_output_dir_);
2177 this->anyop_output_dir_ = nullptr;
2179 ACE::strdelete (this->exec_output_dir_);
2180 this->exec_output_dir_ = nullptr;
2182 if (nullptr != this->messaging_)
2184 this->messaging_->destroy ();
2185 delete this->messaging_;
2186 this->messaging_ = nullptr;
2189 if (nullptr != this->messaging_exceptionholder_)
2191 this->messaging_exceptionholder_->destroy ();
2192 delete this->messaging_exceptionholder_;
2193 this->messaging_exceptionholder_ = nullptr;
2196 if (nullptr != this->messaging_replyhandler_)
2198 this->messaging_replyhandler_->destroy ();
2199 delete this->messaging_replyhandler_;
2200 this->messaging_replyhandler_ = nullptr;
2203 if (nullptr != tao_cg)
2205 tao_cg->destroy ();
2209 AST_PredefinedType *
2210 BE_GlobalData:: void_type ()
2212 if (nullptr == this->void_type_)
2214 AST_Decl *d =
2215 idl_global->root ()->lookup_primitive_type (
2216 AST_Expression::EV_void);
2218 this->void_type_ = dynamic_cast<AST_PredefinedType*> (d);
2221 return this->void_type_;
2224 be_interface *
2225 BE_GlobalData::ccmobject ()
2227 if (nullptr == this->ccmobject_)
2229 Identifier *local_id = nullptr;
2230 ACE_NEW_RETURN (local_id,
2231 Identifier ("CCMObject"),
2232 nullptr);
2233 UTL_ScopedName *local_name = nullptr;
2234 ACE_NEW_RETURN (local_name,
2235 UTL_ScopedName (local_id, nullptr),
2236 nullptr);
2238 Identifier *module_id = nullptr;
2239 ACE_NEW_RETURN (module_id,
2240 Identifier ("Components"),
2241 nullptr);
2242 UTL_ScopedName sn (module_id,
2243 local_name);
2245 AST_Decl *d =
2246 idl_global->scopes ().top_non_null ()->lookup_by_name (&sn,
2247 true);
2249 sn.destroy ();
2251 if (nullptr == d)
2253 ACE_ERROR_RETURN ((LM_ERROR,
2254 "(%N:%l) be_global::ccmobject - "
2255 "lookup of CCMObject failed\n"),
2259 this->ccmobject_ = dynamic_cast<be_interface*> (d);
2262 return this->ccmobject_;
2265 be_module *
2266 BE_GlobalData::messaging ()
2268 if (nullptr == this->messaging_)
2270 Identifier *id = nullptr;
2271 UTL_ScopedName *sn = nullptr;
2273 ACE_NEW_RETURN (id,
2274 Identifier ("Messaging"),
2275 nullptr);
2277 ACE_NEW_RETURN (sn,
2278 UTL_ScopedName (id,
2279 nullptr),
2280 nullptr);
2282 ACE_NEW_RETURN (this->messaging_,
2283 be_module (sn),
2284 nullptr);
2286 this->messaging_->set_name (sn);
2289 return this->messaging_;
2292 be_valuetype *
2293 BE_GlobalData::messaging_exceptionholder ()
2295 if (nullptr == this->messaging_exceptionholder_)
2297 Identifier *id = nullptr;
2298 be_module *msg = this->messaging ();
2299 idl_global->scopes ().push (msg);
2301 ACE_NEW_RETURN (id,
2302 Identifier ("Messaging"),
2303 nullptr);
2305 // Create a valuetype "ExceptionHolder"
2306 // from which we inherit.
2307 UTL_ScopedName *full_name = nullptr;
2308 ACE_NEW_RETURN (full_name,
2309 UTL_ScopedName (id,
2310 nullptr),
2311 nullptr);
2313 ACE_NEW_RETURN (id,
2314 Identifier ("ExceptionHolder"),
2315 nullptr);
2317 UTL_ScopedName *local_name = nullptr;
2318 ACE_NEW_RETURN (local_name,
2319 UTL_ScopedName (id,
2320 nullptr),
2321 nullptr);
2323 full_name->nconc (local_name);
2325 ACE_NEW_RETURN (this->messaging_exceptionholder_,
2326 be_valuetype (full_name,
2327 nullptr,
2329 nullptr,
2330 nullptr,
2332 nullptr,
2334 nullptr,
2338 nullptr);
2340 this->messaging_exceptionholder_->set_name (full_name);
2342 // Notice the valuetype "ExceptionHolder" that it is defined in the
2343 // "Messaging" module
2344 this->messaging_exceptionholder_->set_defined_in (msg);
2345 this->messaging_exceptionholder_->set_prefix_with_typeprefix ("omg.org");
2347 idl_global->scopes ().pop ();
2349 // Notice the interface "ReplyHandler" that it is defined in the
2350 // "Messaging" module.
2351 this->messaging_exceptionholder_->set_defined_in (msg);
2354 return this->messaging_exceptionholder_;
2357 be_interface *
2358 BE_GlobalData::messaging_replyhandler ()
2360 if (nullptr == this->messaging_replyhandler_)
2362 be_module *msg = this->messaging ();
2363 idl_global->scopes ().push (msg);
2365 Identifier *id = nullptr;
2366 UTL_ScopedName *local_name = nullptr;
2368 // Create a virtual module named "Messaging"
2369 // "and an interface "ReplyHandler"
2370 // from which we inherit.
2371 ACE_NEW_RETURN (id,
2372 Identifier ("Messaging"),
2373 nullptr);
2375 UTL_ScopedName *full_name = nullptr;
2376 ACE_NEW_RETURN (full_name,
2377 UTL_ScopedName (id,
2378 nullptr),
2379 nullptr);
2381 ACE_NEW_RETURN (id,
2382 Identifier ("ReplyHandler"),
2383 nullptr);
2385 ACE_NEW_RETURN (local_name,
2386 UTL_ScopedName (id,
2387 nullptr),
2388 nullptr);
2390 full_name->nconc (local_name);
2392 ACE_NEW_RETURN (this->messaging_replyhandler_,
2393 be_interface (full_name,
2394 nullptr, // inherited interfaces
2395 0, // number of inherited interfaces
2396 nullptr, // ancestors
2397 0, // number of ancestors
2398 0, // not local
2399 0), // not abstract
2400 nullptr);
2402 this->messaging_replyhandler_->set_name (full_name);
2403 this->messaging_replyhandler_->set_prefix_with_typeprefix ("omg.org");
2405 idl_global->scopes ().pop ();
2407 // Notice the interface "ReplyHandler" that it is defined in the
2408 // "Messaging" module.
2409 this->messaging_replyhandler_->set_defined_in (msg);
2412 return this->messaging_replyhandler_;
2415 bool
2416 BE_GlobalData::gen_anyop_files () const
2418 return this->gen_anyop_files_;
2421 void
2422 BE_GlobalData::gen_anyop_files (bool val)
2424 this->gen_anyop_files_ = val;
2427 bool
2428 BE_GlobalData::gen_skel_files () const
2430 return this->gen_skel_files_;
2433 void
2434 BE_GlobalData::gen_skel_files (bool val)
2436 this->gen_skel_files_ = val;
2439 bool
2440 BE_GlobalData::gen_svnt_cpp_files () const
2442 return this->gen_svnt_cpp_files_;
2445 void
2446 BE_GlobalData::gen_svnt_cpp_files (bool val)
2448 this->gen_svnt_cpp_files_ = val;
2451 bool
2452 BE_GlobalData::gen_svnt_t_files () const
2454 return this->gen_svnt_t_files_;
2457 void
2458 BE_GlobalData::gen_svnt_t_files (bool val)
2460 this->gen_svnt_t_files_ = val;
2463 bool
2464 BE_GlobalData::gen_client_inline () const
2466 return this->gen_client_inline_;
2469 void
2470 BE_GlobalData::gen_client_inline (bool val)
2472 this->gen_client_inline_ = val;
2475 bool
2476 BE_GlobalData::gen_client_stub () const
2478 return this->gen_client_stub_;
2481 void
2482 BE_GlobalData::gen_client_stub (bool val)
2484 this->gen_client_stub_ = val;
2487 bool
2488 BE_GlobalData::gen_client_header () const
2490 return this->gen_client_header_;
2493 void
2494 BE_GlobalData::gen_client_header (bool val)
2496 this->gen_client_header_ = val;
2499 bool
2500 BE_GlobalData::gen_server_skeleton () const
2502 return this->gen_server_skeleton_;
2505 void
2506 BE_GlobalData::gen_server_skeleton (bool val)
2508 this->gen_server_skeleton_ = val;
2511 bool
2512 BE_GlobalData::gen_server_header () const
2514 return this->gen_server_header_;
2517 void
2518 BE_GlobalData::gen_server_header (bool val)
2520 this->gen_server_header_ = val;
2523 bool
2524 BE_GlobalData::gen_local_iface_anyops () const
2526 return this->gen_local_iface_anyops_;
2529 void
2530 BE_GlobalData::gen_local_iface_anyops (bool val)
2532 this->gen_local_iface_anyops_ = val;
2535 bool
2536 BE_GlobalData::gen_custom_ending () const
2538 return this->gen_custom_ending_;
2541 void
2542 BE_GlobalData::gen_custom_ending (bool val)
2544 this->gen_custom_ending_ = val;
2547 bool
2548 BE_GlobalData::gen_unique_guards () const
2550 return this->gen_unique_guards_;
2553 void
2554 BE_GlobalData::gen_unique_guards (bool val)
2556 this->gen_unique_guards_ = val;
2559 bool
2560 BE_GlobalData::gen_ciao_svnt () const
2562 return this->gen_ciao_svnt_;
2565 void
2566 BE_GlobalData::gen_ciao_svnt (bool val)
2568 this->gen_ciao_svnt_ = val;
2571 bool
2572 BE_GlobalData::gen_ciao_exec_idl () const
2574 return this->gen_ciao_exec_idl_;
2577 void
2578 BE_GlobalData::gen_ciao_exec_idl (bool val)
2580 this->gen_ciao_exec_idl_ = val;
2583 bool
2584 BE_GlobalData::gen_ciao_exec_impl () const
2586 return this->gen_ciao_exec_impl_;
2589 void
2590 BE_GlobalData::gen_ciao_exec_impl (bool val)
2592 this->gen_ciao_exec_impl_ = val;
2595 bool
2596 BE_GlobalData::gen_ciao_exec_reactor_impl () const
2598 return this->gen_ciao_exec_reactor_impl_;
2601 void
2602 BE_GlobalData::gen_ciao_exec_reactor_impl (bool val)
2604 this->gen_ciao_exec_reactor_impl_ = val;
2607 bool
2608 BE_GlobalData::gen_ciao_conn_impl () const
2610 return this->gen_ciao_conn_impl_;
2613 void
2614 BE_GlobalData::gen_ciao_conn_impl (bool val)
2616 this->gen_ciao_conn_impl_ = val;
2619 bool
2620 BE_GlobalData::gen_dds_typesupport_idl () const
2622 return this->gen_dds_typesupport_idl_;
2625 void
2626 BE_GlobalData::gen_dds_typesupport_idl (bool val)
2628 this->gen_dds_typesupport_idl_ = val;
2631 bool
2632 BE_GlobalData::gen_ciao_valuefactory_reg () const
2634 return this->gen_ciao_valuefactory_reg_;
2637 void
2638 BE_GlobalData::gen_ciao_valuefactory_reg (bool val)
2640 this->gen_ciao_valuefactory_reg_ = val;
2643 bool
2644 BE_GlobalData::gen_stub_export_hdr_file () const
2646 return this->gen_stub_export_hdr_file_;
2649 void
2650 BE_GlobalData::gen_stub_export_hdr_file (bool val)
2652 this->gen_stub_export_hdr_file_ = val;
2655 bool
2656 BE_GlobalData::gen_skel_export_hdr_file () const
2658 return this->gen_skel_export_hdr_file_;
2661 void
2662 BE_GlobalData::gen_skel_export_hdr_file (bool val)
2664 this->gen_skel_export_hdr_file_ = val;
2667 bool
2668 BE_GlobalData::gen_svnt_export_hdr_file () const
2670 return this->gen_svnt_export_hdr_file_;
2673 void
2674 BE_GlobalData::gen_svnt_export_hdr_file (bool val)
2676 this->gen_svnt_export_hdr_file_ = val;
2679 bool
2680 BE_GlobalData::gen_exec_export_hdr_file () const
2682 return this->gen_exec_export_hdr_file_;
2685 void
2686 BE_GlobalData::gen_exec_export_hdr_file (bool val)
2688 this->gen_exec_export_hdr_file_ = val;
2691 bool
2692 BE_GlobalData::gen_conn_export_hdr_file () const
2694 return this->gen_conn_export_hdr_file_;
2697 void
2698 BE_GlobalData::gen_conn_export_hdr_file (bool val)
2700 this->gen_conn_export_hdr_file_ = val;
2703 bool
2704 BE_GlobalData::alt_mapping () const
2706 return this->alt_mapping_;
2709 void
2710 BE_GlobalData::alt_mapping (bool val)
2712 this->alt_mapping_ = val;
2715 bool
2716 BE_GlobalData::in_facet_servant () const
2718 return this->in_facet_servant_;
2721 void
2722 BE_GlobalData::in_facet_servant (bool val)
2724 this->in_facet_servant_ = val;
2727 bool
2728 BE_GlobalData::gen_arg_traits () const
2730 return this->gen_arg_traits_;
2733 void
2734 BE_GlobalData::gen_arg_traits (bool val)
2736 this->gen_arg_traits_ = val;
2739 bool
2740 BE_GlobalData::gen_anytypecode_adapter () const
2742 return this->gen_anytypecode_adapter_;
2745 void
2746 BE_GlobalData::gen_anytypecode_adapter (bool val)
2748 this->gen_anytypecode_adapter_ = val;
2751 bool
2752 BE_GlobalData::no_fixed_err () const
2754 return this->no_fixed_err_;
2757 void
2758 BE_GlobalData::no_fixed_err (bool val)
2760 this->no_fixed_err_ = val;
2763 unsigned long
2764 BE_GlobalData::tab_size () const
2766 return this->tab_size_;
2769 void
2770 BE_GlobalData::tab_size (unsigned long val)
2772 this->tab_size_ = val;
2775 ACE_CString
2776 BE_GlobalData::spawn_options ()
2778 return idl_global->idl_flags ();
2781 void
2782 BE_GlobalData::parse_args (long &i, char **av)
2784 switch (av[i][1])
2786 // = Various 'h'eader_file_name_endings.
2787 case 'h':
2789 // <-hc Client's header file name ending>
2790 // Default is "C.h".
2791 // <-hs Server's header file name ending>
2792 // Default is "S.h".
2793 // <-hT Server's template hdr file name ending>
2794 // Default is "S_T.h".
2795 // <-hI Server's implementation header file name ending>
2796 // Default is "I.h".
2798 if (av[i][2] == 'c')
2800 // Client stub's header file ending.
2801 // @@ No error handling done here.
2802 idl_global->append_idl_flag (av[i + 1]);
2803 be_global->client_hdr_ending (av[i + 1]);
2804 ++i;
2806 else if (av[i][2] == 's')
2808 // Server skeleton's header file.
2809 idl_global->append_idl_flag (av[i + 1]);
2810 be_global->server_hdr_ending (av[i + 1]);
2811 ++i;
2813 else if (av[i][2] == 'T')
2815 // Server template header ending.
2816 idl_global->append_idl_flag (av[i + 1]);
2817 be_global->server_template_hdr_ending (av[i + 1]);
2818 ++i;
2820 else if (av[i][2] == 'I')
2822 // Server implementation header ending.
2823 idl_global->append_idl_flag (av[i + 1]);
2824 be_global->implementation_hdr_ending (av[i + 1]);
2825 ++i;
2827 else
2829 // I expect 'c' or 's' or 'I' or 'T' after this.
2830 ACE_ERROR ((
2831 LM_ERROR,
2832 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2833 av[i]
2835 idl_global->parse_args_exit (1);
2837 break;
2838 case 'b':
2839 if (av[i][2] == '\0')
2841 be_global->use_clonable_in_args(true);
2843 else
2845 ACE_ERROR ((
2846 LM_ERROR,
2847 ACE_TEXT ("IDL: I don't understand")
2848 ACE_TEXT (" the '%C' option\n"),
2849 av[i]
2851 idl_global->parse_args_exit (1);
2853 break;
2854 // = Various 'c'lient side stub file_name_endings.
2855 case 'c':
2856 // <-cs Client stub's file name ending>
2857 // Default is "C.cpp".
2858 // <-ci Client inline file name ending>
2859 // Default is "C.inl".
2861 if (av[i][2] == 's')
2863 idl_global->append_idl_flag (av[i + 1]);
2864 be_global->client_stub_ending (av[i + 1]);
2865 i++;
2867 else if (av[i][2] == 'i')
2869 idl_global->append_idl_flag (av[i + 1]);
2870 be_global->client_inline_ending (av[i + 1]);
2871 i++;
2873 else
2875 // I expect 's' or 'i' after 'c'.
2876 ACE_ERROR ((
2877 LM_ERROR,
2878 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2879 av[i]
2881 idl_global->parse_args_exit (1);
2883 break;
2884 // = Various 's'erver side skeleton file name endings.
2885 case 's':
2886 // <-ss Server's skeleton file name ending>
2887 // Default is "S.cpp".
2888 // <-sT Server's template skeleton file name ending>
2889 // Default is "S_T.cpp".
2890 // <-sI Server's implementation skeleton file name ending>
2891 // Default is "I.cpp".
2893 if (av[i][2] == 's')
2895 idl_global->append_idl_flag (av[i + 1]);
2896 be_global->server_skeleton_ending (av[i + 1]);
2897 ++i;
2899 else if (av[i][2] == 'T')
2901 idl_global->append_idl_flag (av[i + 1]);
2902 be_global->server_template_skeleton_ending (av[i + 1]);
2903 ++i;
2905 else if (av[i][2] == 'I')
2907 idl_global->append_idl_flag (av[i + 1]);
2908 be_global->implementation_skel_ending (av[i + 1]);
2909 ++i;
2911 else
2913 // I expect 's' or 'T' or or 't' after 's'.
2914 ACE_ERROR ((
2915 LM_ERROR,
2916 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2917 av[i]
2919 idl_global->parse_args_exit (1);
2921 break;
2922 // Operation lookup strategy.
2923 // <perfect_hash>, <dynamic_hash> or <binary_search>
2924 // Default is perfect.
2925 case 'H':
2926 idl_global->append_idl_flag (av[i + 1]);
2928 if (av[i + 1] == nullptr || av[i + 1][0] == '-')
2930 ACE_ERROR ((LM_ERROR,
2931 ACE_TEXT ("no selection for -H option\n")));
2932 idl_global->parse_args_exit (1);
2934 else if (ACE_OS::strcmp (av[i+1], "dynamic_hash") == 0)
2936 be_global->lookup_strategy (BE_GlobalData::TAO_DYNAMIC_HASH);
2938 else if (ACE_OS::strcmp (av[i + 1], "perfect_hash") == 0)
2940 be_global->lookup_strategy (BE_GlobalData::TAO_PERFECT_HASH);
2942 else if (ACE_OS::strcmp (av[i + 1], "binary_search") == 0)
2944 be_global->lookup_strategy (BE_GlobalData::TAO_BINARY_SEARCH);
2946 else if (ACE_OS::strcmp (av[i + 1], "linear_search") == 0)
2948 be_global->lookup_strategy (BE_GlobalData::TAO_LINEAR_SEARCH);
2950 else
2952 ACE_ERROR ((LM_ERROR,
2953 ACE_TEXT ("%C: unknown operation lookup <%C>\n"),
2954 av[0],
2955 av[i + 1]));
2956 idl_global->parse_args_exit (1);
2959 ++i;
2960 break;
2961 // Switching between ""s and <>s when we generate
2962 // #include statements for the standard files (e.g. tao/corba.h)
2963 case 'i':
2964 if (av[i][2] == 'c')
2966 be_global->changing_standard_include_files (1);
2968 else if (av[i][2] == 'n')
2970 be_global->changing_standard_include_files (0);
2972 else if (av[i][2] == 'C')
2974 if (av[i][3] == '\0')
2976 be_global->stub_include_dir (av[i + 1]);
2977 ++i;
2979 else
2981 ACE_ERROR ((
2982 LM_ERROR,
2983 ACE_TEXT ("IDL: I don't understand")
2984 ACE_TEXT (" the '%C' option\n"),
2985 av[i]
2987 idl_global->parse_args_exit (1);
2990 else
2992 ACE_ERROR ((
2993 LM_ERROR,
2994 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2995 av[i]
2997 idl_global->parse_args_exit (1);
3000 break;
3001 // Path for the perfect hash generator(gperf) program. Default
3002 // is $ACE_ROOT/bin/ace_gperf.
3003 case 'g':
3004 if (av[i][2] == '\0')
3006 idl_global->append_idl_flag (av[i + 1]);
3007 ACE_CString tmp (av[i + 1], nullptr, false);
3008 #if defined (ACE_WIN32)
3009 // WIN32's CreateProcess needs the full executable name
3010 // when the gperf path is modified, but not for the default
3011 // path given above. Other platforms don't need the
3012 // executable name at all.
3013 tmp += "\\ace_gperf.exe";
3014 #endif
3015 idl_global->gperf_path (tmp.fast_rep ());
3016 ++i;
3018 else
3020 ACE_ERROR ((
3021 LM_ERROR,
3022 ACE_TEXT ("IDL: I don't understand")
3023 ACE_TEXT (" the '%C' option\n"),
3024 av[i]
3026 idl_global->parse_args_exit (1);
3029 break;
3030 // Directory where all the IDL-Compiler-Generated files are to
3031 // be kept. Default is the current directory from which the
3032 // <tao_idl> is called.
3033 case 'o':
3034 if (av[i][2] == '\0')
3036 idl_global->append_idl_flag (av[i + 1]);
3037 int result = ACE_OS::mkdir (av[i + 1]);
3039 #if !defined (__BORLANDC__)
3040 if (result != 0 && errno != EEXIST)
3041 #else
3042 // The Borland RTL doesn't give EEXIST back, only EACCES in case
3043 // the directory exists, reported to Borland as QC 9495
3044 if (result != 0 && errno != EEXIST && errno != EACCES)
3045 #endif
3047 ACE_ERROR ((
3048 LM_ERROR,
3049 ACE_TEXT ("IDL: unable to create directory %C")
3050 ACE_TEXT (" specified by -o option\n"),
3051 av[i + 1]
3053 idl_global->parse_args_exit (1);
3056 be_global->output_dir (av[i + 1]);
3057 ++i;
3059 else if (av[i][2] == 'A')
3061 if (av[i][3] == '\0')
3063 idl_global->append_idl_flag (av[i + 1]);
3064 int result = ACE_OS::mkdir (av[i + 1]);
3066 #if !defined (__BORLANDC__)
3067 if (result != 0 && errno != EEXIST)
3068 #else
3069 // The Borland RTL doesn't give EEXIST back, only EACCES in
3070 // case the directory exists, reported to Borland as QC 9495
3071 if (result != 0 && errno != EEXIST && errno != EACCES)
3072 #endif
3074 ACE_ERROR ((
3075 LM_ERROR,
3076 ACE_TEXT ("IDL: unable to create directory %C")
3077 ACE_TEXT (" specified by -oA option\n"),
3078 av[i + 1]
3081 idl_global->parse_args_exit (1);
3084 be_global->anyop_output_dir (av[i + 1]);
3085 ++i;
3087 else
3089 ACE_ERROR ((
3090 LM_ERROR,
3091 ACE_TEXT ("IDL: I don't understand")
3092 ACE_TEXT (" the '%C' option\n"),
3093 av[i]
3095 idl_global->parse_args_exit (1);
3098 else if (av[i][2] == 'E')
3100 if (av[i][3] == '\0')
3102 idl_global->append_idl_flag (av[i + 1]);
3103 int result = ACE_OS::mkdir (av[i + 1]);
3105 #if !defined (__BORLANDC__)
3106 if (result != 0 && errno != EEXIST)
3107 #else
3108 // The Borland RTL doesn't give EEXIST back, only EACCES in
3109 // case the directory exists, reported to Borland as QC 9495
3110 if (result != 0 && errno != EEXIST && errno != EACCES)
3111 #endif
3113 ACE_ERROR ((
3114 LM_ERROR,
3115 ACE_TEXT ("IDL: unable to create directory %C")
3116 ACE_TEXT (" specified by -oE option\n"),
3117 av[i + 1]
3120 idl_global->parse_args_exit (1);
3123 be_global->exec_output_dir (av[i + 1]);
3124 ++i;
3126 else
3128 ACE_ERROR ((
3129 LM_ERROR,
3130 ACE_TEXT ("IDL: I don't understand")
3131 ACE_TEXT (" the '%C' option\n"),
3132 av[i]
3134 idl_global->parse_args_exit (1);
3137 else if (av[i][2] == 'N')
3139 if (av[i][3] == '\0')
3141 // Don't overwrite exec files.
3142 be_global->overwrite_not_exec (true);
3144 else
3146 ACE_ERROR ((
3147 LM_ERROR,
3148 ACE_TEXT ("IDL: I don't understand")
3149 ACE_TEXT (" the '%C' option\n"),
3150 av[i]
3152 idl_global->parse_args_exit (1);
3155 else if (av[i][2] == 'S')
3157 if (av[i][3] == '\0')
3159 idl_global->append_idl_flag (av[i + 1]);
3160 int result = ACE_OS::mkdir (av[i + 1]);
3162 #if !defined (__BORLANDC__)
3163 if (result != 0 && errno != EEXIST)
3164 #else
3165 // The Borland RTL doesn't give EEXIST back, only EACCES in
3166 // case the directory exists, reported to Borland as QC 9495
3167 if (result != 0 && errno != EEXIST && errno != EACCES)
3168 #endif
3170 ACE_ERROR ((
3171 LM_ERROR,
3172 ACE_TEXT ("IDL: unable to create directory %C")
3173 ACE_TEXT (" specified by -oS option\n"),
3174 av[i + 1]
3177 idl_global->parse_args_exit (1);
3180 be_global->skel_output_dir (av[i + 1]);
3181 ++i;
3183 else
3185 ACE_ERROR ((
3186 LM_ERROR,
3187 ACE_TEXT ("IDL: I don't understand")
3188 ACE_TEXT (" the '%C' option\n"),
3189 av[i]
3191 idl_global->parse_args_exit (1);
3194 else
3196 ACE_ERROR ((
3197 LM_ERROR,
3198 ACE_TEXT ("IDL: I don't understand")
3199 ACE_TEXT (" the '%C' option\n"),
3200 av[i]
3202 idl_global->parse_args_exit (1);
3205 break;
3206 case 'G':
3207 // Enable generation of ...
3208 if (av[i][2] == 'C')
3210 // AMI with Call back.
3211 be_global->ami_call_back (true);
3213 else if (av[i][2] == 'M')
3215 // AMI4CCM calls implicit option 'C': AMI with Call back.
3216 be_global->ami_call_back (true);
3217 // Generate tie classes and files
3218 be_global->ami4ccm_call_back (true);
3220 else if (av[i][2] == 'T')
3222 // Generate tie classes and files
3223 be_global->gen_tie_classes (true);
3225 else if (av[i][2] == 'H')
3227 // AMH classes.
3228 be_global->gen_amh_classes (true);
3230 else if (av[i][2] == 'X')
3232 // Generate empty A.h file.
3233 be_global->gen_empty_anyop_header (true);
3235 else if (av[i][2] == 'A')
3237 // TAO-team-only, undocumented option to generate
3238 // Any operators into a separate set of files.
3239 be_global->gen_anyop_files (true);
3241 else if (av[i][2] == 'c' && av[i][3] == 'n')
3243 // CIAO connector impl code generation.
3244 be_global->gen_ciao_conn_impl (true);
3246 break;
3248 else if (av[i][2] == 't' && av[i][3] == 's')
3250 // DDS type support IDL generation.
3251 be_global->gen_dds_typesupport_idl (true);
3253 break;
3255 else if (av[i][2] == 's' && av[i][3] == 'd')
3257 // Generate static description operations
3258 be_global->gen_static_desc_operations (true);
3260 break;
3262 else if (av[i][2] == 'e' && av[i][3] == 'x')
3264 // CIAO executor impl code generation.
3265 be_global->gen_ciao_exec_impl (true);
3267 // should the reactor code be generated?
3268 if (av[i][4] == 'r')
3270 be_global->gen_ciao_exec_reactor_impl (true);
3272 break;
3274 else if (av[i][2] == 's')
3276 if (av[i][3] == 'p')
3278 // Smart proxies.
3279 be_global->gen_smart_proxies (true);
3281 else if (av[i][3] == 'e')
3283 // Explicit sequence base class template export.
3284 be_global->gen_template_export (true);
3286 else if (av[i][3] == 'v')
3288 // CIAO servant code generation.
3289 be_global->gen_ciao_svnt (true);
3291 else if (av[i][3] == 't' && av[i][4] == 'l')
3293 // Generate code using STL types for strings
3294 // and sequences.
3295 be_global->alt_mapping (true);
3297 else
3299 ACE_ERROR ((
3300 LM_ERROR,
3301 ACE_TEXT ("IDL: I don't understand ")
3302 ACE_TEXT ("the '%C' option\n"),
3303 av[i]
3305 idl_global->parse_args_exit (1);
3308 break;
3310 else if (av[i][2] == 'x')
3312 if (av[i][3] == 'h')
3314 if (av[i][4] == 's')
3316 if (av[i][5] == 't')
3318 be_global->gen_stub_export_hdr_file (true);
3320 else if (av[i][5] == 'k')
3322 be_global->gen_skel_export_hdr_file (true);
3324 else if (av[i][5] == 'v')
3326 be_global->gen_svnt_export_hdr_file (true);
3328 else
3330 ACE_ERROR ((
3331 LM_ERROR,
3332 ACE_TEXT ("IDL: I don't understand ")
3333 ACE_TEXT ("the '%s' option\n"),
3334 av[i]
3336 idl_global->parse_args_exit (1);
3339 break;
3341 else if (av[i][4] == 'e' && av[i][5] == 'x')
3343 be_global->gen_exec_export_hdr_file (true);
3345 else if (av[i][4] == 'c' && av[i][5] == 'n')
3347 be_global->gen_conn_export_hdr_file (true);
3349 else
3351 ACE_ERROR ((
3352 LM_ERROR,
3353 ACE_TEXT ("IDL: I don't understand ")
3354 ACE_TEXT ("the '%s' option\n"),
3355 av[i]
3357 idl_global->parse_args_exit (1);
3360 break;
3362 else
3364 ACE_ERROR ((
3365 LM_ERROR,
3366 ACE_TEXT ("IDL: I don't understand ")
3367 ACE_TEXT ("the '%s' option\n"),
3368 av[i]
3370 idl_global->parse_args_exit (1);
3373 break;
3375 else if (av[i][2] == 'u')
3377 if (av[i][3] == 'c')
3379 // Inline constants.
3380 be_global->gen_inline_constants (false);
3382 else
3384 ACE_ERROR ((
3385 LM_ERROR,
3386 ACE_TEXT ("IDL: I don't understand ")
3387 ACE_TEXT ("the '%C' option\n"),
3388 av[i]
3390 idl_global->parse_args_exit (1);
3393 break;
3395 else if (av[i][2] == 'c')
3397 if (av[i][3] == 'e')
3399 // CORBA/e.
3400 be_global->gen_corba_e (true);
3402 else if (av[i][3] == 'l')
3404 // CORBA/e.
3405 be_global->gen_lwccm (true);
3407 else if (av[i][3] == 'm')
3409 // NOEVENTS ccm, ccm without events .
3410 be_global->gen_noeventccm (true);
3412 else
3414 ACE_ERROR ((
3415 LM_ERROR,
3416 ACE_TEXT ("IDL: I don't understand ")
3417 ACE_TEXT ("the '%C' option\n"),
3418 av[i]
3420 idl_global->parse_args_exit (1);
3422 break;
3424 else if (av[i][2] == 'm')
3426 if (av[i][3] == 'c')
3428 // Minimum corba.
3429 be_global->gen_minimum_corba (true);
3431 else
3433 ACE_ERROR ((
3434 LM_ERROR,
3435 ACE_TEXT ("IDL: I don't understand ")
3436 ACE_TEXT ("the '%C' option\n"),
3437 av[i]
3439 idl_global->parse_args_exit (1);
3441 break;
3443 else if (av[i][2] == 't')
3445 // Optimized typecode generation.
3446 be_global->opt_tc (true);
3448 else if (av[i][2] == 'p')
3450 // Generating Thru_POA collocated stubs.
3451 be_global->gen_thru_poa_collocation (true);
3453 else if (av[i][2] == 'l')
3455 if (av[i][3] == 'e' && av[i][4] == 'm')
3457 be_global->gen_ciao_exec_idl (true);
3459 else
3461 ACE_ERROR ((
3462 LM_ERROR,
3463 ACE_TEXT ("IDL: I don't understand ")
3464 ACE_TEXT ("the '%s' option\n"),
3465 av[i]
3467 idl_global->parse_args_exit (1);
3470 break;
3472 else if (av[i][2] == 'd')
3474 if ('\0' == av[i][3])
3476 // Generating Direct collocated stubs.
3477 be_global->gen_direct_collocation (true);
3479 else
3481 ACE_ERROR ((
3482 LM_ERROR,
3483 ACE_TEXT ("IDL: I don't understand ")
3484 ACE_TEXT ("the '%C' option\n"),
3485 av[i]
3487 idl_global->parse_args_exit (1);
3490 else if (av[i][2] == 'o')
3492 if (av[i][3] == 's')
3494 // Generating ostream operators for each type.
3495 this->gen_ostream_operators (true);
3497 else
3499 ACE_ERROR ((
3500 LM_ERROR,
3501 ACE_TEXT ("IDL: I don't understand ")
3502 ACE_TEXT ("the '%C' option\n"),
3503 av[i]
3505 idl_global->parse_args_exit (1);
3508 else if (av[i][2] == 'I')
3510 size_t options = ACE_OS::strlen (av[i]) - 3;
3511 size_t j;
3512 size_t k = i;
3513 // Generate implementation files.
3514 be_global->gen_impl_files (true);
3516 for (j = 0; j < options; ++j)
3518 if (av[k][j + 3] == 's')
3520 idl_global->append_idl_flag (av[i + 1]);
3521 be_global->implementation_skel_ending (av[i + 1]);
3522 ++i;
3524 else if (av[k][j + 3] == 'h')
3526 idl_global->append_idl_flag (av[i + 1]);
3527 be_global->implementation_hdr_ending (av[i + 1]);
3528 ++i;
3530 else if (av[k][j + 3] == 'b')
3532 idl_global->append_idl_flag (av[i + 1]);
3533 be_global->impl_class_prefix (av[i + 1]);
3534 ++i;
3536 else if (av[k][j + 3] == 'e')
3538 idl_global->append_idl_flag (av[i + 1]);
3539 be_global->impl_class_suffix (av[i + 1]);
3540 ++i;
3542 else if (av[k][j + 3] == 'c')
3544 be_global->gen_copy_ctor (true);
3546 else if (av[k][j + 3] == 'a')
3548 be_global->gen_assign_op (true);
3550 else if (av[k][j + 3] == 'd')
3552 be_global->gen_impl_debug_info (true);
3554 else if (ACE_OS::ace_isalpha (av[k][j + 3] ))
3556 ACE_ERROR ((
3557 LM_ERROR,
3558 ACE_TEXT ("IDL: I don't understand")
3559 ACE_TEXT (" the '%C' option\n"),
3560 av[i]
3562 idl_global->parse_args_exit (1);
3566 else if (av[i][2] == 'a' && av[i][3] == 't' && av[i][4] == 'a')
3568 // Generate the AnyTypeCode_Adapter version of the Any insert
3569 // policy - used with the sequences of basic types in the ORB.
3570 be_global->gen_anytypecode_adapter (true);
3572 else
3574 ACE_ERROR ((
3575 LM_ERROR,
3576 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3577 av[i]
3579 idl_global->parse_args_exit (1);
3582 break;
3583 case 'S':
3584 // Suppress generation of...
3585 if (av[i][2] == 'a')
3587 if (av[i][3] == 'l')
3589 // Suppress Any support for local interfaces.
3590 be_global->gen_local_iface_anyops (false);
3592 else if (av[i][3] == 't')
3594 be_global->gen_arg_traits (false);
3596 else
3598 // Suppress all Any support.
3599 be_global->any_support (false);
3602 else if (av[i][2] == 's' && av[i][3] == 'v' && av[i][4] == 'n' && av[i][5] == 't' && av[i][6] == 'c' && '\0' == av[i][7])
3604 be_global->gen_svnt_cpp_files (false);
3606 else if (av[i][2] == 's' && av[i][3] == 'v' && av[i][4] == 'n' && av[i][5] == 't' && av[i][6] == 't' && '\0' == av[i][7])
3608 be_global->gen_svnt_t_files (false);
3610 else if (av[i][2] == 'o' && av[i][3] == 'r' && av[i][4] == 'b' && '\0' == av[i][5])
3612 be_global->gen_orb_h_include (false);
3614 else if (av[i][2] == 'f' && av[i][3] == 'r')
3616 // Suppress generation of valuetype factory registration
3617 // in CIAO servants.
3618 be_global->gen_ciao_valuefactory_reg (false);
3620 else if (av[i][2] == 't')
3622 // Suppress typecode generation
3623 // Anys must be suppressed as well.
3624 be_global->tc_support (false);
3625 be_global->any_support (false);
3627 else if (av[i][2] == 'p')
3629 // Suppress generating Thru_POA collocated stubs.
3630 be_global->gen_thru_poa_collocation (false);
3632 else if (av[i][2] == 'd')
3634 // sSppress generating Direct collocated stubs.
3635 be_global->gen_direct_collocation (false);
3637 else if (av[i][2] == 'c')
3639 if (av[i][3] == 'i')
3641 // No stub inline.
3642 be_global->gen_client_inline (false);
3644 else if (av[i][3] == 'c')
3646 // No stub
3647 be_global->gen_client_stub (false);
3649 else if (av[i][3] == 'h')
3651 // No stub
3652 be_global->gen_client_header (false);
3654 else if (av[i][3] == 'd' && av[i][4] == 'r')
3656 // No cdr support.
3657 be_global->cdr_support (false);
3659 else
3661 ACE_ERROR ((
3662 LM_ERROR,
3663 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3664 av[i]
3666 idl_global->parse_args_exit (1);
3669 else if (av[i][2] == 'm')
3671 // Turn off ccm preprocessing.
3672 idl_global->ignore_idl3 (true);
3674 else if (av[i][2] == 'S')
3676 if ('\0' == av[i][3])
3678 // Disable skeleton file generation.
3679 be_global->gen_skel_files (false);
3680 be_global->gen_server_skeleton (false);
3682 else
3684 ACE_ERROR ((
3685 LM_ERROR,
3686 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3687 av[i]
3689 idl_global->parse_args_exit (1);
3692 else if (av[i][2] == 's')
3694 if (av[i][3] == 'c')
3696 // No skeleton inline.
3697 be_global->gen_server_skeleton (false);
3699 else if (av[i][3] == 'h')
3701 // No skeleton inline.
3702 be_global->gen_server_header (false);
3704 else
3706 ACE_ERROR ((
3707 LM_ERROR,
3708 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3709 av[i]
3711 idl_global->parse_args_exit (1);
3714 else if (av[i][2] == 'e')
3716 // Disable custom file endings for included idl/pidl
3717 // files from TAO specific include paths.
3718 be_global->gen_custom_ending (false);
3720 else if (av[i][2] == 'g')
3722 // Disable generation of unique guards.
3723 be_global->gen_unique_guards (false);
3725 else
3727 ACE_ERROR ((
3728 LM_ERROR,
3729 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3730 av[i]
3732 idl_global->parse_args_exit (1);
3735 break;
3736 case 'T':
3737 if (av[i][2] == 'S')
3739 unsigned long ul = ACE_OS::strtoul (av[i + 1], nullptr, 10);
3740 be_global->tab_size (ul);
3741 ++i;
3743 else
3745 ACE_ERROR ((
3746 LM_ERROR,
3747 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3748 av[i]
3750 idl_global->parse_args_exit (1);
3753 break;
3754 default:
3755 ACE_ERROR ((
3756 LM_ERROR,
3757 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3758 av[i]
3761 idl_global->parse_args_exit (1);