Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / TAO_IDL / be / be_global.cpp
blobb72217adcc4abdacb5757e854d2650afffbb72aa
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 = 0;
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 (void)
41 : changing_standard_include_files_ (1),
42 skel_export_macro_ (0),
43 skel_export_include_ (0),
44 skel_export_file_ (0),
45 stub_export_macro_ (0),
46 stub_export_include_ (0),
47 stub_export_file_ (0),
48 anyop_export_macro_ (0),
49 anyop_export_include_ (0),
50 exec_export_macro_ (0),
51 exec_export_include_ (0),
52 svnt_export_macro_ (0),
53 svnt_export_include_ (0),
54 conn_export_macro_ (0),
55 conn_export_include_ (0),
56 pch_include_ (0),
57 pre_include_ (0),
58 post_include_ (0),
59 include_guard_ (0),
60 safe_include_ (0),
61 unique_include_ (0),
62 stripped_filename_ (0),
63 core_versioning_begin_ (core_versioned_ns_begin),
64 core_versioning_end_ (core_versioned_ns_end),
65 versioning_begin_ (),
66 versioning_end_ (),
67 versioning_include_ (),
68 client_hdr_ending_ (ACE::strnew ("C.h")),
69 client_stub_ending_ (ACE::strnew ("C.cpp")),
70 client_inline_ending_ (ACE::strnew ("C.inl")),
71 server_hdr_ending_ (ACE::strnew ("S.h")),
72 implementation_hdr_ending_ (ACE::strnew ("I.h")),
73 implementation_skel_ending_ (ACE::strnew ("I.cpp")),
74 impl_class_prefix_ (ACE::strnew ("")),
75 impl_class_suffix_ (ACE::strnew ("_i")),
76 server_template_hdr_ending_ (ACE::strnew ("S_T.h")),
77 server_skeleton_ending_ (ACE::strnew ("S.cpp")),
78 server_template_skeleton_ending_ (ACE::strnew ("S_T.cpp")),
79 anyop_hdr_ending_ (ACE::strnew ("A.h")),
80 anyop_src_ending_ (ACE::strnew ("A.cpp")),
81 ciao_svnt_hdr_template_ending_ (ACE::strnew ("_svnt_T.h")),
82 ciao_svnt_src_template_ending_ (ACE::strnew ("_svnt_T.cpp")),
83 ciao_svnt_hdr_ending_ (ACE::strnew ("_svnt.h")),
84 ciao_svnt_src_ending_ (ACE::strnew ("_svnt.cpp")),
85 ciao_exec_hdr_ending_ (ACE::strnew ("_exec.h")),
86 ciao_exec_src_ending_ (ACE::strnew ("_exec.cpp")),
87 ciao_exec_stub_hdr_ending_ (ACE::strnew ("EC.h")),
88 ciao_exec_idl_ending_ (ACE::strnew ("E.idl")),
89 ciao_conn_hdr_ending_ (ACE::strnew ("_conn.h")),
90 ciao_conn_src_ending_ (ACE::strnew ("_conn.cpp")),
91 dds_typesupport_hdr_ending_ (ACE::strnew ("Support.h")),
92 ciao_ami_conn_idl_ending_ (ACE::strnew ("A.idl")),
93 ciao_ami_conn_impl_hdr_ending_ (ACE::strnew ("_conn_i.h")),
94 ciao_ami_conn_impl_src_ending_ (ACE::strnew ("_conn_i.cpp")),
95 ciao_container_type_ (ACE::strnew ("Session")),
96 output_dir_ (0),
97 stub_include_dir_ (0),
98 skel_output_dir_ (0),
99 anyop_output_dir_ (0),
100 exec_output_dir_ (0),
101 any_support_ (true),
102 cdr_support_ (true),
103 tc_support_ (true),
104 obv_opt_accessor_ (0),
105 gen_impl_files_ (false),
106 gen_impl_debug_info_ (false),
107 gen_copy_ctor_ (false),
108 gen_assign_op_ (false),
109 gen_thru_poa_collocation_ (true), // Default is thru_poa.
110 gen_direct_collocation_ (false),
111 gen_corba_e_ (false),
112 gen_minimum_corba_ (false),
113 gen_lwccm_ (false),
114 gen_noeventccm_ (false),
115 opt_tc_ (false),
116 ami4ccm_call_back_ (false),
117 ami_call_back_ (false),
118 gen_amh_classes_ (false),
119 gen_tie_classes_ (false),
120 gen_smart_proxies_ (false),
121 gen_inline_constants_ (true),
122 gen_orb_h_include_ (true),
123 gen_empty_anyop_header_ (false),
124 lookup_strategy_ (TAO_PERFECT_HASH),
125 dds_impl_ (DDS_NONE),
126 void_type_ (0),
127 ccmobject_ (0),
128 messaging_ (0),
129 messaging_exceptionholder_ (0),
130 messaging_replyhandler_ (0),
131 gen_anyop_files_ (false),
132 gen_skel_files_ (true),
133 gen_svnt_cpp_files_ (true),
134 gen_svnt_t_files_ (true),
135 gen_client_inline_ (true),
136 gen_client_stub_ (true),
137 gen_client_header_ (true),
138 gen_server_skeleton_ (true),
139 gen_server_header_ (true),
140 gen_local_iface_anyops_ (true),
141 use_clonable_in_args_ (false),
142 gen_template_export_ (false),
143 gen_ostream_operators_ (false),
144 gen_static_desc_operations_ (false),
145 gen_custom_ending_ (true),
146 gen_unique_guards_ (true),
147 gen_ciao_svnt_ (false),
148 gen_ciao_exec_idl_ (false),
149 gen_ciao_exec_impl_ (false),
150 gen_ciao_exec_reactor_impl_ (false),
151 overwrite_not_exec_(false),
152 gen_ciao_conn_impl_ (false),
153 gen_dds_typesupport_idl_ (false),
154 gen_ciao_valuefactory_reg_ (true),
155 gen_stub_export_hdr_file_ (false),
156 gen_skel_export_hdr_file_ (false),
157 gen_svnt_export_hdr_file_ (false),
158 gen_exec_export_hdr_file_ (false),
159 gen_conn_export_hdr_file_ (false),
160 tab_size_ (2),
161 alt_mapping_ (false),
162 in_facet_servant_ (false),
163 gen_arg_traits_ (true),
164 gen_anytypecode_adapter_ (false),
165 no_fixed_err_ (false)
169 BE_GlobalData::~BE_GlobalData (void)
173 // To switch between changing or non-changing standard include files
174 // include files, so that #include statements can be
175 // generated with ""s or <>s respectively, for the standard include
176 // files (e.g. tao/corba.h)
177 void
178 BE_GlobalData::changing_standard_include_files (size_t changing)
180 this->changing_standard_include_files_ = changing;
183 size_t
184 BE_GlobalData::changing_standard_include_files (void)
186 return this->changing_standard_include_files_;
189 /************ Helper functions **************/
190 static const char*
191 be_change_idl_file_extension (UTL_String* idl_file,
192 const char *new_extension,
193 bool base_name_only = false,
194 bool for_anyop = false,
195 bool for_skel = false,
196 bool for_exec = false)
198 // @@ This shouldn't happen anyway; but a better error handling
199 // mechanism is needed.
200 if (idl_file == 0 || new_extension == 0)
202 return 0;
205 static char fname[MAXPATHLEN];
206 ACE_OS::memset (fname, 0, MAXPATHLEN);
208 // Get the char* from the UTL_String.
209 const char* string = idl_file->get_string ();
211 // Get the base part of the filename, we try several extensions
212 // before giving up.
213 const char *base = 0;
215 static const char* extensions[] = {
216 ".idl",
217 ".pidl",
218 ".IDL",
219 ".PIDL"
222 static int nextensions = sizeof(extensions)/sizeof(extensions[0]);
224 for (int k = 0; k < nextensions; ++k)
226 base = ACE_OS::strstr (string, extensions[k]);
228 if (base != 0)
230 break;
234 if (base == 0)
236 return 0;
239 // Anyop * skel file output defaults to general output dir if not set.
240 const char *output_path =
241 be_util::get_output_path (for_anyop, for_skel, for_exec);
243 if (!base_name_only && output_path != 0)
245 // Path info should also be added to fname.
247 // Add path and "/".
248 ACE_OS::sprintf (fname, "%s/", output_path);
250 // Append the base part to fname.
251 ACE_OS::strncpy (fname + ACE_OS::strlen (fname),
252 string,
253 base - string);
255 else
257 // Base_name_only or no putput_dir specified by user. JUST put the
258 // base part to fname.
259 ACE_OS::strncpy (fname, string, base - string);
262 // Turn '\' and '\\' into '/'.
263 char* i = fname;
265 for (char* j = fname; *j != 0; ++i, ++j)
267 if (*j == '\\')
269 *i = '/';
271 if (*(j + 1) == '\\')
273 ++j;
276 else
278 *i = *j;
282 *i = 0;
284 // Append the newextension.
285 ACE_OS::strcat (fname, new_extension);
286 return fname;
289 const char *
290 BE_GlobalData::be_get_client_hdr (UTL_String *idl_file_name,
291 bool base_name_only)
293 // User-defined file extensions don't apply to .pidl files.
294 ACE_CString fn (idl_file_name->get_string ());
295 ACE_CString fn_ext = fn.substr (fn.length () - 5);
296 bool orb_file = (fn_ext == ".pidl" || fn_ext == ".PIDL");
298 if (!orb_file && !be_global->gen_custom_ending ()
299 && FE_Utils::validate_orb_include (idl_file_name))
301 orb_file = true;
304 return be_change_idl_file_extension (idl_file_name,
305 orb_file
306 ? "C.h"
307 : be_global->client_hdr_ending (),
308 base_name_only);
311 const char *
312 BE_GlobalData::be_get_client_stub (UTL_String *idl_file_name)
314 return be_change_idl_file_extension (idl_file_name,
315 be_global->client_stub_ending ());
318 const char *
319 BE_GlobalData::be_get_client_inline (UTL_String *idl_file_name,
320 bool base_name_only)
322 return be_change_idl_file_extension (idl_file_name,
323 be_global->client_inline_ending (),
324 base_name_only);
327 const char *
328 BE_GlobalData::be_get_server_hdr (UTL_String *idl_file_name,
329 bool base_name_only)
331 // User-defined file extensions don't apply to .pidl files.
332 ACE_CString fn (idl_file_name->get_string ());
333 ACE_CString fn_ext = fn.substr (fn.length () - 5);
334 bool orb_file = (fn_ext == ".pidl" || fn_ext == ".PIDL");
336 if (!orb_file && !be_global->gen_custom_ending ()
337 && FE_Utils::validate_orb_include (idl_file_name))
339 orb_file = true;
342 return be_change_idl_file_extension (idl_file_name,
343 orb_file
344 ? "S.h"
345 : be_global->server_hdr_ending (),
346 base_name_only,
347 false,
348 true);
351 const char *
352 BE_GlobalData::be_get_svnt_template_hdr (UTL_String *idl_file_name,
353 bool base_name_only)
355 // User-defined file extensions don't apply to .pidl files.
356 ACE_CString fn (idl_file_name->get_string ());
357 ACE_CString fn_ext = fn.substr (fn.length () - 5);
358 bool orb_file = (fn_ext == ".pidl" || fn_ext == ".PIDL");
360 if (!orb_file && !be_global->gen_custom_ending ()
361 && FE_Utils::validate_orb_include (idl_file_name))
363 orb_file = true;
366 return be_change_idl_file_extension (idl_file_name,
367 orb_file
368 ? "S.h"
369 : be_global->ciao_svnt_header_template_ending (),
370 base_name_only,
371 false,
372 true);
375 const char *
376 BE_GlobalData::be_get_implementation_hdr (UTL_String *idl_file_name,
377 bool base_name_only)
379 return be_change_idl_file_extension (idl_file_name,
380 be_global->implementation_hdr_ending (),
381 base_name_only);
384 const char *
385 BE_GlobalData::be_get_implementation_skel (UTL_String *idl_file_name,
386 bool base_name_only)
388 return be_change_idl_file_extension (idl_file_name,
389 be_global->implementation_skel_ending (),
390 base_name_only);
393 const char *
394 BE_GlobalData::be_get_server_template_hdr (UTL_String *idl_file_name,
395 bool base_name_only)
397 return be_change_idl_file_extension (idl_file_name,
398 be_global->server_template_hdr_ending (),
399 base_name_only,
400 false,
401 true);
404 const char *
405 BE_GlobalData::be_get_server_skeleton (UTL_String *idl_file_name)
407 return be_change_idl_file_extension (idl_file_name,
408 be_global->server_skeleton_ending (),
409 false,
410 false,
411 true);
414 const char *
415 BE_GlobalData::be_get_server_template_skeleton (UTL_String *idl_file_name,
416 bool base_name_only)
418 return be_change_idl_file_extension (idl_file_name,
419 be_global->server_template_skeleton_ending (),
420 base_name_only,
421 false,
422 true);
425 const char *
426 BE_GlobalData::be_get_anyop_header (UTL_String *idl_file_name,
427 bool base_name_only)
429 return be_change_idl_file_extension (idl_file_name,
430 be_global->anyop_header_ending (),
431 base_name_only,
432 true);
435 const char *
436 BE_GlobalData::be_get_anyop_source (UTL_String *idl_file_name,
437 bool base_name_only)
439 return be_change_idl_file_extension (idl_file_name,
440 be_global->anyop_source_ending (),
441 base_name_only,
442 true);
445 const char *
446 BE_GlobalData::be_get_ciao_svnt_header (UTL_String *idl_file_name,
447 bool base_name_only)
449 return be_change_idl_file_extension (idl_file_name,
450 be_global->ciao_svnt_header_ending (),
451 base_name_only);
454 const char *
455 BE_GlobalData::be_get_ciao_svnt_template_header (UTL_String *idl_file_name,
456 bool base_name_only)
458 return be_change_idl_file_extension (idl_file_name,
459 be_global->ciao_svnt_header_template_ending (),
460 base_name_only);
464 const char *
465 BE_GlobalData::be_get_ciao_svnt_source (UTL_String *idl_file_name,
466 bool base_name_only)
468 return be_change_idl_file_extension (idl_file_name,
469 be_global->ciao_svnt_source_ending (),
470 base_name_only);
473 const char *
474 BE_GlobalData::be_get_ciao_svnt_template_source (UTL_String *idl_file_name,
475 bool base_name_only)
477 return be_change_idl_file_extension (idl_file_name,
478 be_global->ciao_svnt_source_template_ending (),
479 base_name_only);
482 const char *
483 BE_GlobalData::be_get_ciao_exec_header (UTL_String *idl_file_name,
484 bool base_name_only)
486 return be_change_idl_file_extension (idl_file_name,
487 be_global->ciao_exec_header_ending (),
488 base_name_only,
489 false,
490 false,
491 true);
494 const char *
495 BE_GlobalData::be_get_ciao_exec_source (UTL_String *idl_file_name,
496 bool base_name_only)
498 return be_change_idl_file_extension (idl_file_name,
499 be_global->ciao_exec_source_ending (),
500 base_name_only,
501 false,
502 false,
503 true);
506 const char *
507 BE_GlobalData::be_get_ciao_exec_stub_header (
508 UTL_String *idl_file_name,
509 bool base_name_only)
511 return
512 be_change_idl_file_extension (
513 idl_file_name,
514 be_global->ciao_exec_stub_header_ending (),
515 base_name_only);
518 const char *
519 BE_GlobalData::be_get_ciao_exec_idl (
520 UTL_String *idl_file_name,
521 bool base_name_only)
523 return
524 be_change_idl_file_extension (
525 idl_file_name,
526 be_global->ciao_exec_idl_ending (),
527 base_name_only);
530 const char *
531 BE_GlobalData::be_get_ciao_conn_header (UTL_String *idl_file_name,
532 bool base_name_only)
534 return be_change_idl_file_extension (idl_file_name,
535 be_global->ciao_conn_header_ending (),
536 base_name_only);
539 const char *
540 BE_GlobalData::be_get_ciao_conn_source (UTL_String *idl_file_name,
541 bool base_name_only)
543 return be_change_idl_file_extension (idl_file_name,
544 be_global->ciao_conn_source_ending (),
545 base_name_only);
548 const char *
549 BE_GlobalData::be_get_dds_typesupport_header (
550 UTL_String *idl_file_name,
551 bool base_name_only)
553 return
554 be_change_idl_file_extension (
555 idl_file_name,
556 be_global->dds_typesupport_hdr_ending (),
557 base_name_only);
560 const char *
561 BE_GlobalData::be_get_ciao_ami_conn_idl (
562 UTL_String *idl_file_name,
563 bool base_name_only)
565 return
566 be_change_idl_file_extension (
567 idl_file_name,
568 be_global->ciao_ami_conn_idl_ending (),
569 base_name_only);
572 const char *
573 BE_GlobalData::be_get_ciao_ami_conn_impl_hdr (
574 UTL_String *idl_file_name,
575 bool base_name_only)
577 return
578 be_change_idl_file_extension (
579 idl_file_name,
580 be_global->ciao_ami_conn_impl_hdr_ending (),
581 base_name_only);
584 const char *
585 BE_GlobalData::be_get_ciao_ami_conn_impl_src (
586 UTL_String *idl_file_name,
587 bool base_name_only)
589 return
590 be_change_idl_file_extension (
591 idl_file_name,
592 be_global->ciao_ami_conn_impl_src_ending (),
593 base_name_only);
596 const char *
597 BE_GlobalData::be_get_client_hdr_fname (
598 bool base_name_only)
600 return
601 be_get_client_hdr (idl_global->stripped_filename (),
602 base_name_only);
605 const char *
606 BE_GlobalData::be_get_client_stub_fname (void)
608 return
609 be_get_client_stub (idl_global->stripped_filename ());
612 const char *
613 BE_GlobalData::be_get_client_inline_fname (
614 bool base_name_only)
616 return
617 be_get_client_inline (idl_global->stripped_filename (),
618 base_name_only);
621 const char *
622 BE_GlobalData::be_get_server_hdr_fname (
623 bool base_name_only)
625 return
626 be_get_server_hdr (idl_global->stripped_filename (),
627 base_name_only);
630 const char *
631 BE_GlobalData::be_get_implementation_hdr_fname (
632 bool base_name_only)
634 return
635 be_get_implementation_hdr (idl_global->stripped_filename (),
636 base_name_only);
639 const char *
640 BE_GlobalData::be_get_implementation_skel_fname (
641 bool base_name_only)
643 return
644 be_get_implementation_skel (idl_global->stripped_filename (),
645 base_name_only);
648 const char *
649 BE_GlobalData::be_get_server_template_hdr_fname (
650 bool base_name_only)
652 return
653 be_get_server_template_hdr (idl_global->stripped_filename (),
654 base_name_only);
657 const char *
658 BE_GlobalData::be_get_server_skeleton_fname (void)
660 return
661 be_get_server_skeleton (idl_global->stripped_filename ());
664 const char *
665 BE_GlobalData::be_get_implementation_skeleton_fname (void)
667 return
668 be_get_implementation_skel (idl_global->stripped_filename ());
671 const char *
672 BE_GlobalData::be_get_server_template_skeleton_fname (
673 bool base_name_only)
675 return
676 be_get_server_template_skeleton (idl_global->stripped_filename (),
677 base_name_only);
680 const char *
681 BE_GlobalData::be_get_anyop_source_fname (
682 bool base_name_only)
684 return
685 be_get_anyop_source (idl_global->stripped_filename (),
686 base_name_only);
689 const char *
690 BE_GlobalData::be_get_anyop_header_fname (
691 bool base_name_only)
693 return
694 be_get_anyop_header (idl_global->stripped_filename (),
695 base_name_only);
698 const char *
699 BE_GlobalData::be_get_ciao_svnt_hdr_fname (bool base_name_only)
701 return
702 be_get_ciao_svnt_header (idl_global->stripped_filename (),
703 base_name_only);
706 const char *
707 BE_GlobalData::be_get_ciao_tmpl_svnt_hdr_fname (bool base_name_only)
709 return
710 be_get_ciao_svnt_template_header (idl_global->stripped_filename (),
711 base_name_only);
714 const char *
715 BE_GlobalData::be_get_ciao_svnt_src_fname (
716 bool base_name_only)
718 return
719 be_get_ciao_svnt_source (idl_global->stripped_filename (),
720 base_name_only);
723 const char *
724 BE_GlobalData::be_get_ciao_tmpl_svnt_src_fname (
725 bool base_name_only)
727 return
728 be_get_ciao_svnt_template_source (idl_global->stripped_filename (),
729 base_name_only);
732 const char *
733 BE_GlobalData::be_get_ciao_exec_hdr_fname (
734 bool base_name_only)
736 return
737 be_get_ciao_exec_header (idl_global->stripped_filename (),
738 base_name_only);
741 const char *
742 BE_GlobalData::be_get_ciao_exec_src_fname (
743 bool base_name_only)
745 return
746 be_get_ciao_exec_source (idl_global->stripped_filename (),
747 base_name_only);
750 const char *
751 BE_GlobalData::be_get_ciao_exec_stub_hdr_fname (
752 bool base_name_only)
754 return
755 be_get_ciao_exec_stub_header (
756 idl_global->stripped_filename (),
757 base_name_only);
760 const char *
761 BE_GlobalData::be_get_ciao_exec_idl_fname (
762 bool base_name_only)
764 return
765 be_get_ciao_exec_idl (
766 idl_global->stripped_filename (),
767 base_name_only);
770 const char *
771 BE_GlobalData::be_get_ciao_conn_hdr_fname (
772 bool base_name_only)
774 return
775 be_get_ciao_conn_header (idl_global->stripped_filename (),
776 base_name_only);
779 const char *
780 BE_GlobalData::be_get_ciao_conn_src_fname (
781 bool base_name_only)
783 return
784 be_get_ciao_conn_source (idl_global->stripped_filename (),
785 base_name_only);
788 const char *
789 BE_GlobalData::be_get_ciao_ami_conn_idl_fname (
790 bool base_name_only)
792 return
793 be_get_ciao_ami_conn_idl (idl_global->stripped_filename (),
794 base_name_only);
797 const char *
798 BE_GlobalData::be_get_ciao_ami_conn_impl_hdr_fname (
799 bool base_name_only)
801 return
802 be_get_ciao_ami_conn_impl_hdr (idl_global->stripped_filename (),
803 base_name_only);
806 const char *
807 BE_GlobalData::be_get_ciao_ami_conn_impl_src_fname (
808 bool base_name_only)
810 return
811 be_get_ciao_ami_conn_impl_src (idl_global->stripped_filename (),
812 base_name_only);
815 const char*
816 BE_GlobalData::skel_export_macro (void) const
818 if (this->skel_export_macro_ == 0)
820 return "";
823 return this->skel_export_macro_;
826 void
827 BE_GlobalData::skel_export_macro (const char *s)
829 ACE::strdelete (this->skel_export_macro_);
830 this->skel_export_macro_ = ACE::strnew (s);
833 const char*
834 BE_GlobalData::skel_export_include (void) const
836 return this->skel_export_include_;
839 void
840 BE_GlobalData::skel_export_include (const char *s)
842 ACE::strdelete (this->skel_export_include_);
843 this->skel_export_include_ = ACE::strnew (s);
846 const char*
847 BE_GlobalData::skel_export_file (void) const
849 return this->skel_export_file_;
852 void
853 BE_GlobalData::skel_export_file (const char *s)
855 ACE::strdelete (this->skel_export_file_);
856 this->skel_export_file_ = ACE::strnew (s);
859 const char*
860 BE_GlobalData::stub_export_macro (void) const
862 if (this->stub_export_macro_ == 0)
864 return "";
867 return this->stub_export_macro_;
870 void
871 BE_GlobalData::stub_export_macro (const char *s)
873 ACE::strdelete (this->stub_export_macro_);
874 this->stub_export_macro_ = ACE::strnew (s);
877 const char*
878 BE_GlobalData::stub_export_include (void) const
880 return this->stub_export_include_;
883 void
884 BE_GlobalData::stub_export_include (const char *s)
886 ACE::strdelete (this->stub_export_include_);
887 this->stub_export_include_ = ACE::strnew (s);
890 const char*
891 BE_GlobalData::stub_export_file (void) const
893 return this->stub_export_file_;
896 void
897 BE_GlobalData::stub_export_file (const char *s)
899 ACE::strdelete (this->stub_export_file_);
900 this->stub_export_file_ = ACE::strnew (s);
903 const char*
904 BE_GlobalData::anyop_export_macro (void) const
906 if (this->anyop_export_macro_ == 0)
908 return "";
911 return this->anyop_export_macro_;
914 void
915 BE_GlobalData::anyop_export_macro (const char *s)
917 ACE::strdelete (this->anyop_export_macro_);
918 this->anyop_export_macro_ = ACE::strnew (s);
921 const char*
922 BE_GlobalData::anyop_export_include (void) const
924 return this->anyop_export_include_;
927 void
928 BE_GlobalData::anyop_export_include (const char *s)
930 ACE::strdelete (this->anyop_export_include_);
931 this->anyop_export_include_ = ACE::strnew (s);
934 const char*
935 BE_GlobalData::exec_export_macro (void) const
937 if (this->exec_export_macro_ == 0)
939 return "";
942 return this->exec_export_macro_;
945 void
946 BE_GlobalData::exec_export_macro (const char *s)
948 ACE::strdelete (this->exec_export_macro_);
949 this->exec_export_macro_ = ACE::strnew (s);
952 const char*
953 BE_GlobalData::exec_export_include (void) const
955 return this->exec_export_include_;
958 void
959 BE_GlobalData::exec_export_include (const char *s)
961 ACE::strdelete (this->exec_export_include_);
962 this->exec_export_include_ = ACE::strnew (s);
965 const char*
966 BE_GlobalData::svnt_export_macro (void) const
968 if (this->svnt_export_macro_ == 0)
970 return "";
973 return this->svnt_export_macro_;
976 void
977 BE_GlobalData::svnt_export_macro (const char *s)
979 ACE::strdelete (this->svnt_export_macro_);
980 this->svnt_export_macro_ = ACE::strnew (s);
983 const char*
984 BE_GlobalData::svnt_export_include (void) const
986 return this->svnt_export_include_;
989 void
990 BE_GlobalData::svnt_export_include (const char *s)
992 ACE::strdelete (this->svnt_export_include_);
993 this->svnt_export_include_ = ACE::strnew (s);
996 const char*
997 BE_GlobalData::conn_export_macro (void) const
999 if (this->conn_export_macro_ == 0)
1001 return "";
1004 return this->conn_export_macro_;
1007 void
1008 BE_GlobalData::conn_export_macro (const char *s)
1010 ACE::strdelete (this->conn_export_macro_);
1011 this->conn_export_macro_ = ACE::strnew (s);
1014 const char*
1015 BE_GlobalData::conn_export_include (void) const
1017 return this->conn_export_include_;
1020 void
1021 BE_GlobalData::conn_export_include (const char *s)
1023 ACE::strdelete (this->conn_export_include_);
1024 this->conn_export_include_ = ACE::strnew (s);
1027 const char*
1028 BE_GlobalData::pch_include (void) const
1030 return this->pch_include_;
1033 void
1034 BE_GlobalData::pch_include (const char *s)
1036 ACE::strdelete (this->pch_include_);
1037 this->pch_include_ = ACE::strnew (s);
1040 const char*
1041 BE_GlobalData::pre_include (void) const
1043 return this->pre_include_;
1046 void
1047 BE_GlobalData::pre_include (const char *s)
1049 ACE::strdelete (this->pre_include_);
1050 this->pre_include_ = ACE::strnew (s);
1053 const char*
1054 BE_GlobalData::post_include (void) const
1056 return this->post_include_;
1059 void
1060 BE_GlobalData::post_include (const char *s)
1062 ACE::strdelete (this->post_include_);
1063 this->post_include_ = ACE::strnew (s);
1066 const char*
1067 BE_GlobalData::include_guard (void) const
1069 return this->include_guard_;
1072 void
1073 BE_GlobalData::include_guard (const char *s)
1075 ACE::strdelete (this->include_guard_);
1076 this->include_guard_ = ACE::strnew (s);
1079 const char*
1080 BE_GlobalData::safe_include (void) const
1082 return this->safe_include_;
1085 void
1086 BE_GlobalData::safe_include (const char *s)
1088 ACE::strdelete (this->safe_include_);
1089 this->safe_include_ = ACE::strnew (s);
1092 const char*
1093 BE_GlobalData::unique_include (void) const
1095 return this->unique_include_;
1098 void
1099 BE_GlobalData::unique_include (const char *s)
1101 ACE::strdelete (this->unique_include_);
1102 this->unique_include_ = ACE::strnew (s);
1105 const char*
1106 BE_GlobalData::stripped_filename (void) const
1108 return this->stripped_filename_;
1111 void
1112 BE_GlobalData::stripped_filename (const char *s)
1114 ACE::strdelete (this->stripped_filename_);
1115 this->stripped_filename_ = ACE::strnew (s);
1118 const char *
1119 BE_GlobalData::versioning_begin (void) const
1121 return this->versioning_begin_.c_str ();
1124 void
1125 BE_GlobalData::versioning_include (const char * s)
1127 this->versioning_include_ = s;
1130 const char *
1131 BE_GlobalData::versioning_include (void) const
1133 return this->versioning_include_.c_str ();
1136 const char *
1137 BE_GlobalData::core_versioning_begin (void) const
1139 return this->core_versioning_begin_.c_str ();
1142 void
1143 BE_GlobalData::versioning_end (const char * s)
1145 this->versioning_end_ =
1146 ACE_CString ("\n\n")
1147 + ACE_CString (s)
1148 + ACE_CString ("\n\n");
1150 this->core_versioning_begin_ =
1151 this->versioning_end_ + // Yes, "end".
1152 core_versioned_ns_begin;
1155 void
1156 BE_GlobalData::versioning_begin (const char * s)
1158 this->versioning_begin_ =
1159 ACE_CString ("\n\n")
1160 + ACE_CString (s)
1161 + ACE_CString ("\n\n");
1163 this->core_versioning_end_ =
1164 core_versioned_ns_end
1165 + this->versioning_begin_; // Yes, "begin".
1167 // Yes, "begin".
1170 const char *
1171 BE_GlobalData::versioning_end (void) const
1173 return this->versioning_end_.c_str ();
1176 const char *
1177 BE_GlobalData::core_versioning_end (void) const
1179 return this->core_versioning_end_.c_str ();
1182 // Set the client_hdr_ending.
1183 void
1184 BE_GlobalData::client_hdr_ending (const char* s)
1186 ACE::strdelete (client_hdr_ending_);
1187 this->client_hdr_ending_ = ACE::strnew (s);
1190 // Get the client_hdr_ending.
1191 const char*
1192 BE_GlobalData::client_hdr_ending (void) const
1194 return this->client_hdr_ending_;
1197 void
1198 BE_GlobalData::client_inline_ending (const char* s)
1200 ACE::strdelete (client_inline_ending_);
1201 this->client_inline_ending_ = ACE::strnew (s);
1204 const char*
1205 BE_GlobalData::client_inline_ending (void) const
1207 return this->client_inline_ending_;
1210 // Set the client_stub_ending.
1211 void
1212 BE_GlobalData::client_stub_ending (const char* s)
1214 ACE::strdelete (this->client_stub_ending_);
1215 this->client_stub_ending_ = ACE::strnew (s);
1218 const char*
1219 BE_GlobalData::client_stub_ending (void) const
1221 return this->client_stub_ending_;
1224 void
1225 BE_GlobalData::server_hdr_ending (const char* s)
1227 ACE::strdelete (this->server_hdr_ending_);
1228 this->server_hdr_ending_ = ACE::strnew (s);
1231 const char*
1232 BE_GlobalData::server_hdr_ending (void) const
1234 return this->server_hdr_ending_;
1237 void
1238 BE_GlobalData::implementation_hdr_ending (const char* s)
1240 ACE::strdelete (this->implementation_hdr_ending_);
1241 this->implementation_hdr_ending_ = ACE::strnew (s);
1244 void
1245 BE_GlobalData::implementation_skel_ending (const char* s)
1247 ACE::strdelete (this->implementation_skel_ending_);
1248 this->implementation_skel_ending_ = ACE::strnew (s);
1251 void
1252 BE_GlobalData::impl_class_prefix (const char* s)
1254 ACE::strdelete (this->impl_class_prefix_);
1255 this->impl_class_prefix_ = ACE::strnew (s);
1258 void
1259 BE_GlobalData::impl_class_suffix (const char* s)
1261 ACE::strdelete (this->impl_class_suffix_);
1262 this->impl_class_suffix_ = ACE::strnew (s);
1265 const char*
1266 BE_GlobalData::impl_class_prefix (void) const
1268 return this->impl_class_prefix_;
1271 const char*
1272 BE_GlobalData::implementation_hdr_ending (void) const
1274 return this->implementation_hdr_ending_;
1277 const char*
1278 BE_GlobalData::impl_class_suffix (void) const
1280 return this->impl_class_suffix_;
1283 const char*
1284 BE_GlobalData::implementation_skel_ending (void) const
1286 return this->implementation_skel_ending_;
1289 void
1290 BE_GlobalData::server_template_hdr_ending (const char* s)
1292 ACE::strdelete (this->server_template_hdr_ending_);
1293 this->server_template_hdr_ending_ = ACE::strnew (s);
1296 const char*
1297 BE_GlobalData::server_template_hdr_ending (void) const
1299 return this->server_template_hdr_ending_;
1302 void
1303 BE_GlobalData::server_skeleton_ending (const char* s)
1305 ACE::strdelete (this->server_skeleton_ending_);
1306 this->server_skeleton_ending_ = ACE::strnew (s);
1309 const char*
1310 BE_GlobalData::server_skeleton_ending (void) const
1312 return this->server_skeleton_ending_;
1315 void
1316 BE_GlobalData::server_template_skeleton_ending (const char* s)
1318 ACE::strdelete (this->server_template_skeleton_ending_);
1319 this->server_template_skeleton_ending_ = ACE::strnew (s);
1322 const char*
1323 BE_GlobalData::server_template_skeleton_ending (void) const
1325 return this->server_template_skeleton_ending_;
1328 void
1329 BE_GlobalData::anyop_header_ending (const char* s)
1331 ACE::strdelete (this->anyop_hdr_ending_);
1332 this->anyop_hdr_ending_ = ACE::strnew (s);
1335 void
1336 BE_GlobalData::use_clonable_in_args (bool clonable)
1338 this->use_clonable_in_args_ = clonable;
1341 bool
1342 BE_GlobalData::use_clonable_in_args (void) const
1344 return this->use_clonable_in_args_;
1347 bool
1348 BE_GlobalData::gen_template_export (void) const
1350 return this->gen_template_export_;
1353 void
1354 BE_GlobalData::gen_template_export (bool val)
1356 this->gen_template_export_ = val;
1359 bool
1360 BE_GlobalData::gen_ostream_operators (void) const
1362 return this->gen_ostream_operators_;
1365 void
1366 BE_GlobalData::gen_ostream_operators (bool val)
1368 this->gen_ostream_operators_ = val;
1372 bool
1373 BE_GlobalData::gen_static_desc_operations (void) const
1375 return this->gen_static_desc_operations_;
1378 void
1379 BE_GlobalData::gen_static_desc_operations (bool val)
1381 this->gen_static_desc_operations_ = val;
1384 const char*
1385 BE_GlobalData::anyop_header_ending (void) const
1387 return this->anyop_hdr_ending_;
1390 void
1391 BE_GlobalData::anyop_source_ending (const char* s)
1393 ACE::strdelete (this->anyop_src_ending_);
1394 this->anyop_src_ending_ = ACE::strnew (s);
1397 const char*
1398 BE_GlobalData::anyop_source_ending (void) const
1400 return this->anyop_src_ending_;
1403 void
1404 BE_GlobalData::ciao_svnt_header_ending (const char* s)
1406 ACE::strdelete (this->ciao_svnt_hdr_ending_);
1407 this->ciao_svnt_hdr_ending_ = ACE::strnew (s);
1410 const char*
1411 BE_GlobalData::ciao_svnt_header_ending (void) const
1413 return this->ciao_svnt_hdr_ending_;
1416 void
1417 BE_GlobalData::ciao_svnt_source_ending (const char* s)
1419 ACE::strdelete (this->ciao_svnt_src_ending_);
1420 this->ciao_svnt_src_ending_ = ACE::strnew (s);
1423 const char*
1424 BE_GlobalData::ciao_svnt_source_ending (void) const
1426 return this->ciao_svnt_src_ending_;
1429 void
1430 BE_GlobalData::ciao_svnt_header_template_ending (const char* s)
1432 ACE::strdelete (this->ciao_svnt_hdr_template_ending_);
1433 this->ciao_svnt_hdr_template_ending_ = ACE::strnew (s);
1436 const char*
1437 BE_GlobalData::ciao_svnt_header_template_ending (void) const
1439 return this->ciao_svnt_hdr_template_ending_;
1442 void
1443 BE_GlobalData::ciao_svnt_source_template_ending (const char* s)
1445 ACE::strdelete (this->ciao_svnt_src_template_ending_);
1446 this->ciao_svnt_src_template_ending_ = ACE::strnew (s);
1449 const char*
1450 BE_GlobalData::ciao_svnt_source_template_ending (void) const
1452 return this->ciao_svnt_src_template_ending_;
1455 void
1456 BE_GlobalData::ciao_exec_header_ending (const char* s)
1458 ACE::strdelete (this->ciao_exec_hdr_ending_);
1459 this->ciao_exec_hdr_ending_ = ACE::strnew (s);
1462 const char*
1463 BE_GlobalData::ciao_exec_header_ending (void) const
1465 return this->ciao_exec_hdr_ending_;
1468 void
1469 BE_GlobalData::ciao_exec_source_ending (const char* s)
1471 ACE::strdelete (this->ciao_exec_src_ending_);
1472 this->ciao_exec_src_ending_ = ACE::strnew (s);
1475 const char*
1476 BE_GlobalData::ciao_exec_source_ending (void) const
1478 return this->ciao_exec_src_ending_;
1481 void
1482 BE_GlobalData::ciao_exec_stub_header_ending (const char* s)
1484 ACE::strdelete (this->ciao_exec_stub_hdr_ending_);
1485 this->ciao_exec_stub_hdr_ending_ = ACE::strnew (s);
1488 const char*
1489 BE_GlobalData::ciao_exec_stub_header_ending (void) const
1491 return this->ciao_exec_stub_hdr_ending_;
1494 void
1495 BE_GlobalData::ciao_exec_idl_ending (const char* s)
1497 ACE::strdelete (this->ciao_exec_idl_ending_);
1498 this->ciao_exec_idl_ending_ = ACE::strnew (s);
1501 const char*
1502 BE_GlobalData::ciao_exec_idl_ending (void) const
1504 return this->ciao_exec_idl_ending_;
1507 void
1508 BE_GlobalData::ciao_conn_header_ending (const char* s)
1510 ACE::strdelete (this->ciao_conn_hdr_ending_);
1511 this->ciao_conn_hdr_ending_ = ACE::strnew (s);
1514 const char*
1515 BE_GlobalData::ciao_conn_header_ending (void) const
1517 return this->ciao_conn_hdr_ending_;
1520 void
1521 BE_GlobalData::ciao_conn_source_ending (const char* s)
1523 ACE::strdelete (this->ciao_conn_src_ending_);
1524 this->ciao_conn_src_ending_ = ACE::strnew (s);
1527 const char*
1528 BE_GlobalData::ciao_conn_source_ending (void) const
1530 return this->ciao_conn_src_ending_;
1533 void
1534 BE_GlobalData::dds_typesupport_hdr_ending (const char* s)
1536 ACE::strdelete (this->dds_typesupport_hdr_ending_);
1537 this->dds_typesupport_hdr_ending_ = ACE::strnew (s);
1540 const char*
1541 BE_GlobalData::dds_typesupport_hdr_ending (void) const
1543 return this->dds_typesupport_hdr_ending_;
1546 void
1547 BE_GlobalData::ciao_ami_conn_idl_ending (const char* s)
1549 ACE::strdelete (this->ciao_ami_conn_idl_ending_);
1550 this->ciao_ami_conn_idl_ending_ = ACE::strnew (s);
1553 const char *
1554 BE_GlobalData::ciao_ami_conn_idl_ending (void) const
1556 return this->ciao_ami_conn_idl_ending_;
1559 void
1560 BE_GlobalData::ciao_ami_conn_impl_hdr_ending (const char* s)
1562 ACE::strdelete (this->ciao_ami_conn_impl_hdr_ending_);
1563 this->ciao_ami_conn_impl_hdr_ending_ = ACE::strnew (s);
1566 const char *
1567 BE_GlobalData::ciao_ami_conn_impl_hdr_ending (void) const
1569 return this->ciao_ami_conn_impl_hdr_ending_;
1572 void
1573 BE_GlobalData::ciao_ami_conn_impl_src_ending (const char* s)
1575 ACE::strdelete (this->ciao_ami_conn_impl_src_ending_);
1576 this->ciao_ami_conn_impl_src_ending_ = ACE::strnew (s);
1579 const char *
1580 BE_GlobalData::ciao_ami_conn_impl_src_ending (void) const
1582 return this->ciao_ami_conn_impl_src_ending_;
1585 void
1586 BE_GlobalData::ciao_container_type (const char* s)
1588 ACE::strdelete (this->ciao_container_type_);
1589 this->ciao_container_type_ = ACE::strnew (s);
1592 const char *
1593 BE_GlobalData::ciao_container_type (void) const
1595 return this->ciao_container_type_;
1598 void
1599 BE_GlobalData::output_dir (const char* s)
1601 ACE::strdelete (this->output_dir_);
1602 this->output_dir_ = ACE::strnew (s);
1605 const char*
1606 BE_GlobalData::output_dir (void) const
1608 return this->output_dir_;
1610 bool
1611 BE_GlobalData::overwrite_not_exec (void) const
1613 return this->overwrite_not_exec_;
1616 void
1617 BE_GlobalData::overwrite_not_exec (bool val)
1619 this->overwrite_not_exec_ = val;
1622 void
1623 BE_GlobalData::skel_output_dir (const char* s)
1625 ACE::strdelete (this->skel_output_dir_);
1626 this->skel_output_dir_ = ACE::strnew (s);
1629 const char*
1630 BE_GlobalData::skel_output_dir (void) const
1632 return this->skel_output_dir_;
1635 void
1636 BE_GlobalData::stub_include_dir (const char* s)
1638 ACE::strdelete (this->stub_include_dir_);
1639 this->stub_include_dir_ = ACE::strnew (s);
1642 const char*
1643 BE_GlobalData::stub_include_dir (void) const
1645 return this->stub_include_dir_;
1648 void
1649 BE_GlobalData::anyop_output_dir (const char* s)
1651 ACE::strdelete (this->anyop_output_dir_);
1652 this->anyop_output_dir_ = ACE::strnew (s);
1655 const char*
1656 BE_GlobalData::anyop_output_dir (void) const
1658 return this->anyop_output_dir_;
1661 void
1662 BE_GlobalData::exec_output_dir (const char* s)
1664 ACE::strdelete (this->exec_output_dir_);
1665 this->exec_output_dir_ = ACE::strnew (s);
1668 const char*
1669 BE_GlobalData::exec_output_dir (void) const
1671 return this->exec_output_dir_;
1673 void
1674 BE_GlobalData::any_support (bool val)
1676 this->any_support_ = val;
1679 bool
1680 BE_GlobalData::any_support (void) const
1682 return this->any_support_;
1685 void
1686 BE_GlobalData::cdr_support (bool val)
1688 this->cdr_support_ = val;
1691 bool
1692 BE_GlobalData::cdr_support (void) const
1694 return this->cdr_support_;
1697 void
1698 BE_GlobalData::tc_support (bool val)
1700 this->tc_support_ = val;
1703 bool
1704 BE_GlobalData::tc_support (void) const
1706 return this->tc_support_;
1709 void
1710 BE_GlobalData::obv_opt_accessor (bool val)
1712 this->obv_opt_accessor_ = val;
1715 bool
1716 BE_GlobalData::obv_opt_accessor (void) const
1718 return this->obv_opt_accessor_;
1721 void
1722 BE_GlobalData::gen_impl_files (bool val)
1724 this->gen_impl_files_ = val;
1727 bool
1728 BE_GlobalData::gen_impl_files (void) const
1730 return this->gen_impl_files_;
1733 void
1734 BE_GlobalData::gen_impl_debug_info (bool val)
1736 this->gen_impl_debug_info_ = val;
1739 bool
1740 BE_GlobalData::gen_impl_debug_info (void) const
1742 return this->gen_impl_debug_info_;
1745 void
1746 BE_GlobalData::gen_copy_ctor (bool val)
1748 this->gen_copy_ctor_ = val;
1751 bool
1752 BE_GlobalData::gen_copy_ctor (void) const
1754 return this->gen_copy_ctor_;
1757 void
1758 BE_GlobalData::gen_assign_op (bool val)
1760 this->gen_assign_op_ = val;
1763 bool
1764 BE_GlobalData::gen_assign_op (void) const
1766 return this->gen_assign_op_;
1769 void
1770 BE_GlobalData::gen_thru_poa_collocation (bool val)
1772 this->gen_thru_poa_collocation_ = val;
1775 bool
1776 BE_GlobalData::gen_thru_poa_collocation (void) const
1778 return this->gen_thru_poa_collocation_;
1781 void
1782 BE_GlobalData::gen_direct_collocation (bool val)
1784 this->gen_direct_collocation_ = val;
1787 bool
1788 BE_GlobalData::gen_direct_collocation (void) const
1790 return this->gen_direct_collocation_;
1793 void
1794 BE_GlobalData::gen_corba_e (bool val)
1796 this->gen_corba_e_ = val;
1799 bool
1800 BE_GlobalData::gen_corba_e (void) const
1802 return this->gen_corba_e_;
1805 void
1806 BE_GlobalData::gen_minimum_corba (bool val)
1808 this->gen_minimum_corba_ = val;
1811 bool
1812 BE_GlobalData::gen_minimum_corba (void) const
1814 return this->gen_minimum_corba_;
1817 void
1818 BE_GlobalData::gen_noeventccm (bool val)
1820 this->gen_noeventccm_ = val;
1823 bool
1824 BE_GlobalData::gen_noeventccm (void) const
1826 return this->gen_noeventccm_;
1829 void
1830 BE_GlobalData::gen_lwccm (bool val)
1832 this->gen_lwccm_ = val;
1835 bool
1836 BE_GlobalData::gen_lwccm (void) const
1838 return this->gen_lwccm_;
1842 void
1843 BE_GlobalData::opt_tc (bool val)
1845 this->opt_tc_ = val;
1848 bool
1849 BE_GlobalData::opt_tc (void) const
1851 return this->opt_tc_;
1854 void
1855 BE_GlobalData::ami4ccm_call_back (bool val)
1857 this->ami4ccm_call_back_ = val;
1860 bool
1861 BE_GlobalData::ami4ccm_call_back (void) const
1863 return this->ami4ccm_call_back_;
1866 void
1867 BE_GlobalData::ami_call_back (bool val)
1869 this->ami_call_back_ = val;
1872 bool
1873 BE_GlobalData::ami_call_back (void) const
1875 return this->ami_call_back_;
1878 void
1879 BE_GlobalData::gen_amh_classes (bool val)
1881 this->gen_amh_classes_ = val;
1884 bool
1885 BE_GlobalData::gen_amh_classes (void) const
1887 return this->gen_amh_classes_;
1890 void
1891 BE_GlobalData::gen_tie_classes (bool val)
1893 this->gen_tie_classes_ = val;
1896 bool
1897 BE_GlobalData::gen_tie_classes (void) const
1899 return this->gen_tie_classes_;
1902 void
1903 BE_GlobalData::gen_smart_proxies (bool val)
1905 this->gen_smart_proxies_ = val;
1908 bool
1909 BE_GlobalData::gen_smart_proxies (void) const
1911 return this->gen_smart_proxies_;
1914 void
1915 BE_GlobalData::gen_inline_constants (bool val)
1917 this->gen_inline_constants_ = val;
1920 bool
1921 BE_GlobalData::gen_inline_constants (void) const
1923 return this->gen_inline_constants_;
1926 void
1927 BE_GlobalData::gen_orb_h_include (bool val)
1929 this->gen_orb_h_include_ = val;
1932 bool
1933 BE_GlobalData::gen_orb_h_include (void) const
1935 return this->gen_orb_h_include_;
1938 void
1939 BE_GlobalData::gen_empty_anyop_header (bool val)
1941 this->gen_empty_anyop_header_ = val;
1944 bool
1945 BE_GlobalData::gen_empty_anyop_header (void) const
1947 return this->gen_empty_anyop_header_;
1950 void
1951 BE_GlobalData::lookup_strategy (LOOKUP_STRATEGY s)
1953 this->lookup_strategy_ = s;
1956 BE_GlobalData::LOOKUP_STRATEGY
1957 BE_GlobalData::lookup_strategy (void) const
1959 return this->lookup_strategy_;
1962 void
1963 BE_GlobalData::dds_impl (char const * const val)
1965 ACE_CString tmp (val, 0, false);
1967 if (tmp == "ndds")
1969 this->dds_impl_ = NDDS;
1971 else if (tmp == "opensplice")
1973 this->dds_impl_ = OPENSPLICE;
1975 else if (tmp == "opendds")
1977 this->dds_impl_ = OPENDDS;
1979 else if (tmp == "coredx")
1981 this->dds_impl_ = COREDX;
1983 else
1985 ACE_ERROR ((LM_ERROR,
1986 ACE_TEXT ("%C: invalid or unknown ")
1987 ACE_TEXT ("argument <%C> to -Wb,dds_impl\n"),
1988 idl_global->prog_name (),
1989 val));
1993 BE_GlobalData::DDS_IMPL
1994 BE_GlobalData::dds_impl (void) const
1996 return this->dds_impl_;
1999 void
2000 BE_GlobalData::destroy (void)
2002 ACE::strdelete (this->skel_export_macro_);
2003 this->skel_export_macro_ = 0;
2005 ACE::strdelete (this->skel_export_include_);
2006 this->skel_export_include_ = 0;
2008 ACE::strdelete (this->skel_export_file_);
2009 this->skel_export_file_ = 0;
2011 ACE::strdelete (this->stub_export_macro_);
2012 this->stub_export_macro_ = 0;
2014 ACE::strdelete (this->stub_export_include_);
2015 this->stub_export_include_ = 0;
2017 ACE::strdelete (this->stub_export_file_);
2018 this->stub_export_file_ = 0;
2020 ACE::strdelete (this->anyop_export_macro_);
2021 this->anyop_export_macro_ = 0;
2023 ACE::strdelete (this->anyop_export_include_);
2024 this->anyop_export_include_ = 0;
2026 ACE::strdelete (this->exec_export_macro_);
2027 this->exec_export_macro_ = 0;
2029 ACE::strdelete (this->exec_export_include_);
2030 this->exec_export_include_ = 0;
2032 ACE::strdelete (this->svnt_export_macro_);
2033 this->svnt_export_macro_ = 0;
2035 ACE::strdelete (this->svnt_export_include_);
2036 this->svnt_export_include_ = 0;
2038 ACE::strdelete (this->conn_export_macro_);
2039 this->conn_export_macro_ = 0;
2041 ACE::strdelete (this->conn_export_include_);
2042 this->conn_export_include_ = 0;
2044 ACE::strdelete (this->pch_include_);
2045 this->pch_include_ = 0;
2047 ACE::strdelete (this->pre_include_);
2048 this->pre_include_ = 0;
2050 ACE::strdelete (this->post_include_);
2051 this->post_include_ = 0;
2053 ACE::strdelete (this->include_guard_);
2054 this->include_guard_ = 0;
2056 ACE::strdelete (this->safe_include_);
2057 this->safe_include_ = 0;
2059 ACE::strdelete (this->unique_include_);
2060 this->unique_include_ = 0;
2062 ACE::strdelete (this->stripped_filename_);
2063 this->stripped_filename_ = 0;
2065 ACE::strdelete (this->client_hdr_ending_);
2066 this->client_hdr_ending_ = 0;
2068 ACE::strdelete (this->client_stub_ending_);
2069 this->client_stub_ending_ = 0;
2071 ACE::strdelete (this->client_inline_ending_);
2072 this->client_inline_ending_ = 0;
2074 ACE::strdelete (this->server_hdr_ending_);
2075 this->server_hdr_ending_ = 0;
2077 ACE::strdelete (this->implementation_hdr_ending_);
2078 this->implementation_hdr_ending_ = 0;
2080 ACE::strdelete (this->implementation_skel_ending_);
2081 this->implementation_skel_ending_ = 0;
2083 ACE::strdelete (this->impl_class_prefix_);
2084 this->impl_class_prefix_ = 0;
2086 ACE::strdelete (this->impl_class_suffix_);
2087 this->impl_class_suffix_ = 0;
2089 ACE::strdelete (this->server_template_hdr_ending_);
2090 this->server_template_hdr_ending_ = 0;
2092 ACE::strdelete (this->server_skeleton_ending_);
2093 this->server_skeleton_ending_ = 0;
2095 ACE::strdelete (this->server_template_skeleton_ending_);
2096 this->server_template_skeleton_ending_ = 0;
2098 ACE::strdelete (this->anyop_hdr_ending_);
2099 this->anyop_hdr_ending_ = 0;
2101 ACE::strdelete (this->anyop_src_ending_);
2102 this->anyop_src_ending_ = 0;
2104 ACE::strdelete (this->ciao_svnt_hdr_ending_);
2105 this->ciao_svnt_hdr_ending_ = 0;
2107 ACE::strdelete (this->ciao_svnt_src_ending_);
2108 this->ciao_svnt_src_ending_ = 0;
2110 ACE::strdelete (this->ciao_svnt_hdr_template_ending_);
2111 this->ciao_svnt_hdr_template_ending_ = 0;
2113 ACE::strdelete (this->ciao_svnt_src_template_ending_);
2114 this->ciao_svnt_src_template_ending_ = 0;
2116 ACE::strdelete (this->ciao_exec_hdr_ending_);
2117 this->ciao_exec_hdr_ending_ = 0;
2119 ACE::strdelete (this->ciao_exec_src_ending_);
2120 this->ciao_exec_src_ending_ = 0;
2122 ACE::strdelete (this->ciao_exec_stub_hdr_ending_);
2123 this->ciao_exec_stub_hdr_ending_ = 0;
2125 ACE::strdelete (this->ciao_exec_idl_ending_);
2126 this->ciao_exec_idl_ending_ = 0;
2128 ACE::strdelete (this->ciao_conn_hdr_ending_);
2129 this->ciao_conn_hdr_ending_ = 0;
2131 ACE::strdelete (this->ciao_conn_src_ending_);
2132 this->ciao_conn_src_ending_ = 0;
2134 ACE::strdelete (this->dds_typesupport_hdr_ending_);
2135 this->dds_typesupport_hdr_ending_ = 0;
2137 ACE::strdelete (this->ciao_ami_conn_idl_ending_);
2138 this->ciao_ami_conn_idl_ending_ = 0;
2140 ACE::strdelete (this->ciao_ami_conn_impl_hdr_ending_);
2141 this->ciao_ami_conn_impl_hdr_ending_ = 0;
2143 ACE::strdelete (this->ciao_ami_conn_impl_src_ending_);
2144 this->ciao_ami_conn_impl_src_ending_ = 0;
2146 ACE::strdelete (this->ciao_container_type_);
2147 this->ciao_container_type_ = 0;
2149 ACE::strdelete (this->output_dir_);
2150 this->output_dir_ = 0;
2152 ACE::strdelete (this->stub_include_dir_);
2153 this->stub_include_dir_ = 0;
2155 ACE::strdelete (this->skel_output_dir_);
2156 this->skel_output_dir_ = 0;
2158 ACE::strdelete (this->anyop_output_dir_);
2159 this->anyop_output_dir_ = 0;
2161 ACE::strdelete (this->exec_output_dir_);
2162 this->exec_output_dir_ = 0;
2164 if (0 != this->messaging_)
2166 this->messaging_->destroy ();
2167 delete this->messaging_;
2168 this->messaging_ = 0;
2171 if (0 != this->messaging_exceptionholder_)
2173 this->messaging_exceptionholder_->destroy ();
2174 delete this->messaging_exceptionholder_;
2175 this->messaging_exceptionholder_ = 0;
2178 if (0 != this->messaging_replyhandler_)
2180 this->messaging_replyhandler_->destroy ();
2181 delete this->messaging_replyhandler_;
2182 this->messaging_replyhandler_ = 0;
2185 if (0 != tao_cg)
2187 tao_cg->destroy ();
2191 AST_PredefinedType *
2192 BE_GlobalData:: void_type (void)
2194 if (0 == this->void_type_)
2196 AST_Decl *d =
2197 idl_global->root ()->lookup_primitive_type (
2198 AST_Expression::EV_void);
2200 this->void_type_ = dynamic_cast<AST_PredefinedType*> (d);
2203 return this->void_type_;
2206 be_interface *
2207 BE_GlobalData::ccmobject (void)
2209 if (0 == this->ccmobject_)
2211 Identifier *local_id = 0;
2212 ACE_NEW_RETURN (local_id,
2213 Identifier ("CCMObject"),
2215 UTL_ScopedName *local_name = 0;
2216 ACE_NEW_RETURN (local_name,
2217 UTL_ScopedName (local_id, 0),
2220 Identifier *module_id = 0;
2221 ACE_NEW_RETURN (module_id,
2222 Identifier ("Components"),
2224 UTL_ScopedName sn (module_id,
2225 local_name);
2227 AST_Decl *d =
2228 idl_global->scopes ().top_non_null ()->lookup_by_name (&sn,
2229 true);
2231 sn.destroy ();
2233 if (0 == d)
2235 ACE_ERROR_RETURN ((LM_ERROR,
2236 "(%N:%l) be_global::ccmobject - "
2237 "lookup of CCMObject failed\n"),
2241 this->ccmobject_ = dynamic_cast<be_interface*> (d);
2244 return this->ccmobject_;
2247 be_module *
2248 BE_GlobalData::messaging (void)
2250 if (0 == this->messaging_)
2252 Identifier *id = 0;
2253 UTL_ScopedName *sn = 0;
2255 ACE_NEW_RETURN (id,
2256 Identifier ("Messaging"),
2259 ACE_NEW_RETURN (sn,
2260 UTL_ScopedName (id,
2264 ACE_NEW_RETURN (this->messaging_,
2265 be_module (sn),
2268 this->messaging_->set_name (sn);
2271 return this->messaging_;
2274 be_valuetype *
2275 BE_GlobalData::messaging_exceptionholder (void)
2277 if (0 == this->messaging_exceptionholder_)
2279 Identifier *id = 0;
2280 be_module *msg = this->messaging ();
2281 idl_global->scopes ().push (msg);
2283 ACE_NEW_RETURN (id,
2284 Identifier ("Messaging"),
2287 // Create a valuetype "ExceptionHolder"
2288 // from which we inherit.
2289 UTL_ScopedName *full_name = 0;
2290 ACE_NEW_RETURN (full_name,
2291 UTL_ScopedName (id,
2295 ACE_NEW_RETURN (id,
2296 Identifier ("ExceptionHolder"),
2299 UTL_ScopedName *local_name = 0;
2300 ACE_NEW_RETURN (local_name,
2301 UTL_ScopedName (id,
2305 full_name->nconc (local_name);
2307 ACE_NEW_RETURN (this->messaging_exceptionholder_,
2308 be_valuetype (full_name,
2322 this->messaging_exceptionholder_->set_name (full_name);
2324 // Notice the valuetype "ExceptionHolder" that it is defined in the
2325 // "Messaging" module
2326 this->messaging_exceptionholder_->set_defined_in (msg);
2327 this->messaging_exceptionholder_->set_prefix_with_typeprefix ("omg.org");
2329 idl_global->scopes ().pop ();
2331 // Notice the interface "ReplyHandler" that it is defined in the
2332 // "Messaging" module.
2333 this->messaging_exceptionholder_->set_defined_in (msg);
2336 return this->messaging_exceptionholder_;
2339 be_interface *
2340 BE_GlobalData::messaging_replyhandler (void)
2342 if (0 == this->messaging_replyhandler_)
2344 be_module *msg = this->messaging ();
2345 idl_global->scopes ().push (msg);
2347 Identifier *id = 0;
2348 UTL_ScopedName *local_name = 0;
2350 // Create a virtual module named "Messaging"
2351 // "and an interface "ReplyHandler"
2352 // from which we inherit.
2353 ACE_NEW_RETURN (id,
2354 Identifier ("Messaging"),
2357 UTL_ScopedName *full_name = 0;
2358 ACE_NEW_RETURN (full_name,
2359 UTL_ScopedName (id,
2363 ACE_NEW_RETURN (id,
2364 Identifier ("ReplyHandler"),
2367 ACE_NEW_RETURN (local_name,
2368 UTL_ScopedName (id,
2372 full_name->nconc (local_name);
2374 ACE_NEW_RETURN (this->messaging_replyhandler_,
2375 be_interface (full_name,
2376 0, // inherited interfaces
2377 0, // number of inherited interfaces
2378 0, // ancestors
2379 0, // number of ancestors
2380 0, // not local
2381 0), // not abstract
2384 this->messaging_replyhandler_->set_name (full_name);
2385 this->messaging_replyhandler_->set_prefix_with_typeprefix ("omg.org");
2387 idl_global->scopes ().pop ();
2389 // Notice the interface "ReplyHandler" that it is defined in the
2390 // "Messaging" module.
2391 this->messaging_replyhandler_->set_defined_in (msg);
2394 return this->messaging_replyhandler_;
2397 bool
2398 BE_GlobalData::gen_anyop_files (void) const
2400 return this->gen_anyop_files_;
2403 void
2404 BE_GlobalData::gen_anyop_files (bool val)
2406 this->gen_anyop_files_ = val;
2409 bool
2410 BE_GlobalData::gen_skel_files (void) const
2412 return this->gen_skel_files_;
2415 void
2416 BE_GlobalData::gen_skel_files (bool val)
2418 this->gen_skel_files_ = val;
2421 bool
2422 BE_GlobalData::gen_svnt_cpp_files (void) const
2424 return this->gen_svnt_cpp_files_;
2427 void
2428 BE_GlobalData::gen_svnt_cpp_files (bool val)
2430 this->gen_svnt_cpp_files_ = val;
2433 bool
2434 BE_GlobalData::gen_svnt_t_files (void) const
2436 return this->gen_svnt_t_files_;
2439 void
2440 BE_GlobalData::gen_svnt_t_files (bool val)
2442 this->gen_svnt_t_files_ = val;
2445 bool
2446 BE_GlobalData::gen_client_inline (void) const
2448 return this->gen_client_inline_;
2451 void
2452 BE_GlobalData::gen_client_inline (bool val)
2454 this->gen_client_inline_ = val;
2457 bool
2458 BE_GlobalData::gen_client_stub (void) const
2460 return this->gen_client_stub_;
2463 void
2464 BE_GlobalData::gen_client_stub (bool val)
2466 this->gen_client_stub_ = val;
2469 bool
2470 BE_GlobalData::gen_client_header (void) const
2472 return this->gen_client_header_;
2475 void
2476 BE_GlobalData::gen_client_header (bool val)
2478 this->gen_client_header_ = val;
2481 bool
2482 BE_GlobalData::gen_server_skeleton (void) const
2484 return this->gen_server_skeleton_;
2487 void
2488 BE_GlobalData::gen_server_skeleton (bool val)
2490 this->gen_server_skeleton_ = val;
2493 bool
2494 BE_GlobalData::gen_server_header (void) const
2496 return this->gen_server_header_;
2499 void
2500 BE_GlobalData::gen_server_header (bool val)
2502 this->gen_server_header_ = val;
2505 bool
2506 BE_GlobalData::gen_local_iface_anyops (void) const
2508 return this->gen_local_iface_anyops_;
2511 void
2512 BE_GlobalData::gen_local_iface_anyops (bool val)
2514 this->gen_local_iface_anyops_ = val;
2517 bool
2518 BE_GlobalData::gen_custom_ending (void) const
2520 return this->gen_custom_ending_;
2523 void
2524 BE_GlobalData::gen_custom_ending (bool val)
2526 this->gen_custom_ending_ = val;
2529 bool
2530 BE_GlobalData::gen_unique_guards (void) const
2532 return this->gen_unique_guards_;
2535 void
2536 BE_GlobalData::gen_unique_guards (bool val)
2538 this->gen_unique_guards_ = val;
2541 bool
2542 BE_GlobalData::gen_ciao_svnt (void) const
2544 return this->gen_ciao_svnt_;
2547 void
2548 BE_GlobalData::gen_ciao_svnt (bool val)
2550 this->gen_ciao_svnt_ = val;
2553 bool
2554 BE_GlobalData::gen_ciao_exec_idl (void) const
2556 return this->gen_ciao_exec_idl_;
2559 void
2560 BE_GlobalData::gen_ciao_exec_idl (bool val)
2562 this->gen_ciao_exec_idl_ = val;
2565 bool
2566 BE_GlobalData::gen_ciao_exec_impl (void) const
2568 return this->gen_ciao_exec_impl_;
2571 void
2572 BE_GlobalData::gen_ciao_exec_impl (bool val)
2574 this->gen_ciao_exec_impl_ = val;
2577 bool
2578 BE_GlobalData::gen_ciao_exec_reactor_impl (void) const
2580 return this->gen_ciao_exec_reactor_impl_;
2583 void
2584 BE_GlobalData::gen_ciao_exec_reactor_impl (bool val)
2586 this->gen_ciao_exec_reactor_impl_ = val;
2589 bool
2590 BE_GlobalData::gen_ciao_conn_impl (void) const
2592 return this->gen_ciao_conn_impl_;
2595 void
2596 BE_GlobalData::gen_ciao_conn_impl (bool val)
2598 this->gen_ciao_conn_impl_ = val;
2601 bool
2602 BE_GlobalData::gen_dds_typesupport_idl (void) const
2604 return this->gen_dds_typesupport_idl_;
2607 void
2608 BE_GlobalData::gen_dds_typesupport_idl (bool val)
2610 this->gen_dds_typesupport_idl_ = val;
2613 bool
2614 BE_GlobalData::gen_ciao_valuefactory_reg (void) const
2616 return this->gen_ciao_valuefactory_reg_;
2619 void
2620 BE_GlobalData::gen_ciao_valuefactory_reg (bool val)
2622 this->gen_ciao_valuefactory_reg_ = val;
2625 bool
2626 BE_GlobalData::gen_stub_export_hdr_file (void) const
2628 return this->gen_stub_export_hdr_file_;
2631 void
2632 BE_GlobalData::gen_stub_export_hdr_file (bool val)
2634 this->gen_stub_export_hdr_file_ = val;
2637 bool
2638 BE_GlobalData::gen_skel_export_hdr_file (void) const
2640 return this->gen_skel_export_hdr_file_;
2643 void
2644 BE_GlobalData::gen_skel_export_hdr_file (bool val)
2646 this->gen_skel_export_hdr_file_ = val;
2649 bool
2650 BE_GlobalData::gen_svnt_export_hdr_file (void) const
2652 return this->gen_svnt_export_hdr_file_;
2655 void
2656 BE_GlobalData::gen_svnt_export_hdr_file (bool val)
2658 this->gen_svnt_export_hdr_file_ = val;
2661 bool
2662 BE_GlobalData::gen_exec_export_hdr_file (void) const
2664 return this->gen_exec_export_hdr_file_;
2667 void
2668 BE_GlobalData::gen_exec_export_hdr_file (bool val)
2670 this->gen_exec_export_hdr_file_ = val;
2673 bool
2674 BE_GlobalData::gen_conn_export_hdr_file (void) const
2676 return this->gen_conn_export_hdr_file_;
2679 void
2680 BE_GlobalData::gen_conn_export_hdr_file (bool val)
2682 this->gen_conn_export_hdr_file_ = val;
2685 bool
2686 BE_GlobalData::alt_mapping (void) const
2688 return this->alt_mapping_;
2691 void
2692 BE_GlobalData::alt_mapping (bool val)
2694 this->alt_mapping_ = val;
2697 bool
2698 BE_GlobalData::in_facet_servant (void) const
2700 return this->in_facet_servant_;
2703 void
2704 BE_GlobalData::in_facet_servant (bool val)
2706 this->in_facet_servant_ = val;
2709 bool
2710 BE_GlobalData::gen_arg_traits (void) const
2712 return this->gen_arg_traits_;
2715 void
2716 BE_GlobalData::gen_arg_traits (bool val)
2718 this->gen_arg_traits_ = val;
2721 bool
2722 BE_GlobalData::gen_anytypecode_adapter (void) const
2724 return this->gen_anytypecode_adapter_;
2727 void
2728 BE_GlobalData::gen_anytypecode_adapter (bool val)
2730 this->gen_anytypecode_adapter_ = val;
2733 bool
2734 BE_GlobalData::no_fixed_err () const
2736 return this->no_fixed_err_;
2739 void
2740 BE_GlobalData::no_fixed_err (bool val)
2742 this->no_fixed_err_ = val;
2745 unsigned long
2746 BE_GlobalData::tab_size (void) const
2748 return this->tab_size_;
2751 void
2752 BE_GlobalData::tab_size (unsigned long val)
2754 this->tab_size_ = val;
2757 ACE_CString
2758 BE_GlobalData::spawn_options (void)
2760 return idl_global->idl_flags ();
2763 void
2764 BE_GlobalData::parse_args (long &i, char **av)
2766 switch (av[i][1])
2768 // = Various 'h'eader_file_name_endings.
2769 case 'h':
2771 // <-hc Client's header file name ending>
2772 // Default is "C.h".
2773 // <-hs Server's header file name ending>
2774 // Default is "S.h".
2775 // <-hT Server's template hdr file name ending>
2776 // Default is "S_T.h".
2777 // <-hI Server's implementation header file name ending>
2778 // Default is "I.h".
2780 if (av[i][2] == 'c')
2782 // Client stub's header file ending.
2783 // @@ No error handling done here.
2784 idl_global->append_idl_flag (av[i + 1]);
2785 be_global->client_hdr_ending (av[i + 1]);
2786 ++i;
2788 else if (av[i][2] == 's')
2790 // Server skeleton's header file.
2791 idl_global->append_idl_flag (av[i + 1]);
2792 be_global->server_hdr_ending (av[i + 1]);
2793 ++i;
2795 else if (av[i][2] == 'T')
2797 // Server template header ending.
2798 idl_global->append_idl_flag (av[i + 1]);
2799 be_global->server_template_hdr_ending (av[i + 1]);
2800 ++i;
2802 else if (av[i][2] == 'I')
2804 // Server implementation header ending.
2805 idl_global->append_idl_flag (av[i + 1]);
2806 be_global->implementation_hdr_ending (av[i + 1]);
2807 ++i;
2809 else
2811 // I expect 'c' or 's' or 'I' or 'T' after this.
2812 ACE_ERROR ((
2813 LM_ERROR,
2814 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2815 av[i]
2817 idl_global->parse_args_exit (1);
2819 break;
2820 case 'b':
2821 if (av[i][2] == '\0')
2823 be_global->use_clonable_in_args(true);
2825 else
2827 ACE_ERROR ((
2828 LM_ERROR,
2829 ACE_TEXT ("IDL: I don't understand")
2830 ACE_TEXT (" the '%C' option\n"),
2831 av[i]
2833 idl_global->parse_args_exit (1);
2835 break;
2836 // = Various 'c'lient side stub file_name_endings.
2837 case 'c':
2838 // <-cs Client stub's file name ending>
2839 // Default is "C.cpp".
2840 // <-ci Client inline file name ending>
2841 // Default is "C.inl".
2843 if (av[i][2] == 's')
2845 idl_global->append_idl_flag (av[i + 1]);
2846 be_global->client_stub_ending (av[i + 1]);
2847 i++;
2849 else if (av[i][2] == 'i')
2851 idl_global->append_idl_flag (av[i + 1]);
2852 be_global->client_inline_ending (av[i + 1]);
2853 i++;
2855 else
2857 // I expect 's' or 'i' after 'c'.
2858 ACE_ERROR ((
2859 LM_ERROR,
2860 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2861 av[i]
2863 idl_global->parse_args_exit (1);
2865 break;
2866 // = Various 's'erver side skeleton file name endings.
2867 case 's':
2868 // <-ss Server's skeleton file name ending>
2869 // Default is "S.cpp".
2870 // <-sT Server's template skeleton file name ending>
2871 // Default is "S_T.cpp".
2872 // <-sI Server's implementation skeleton file name ending>
2873 // Default is "I.cpp".
2875 if (av[i][2] == 's')
2877 idl_global->append_idl_flag (av[i + 1]);
2878 be_global->server_skeleton_ending (av[i + 1]);
2879 ++i;
2881 else if (av[i][2] == 'T')
2883 idl_global->append_idl_flag (av[i + 1]);
2884 be_global->server_template_skeleton_ending (av[i + 1]);
2885 ++i;
2887 else if (av[i][2] == 'I')
2889 idl_global->append_idl_flag (av[i + 1]);
2890 be_global->implementation_skel_ending (av[i + 1]);
2891 ++i;
2893 else
2895 // I expect 's' or 'T' or or 't' after 's'.
2896 ACE_ERROR ((
2897 LM_ERROR,
2898 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2899 av[i]
2901 idl_global->parse_args_exit (1);
2903 break;
2904 // Operation lookup strategy.
2905 // <perfect_hash>, <dynamic_hash> or <binary_search>
2906 // Default is perfect.
2907 case 'H':
2908 idl_global->append_idl_flag (av[i + 1]);
2910 if (av[i + 1] == 0 || av[i + 1][0] == '-')
2912 ACE_ERROR ((LM_ERROR,
2913 ACE_TEXT ("no selection for -H option\n")));
2914 idl_global->parse_args_exit (1);
2916 else if (ACE_OS::strcmp (av[i+1], "dynamic_hash") == 0)
2918 be_global->lookup_strategy (BE_GlobalData::TAO_DYNAMIC_HASH);
2920 else if (ACE_OS::strcmp (av[i + 1], "perfect_hash") == 0)
2922 be_global->lookup_strategy (BE_GlobalData::TAO_PERFECT_HASH);
2924 else if (ACE_OS::strcmp (av[i + 1], "binary_search") == 0)
2926 be_global->lookup_strategy (BE_GlobalData::TAO_BINARY_SEARCH);
2928 else if (ACE_OS::strcmp (av[i + 1], "linear_search") == 0)
2930 be_global->lookup_strategy (BE_GlobalData::TAO_LINEAR_SEARCH);
2932 else
2934 ACE_ERROR ((LM_ERROR,
2935 ACE_TEXT ("%C: unknown operation lookup <%C>\n"),
2936 av[0],
2937 av[i + 1]));
2938 idl_global->parse_args_exit (1);
2941 ++i;
2942 break;
2943 // Switching between ""s and <>s when we generate
2944 // #include statements for the standard files (e.g. tao/corba.h)
2945 case 'i':
2946 if (av[i][2] == 'c')
2948 be_global->changing_standard_include_files (1);
2950 else if (av[i][2] == 'n')
2952 be_global->changing_standard_include_files (0);
2954 else if (av[i][2] == 'C')
2956 if (av[i][3] == '\0')
2958 be_global->stub_include_dir (av[i + 1]);
2959 ++i;
2961 else
2963 ACE_ERROR ((
2964 LM_ERROR,
2965 ACE_TEXT ("IDL: I don't understand")
2966 ACE_TEXT (" the '%C' option\n"),
2967 av[i]
2969 idl_global->parse_args_exit (1);
2972 else
2974 ACE_ERROR ((
2975 LM_ERROR,
2976 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2977 av[i]
2979 idl_global->parse_args_exit (1);
2982 break;
2983 // Path for the perfect hash generator(gperf) program. Default
2984 // is $ACE_ROOT/bin/ace_gperf.
2985 case 'g':
2986 if (av[i][2] == '\0')
2988 idl_global->append_idl_flag (av[i + 1]);
2989 ACE_CString tmp (av[i + 1], 0, false);
2990 #if defined (ACE_WIN32)
2991 // WIN32's CreateProcess needs the full executable name
2992 // when the gperf path is modified, but not for the default
2993 // path given above. Other platforms don't need the
2994 // executable name at all.
2995 tmp += "\\ace_gperf.exe";
2996 #endif
2997 idl_global->gperf_path (tmp.fast_rep ());
2998 ++i;
3000 else
3002 ACE_ERROR ((
3003 LM_ERROR,
3004 ACE_TEXT ("IDL: I don't understand")
3005 ACE_TEXT (" the '%C' option\n"),
3006 av[i]
3008 idl_global->parse_args_exit (1);
3011 break;
3012 // Directory where all the IDL-Compiler-Generated files are to
3013 // be kept. Default is the current directory from which the
3014 // <tao_idl> is called.
3015 case 'o':
3016 if (av[i][2] == '\0')
3018 idl_global->append_idl_flag (av[i + 1]);
3019 int result = ACE_OS::mkdir (av[i + 1]);
3021 #if !defined (__BORLANDC__)
3022 if (result != 0 && errno != EEXIST)
3023 #else
3024 // The Borland RTL doesn't give EEXIST back, only EACCES in case
3025 // the directory exists, reported to Borland as QC 9495
3026 if (result != 0 && errno != EEXIST && errno != EACCES)
3027 #endif
3029 ACE_ERROR ((
3030 LM_ERROR,
3031 ACE_TEXT ("IDL: unable to create directory %C")
3032 ACE_TEXT (" specified by -o option\n"),
3033 av[i + 1]
3035 idl_global->parse_args_exit (1);
3038 be_global->output_dir (av[i + 1]);
3039 ++i;
3041 else if (av[i][2] == 'A')
3043 if (av[i][3] == '\0')
3045 idl_global->append_idl_flag (av[i + 1]);
3046 int result = ACE_OS::mkdir (av[i + 1]);
3048 #if !defined (__BORLANDC__)
3049 if (result != 0 && errno != EEXIST)
3050 #else
3051 // The Borland RTL doesn't give EEXIST back, only EACCES in
3052 // case the directory exists, reported to Borland as QC 9495
3053 if (result != 0 && errno != EEXIST && errno != EACCES)
3054 #endif
3056 ACE_ERROR ((
3057 LM_ERROR,
3058 ACE_TEXT ("IDL: unable to create directory %C")
3059 ACE_TEXT (" specified by -oA option\n"),
3060 av[i + 1]
3063 idl_global->parse_args_exit (1);
3066 be_global->anyop_output_dir (av[i + 1]);
3067 ++i;
3069 else
3071 ACE_ERROR ((
3072 LM_ERROR,
3073 ACE_TEXT ("IDL: I don't understand")
3074 ACE_TEXT (" the '%C' option\n"),
3075 av[i]
3077 idl_global->parse_args_exit (1);
3080 else if (av[i][2] == 'E')
3082 if (av[i][3] == '\0')
3084 idl_global->append_idl_flag (av[i + 1]);
3085 int result = ACE_OS::mkdir (av[i + 1]);
3087 #if !defined (__BORLANDC__)
3088 if (result != 0 && errno != EEXIST)
3089 #else
3090 // The Borland RTL doesn't give EEXIST back, only EACCES in
3091 // case the directory exists, reported to Borland as QC 9495
3092 if (result != 0 && errno != EEXIST && errno != EACCES)
3093 #endif
3095 ACE_ERROR ((
3096 LM_ERROR,
3097 ACE_TEXT ("IDL: unable to create directory %C")
3098 ACE_TEXT (" specified by -oE option\n"),
3099 av[i + 1]
3102 idl_global->parse_args_exit (1);
3105 be_global->exec_output_dir (av[i + 1]);
3106 ++i;
3108 else
3110 ACE_ERROR ((
3111 LM_ERROR,
3112 ACE_TEXT ("IDL: I don't understand")
3113 ACE_TEXT (" the '%C' option\n"),
3114 av[i]
3116 idl_global->parse_args_exit (1);
3119 else if (av[i][2] == 'N')
3121 if (av[i][3] == '\0')
3123 // Don't overwrite exec files.
3124 be_global->overwrite_not_exec (true);
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] == 'S')
3139 if (av[i][3] == '\0')
3141 idl_global->append_idl_flag (av[i + 1]);
3142 int result = ACE_OS::mkdir (av[i + 1]);
3144 #if !defined (__BORLANDC__)
3145 if (result != 0 && errno != EEXIST)
3146 #else
3147 // The Borland RTL doesn't give EEXIST back, only EACCES in
3148 // case the directory exists, reported to Borland as QC 9495
3149 if (result != 0 && errno != EEXIST && errno != EACCES)
3150 #endif
3152 ACE_ERROR ((
3153 LM_ERROR,
3154 ACE_TEXT ("IDL: unable to create directory %C")
3155 ACE_TEXT (" specified by -oS option\n"),
3156 av[i + 1]
3159 idl_global->parse_args_exit (1);
3162 be_global->skel_output_dir (av[i + 1]);
3163 ++i;
3165 else
3167 ACE_ERROR ((
3168 LM_ERROR,
3169 ACE_TEXT ("IDL: I don't understand")
3170 ACE_TEXT (" the '%C' option\n"),
3171 av[i]
3173 idl_global->parse_args_exit (1);
3176 else
3178 ACE_ERROR ((
3179 LM_ERROR,
3180 ACE_TEXT ("IDL: I don't understand")
3181 ACE_TEXT (" the '%C' option\n"),
3182 av[i]
3184 idl_global->parse_args_exit (1);
3187 break;
3188 case 'G':
3189 // Enable generation of ...
3190 if (av[i][2] == 'C')
3192 // AMI with Call back.
3193 be_global->ami_call_back (true);
3195 else if (av[i][2] == 'M')
3197 // AMI4CCM calls implicit option 'C': AMI with Call back.
3198 be_global->ami_call_back (true);
3199 // Generate tie classes and files
3200 be_global->ami4ccm_call_back (true);
3202 else if (av[i][2] == 'T')
3204 // Generate tie classes and files
3205 be_global->gen_tie_classes (true);
3207 else if (av[i][2] == 'H')
3209 // AMH classes.
3210 be_global->gen_amh_classes (true);
3212 else if (av[i][2] == 'X')
3214 // Generate empty A.h file.
3215 be_global->gen_empty_anyop_header (true);
3217 else if (av[i][2] == 'A')
3219 // TAO-team-only, undocumented option to generate
3220 // Any operators into a separate set of files.
3221 be_global->gen_anyop_files (true);
3223 else if (av[i][2] == 'c' && av[i][3] == 'n')
3225 // CIAO connector impl code generation.
3226 be_global->gen_ciao_conn_impl (true);
3228 break;
3230 else if (av[i][2] == 't' && av[i][3] == 's')
3232 // DDS type support IDL generation.
3233 be_global->gen_dds_typesupport_idl (true);
3235 break;
3237 else if (av[i][2] == 's' && av[i][3] == 'd')
3239 // Generate static description operations
3240 be_global->gen_static_desc_operations (true);
3242 break;
3244 else if (av[i][2] == 'e' && av[i][3] == 'x')
3246 // CIAO executor impl code generation.
3247 be_global->gen_ciao_exec_impl (true);
3249 // should the reactor code be generated?
3250 if (av[i][4] == 'r')
3252 be_global->gen_ciao_exec_reactor_impl (true);
3254 break;
3256 else if (av[i][2] == 's')
3258 if (av[i][3] == 'p')
3260 // Smart proxies.
3261 be_global->gen_smart_proxies (true);
3263 else if (av[i][3] == 'e')
3265 // Explicit sequence base class template export.
3266 be_global->gen_template_export (true);
3268 else if (av[i][3] == 'v')
3270 // CIAO servant code generation.
3271 be_global->gen_ciao_svnt (true);
3273 else if (av[i][3] == 't' && av[i][4] == 'l')
3275 // Generate code using STL types for strings
3276 // and sequences.
3277 be_global->alt_mapping (true);
3279 else
3281 ACE_ERROR ((
3282 LM_ERROR,
3283 ACE_TEXT ("IDL: I don't understand ")
3284 ACE_TEXT ("the '%C' option\n"),
3285 av[i]
3287 idl_global->parse_args_exit (1);
3290 break;
3292 else if (av[i][2] == 'x')
3294 if (av[i][3] == 'h')
3296 if (av[i][4] == 's')
3298 if (av[i][5] == 't')
3300 be_global->gen_stub_export_hdr_file (true);
3302 else if (av[i][5] == 'k')
3304 be_global->gen_skel_export_hdr_file (true);
3306 else if (av[i][5] == 'v')
3308 be_global->gen_svnt_export_hdr_file (true);
3310 else
3312 ACE_ERROR ((
3313 LM_ERROR,
3314 ACE_TEXT ("IDL: I don't understand ")
3315 ACE_TEXT ("the '%s' option\n"),
3316 av[i]
3318 idl_global->parse_args_exit (1);
3321 break;
3323 else if (av[i][4] == 'e' && av[i][5] == 'x')
3325 be_global->gen_exec_export_hdr_file (true);
3327 else if (av[i][4] == 'c' && av[i][5] == 'n')
3329 be_global->gen_conn_export_hdr_file (true);
3331 else
3333 ACE_ERROR ((
3334 LM_ERROR,
3335 ACE_TEXT ("IDL: I don't understand ")
3336 ACE_TEXT ("the '%s' option\n"),
3337 av[i]
3339 idl_global->parse_args_exit (1);
3342 break;
3344 else
3346 ACE_ERROR ((
3347 LM_ERROR,
3348 ACE_TEXT ("IDL: I don't understand ")
3349 ACE_TEXT ("the '%s' option\n"),
3350 av[i]
3352 idl_global->parse_args_exit (1);
3355 break;
3357 else if (av[i][2] == 'u')
3359 if (av[i][3] == 'c')
3361 // Inline constants.
3362 be_global->gen_inline_constants (false);
3364 else
3366 ACE_ERROR ((
3367 LM_ERROR,
3368 ACE_TEXT ("IDL: I don't understand ")
3369 ACE_TEXT ("the '%C' option\n"),
3370 av[i]
3372 idl_global->parse_args_exit (1);
3375 break;
3377 else if (av[i][2] == 'c')
3379 if (av[i][3] == 'e')
3381 // CORBA/e.
3382 be_global->gen_corba_e (true);
3384 else if (av[i][3] == 'l')
3386 // CORBA/e.
3387 be_global->gen_lwccm (true);
3389 else if (av[i][3] == 'm')
3391 // NOEVENTS ccm, ccm without events .
3392 be_global->gen_noeventccm (true);
3394 else
3396 ACE_ERROR ((
3397 LM_ERROR,
3398 ACE_TEXT ("IDL: I don't understand ")
3399 ACE_TEXT ("the '%C' option\n"),
3400 av[i]
3402 idl_global->parse_args_exit (1);
3404 break;
3406 else if (av[i][2] == 'm')
3408 if (av[i][3] == 'c')
3410 // Minimum corba.
3411 be_global->gen_minimum_corba (true);
3413 else
3415 ACE_ERROR ((
3416 LM_ERROR,
3417 ACE_TEXT ("IDL: I don't understand ")
3418 ACE_TEXT ("the '%C' option\n"),
3419 av[i]
3421 idl_global->parse_args_exit (1);
3423 break;
3425 else if (av[i][2] == 't')
3427 // Optimized typecode generation.
3428 be_global->opt_tc (1);
3430 else if (av[i][2] == 'p')
3432 // Generating Thru_POA collocated stubs.
3433 be_global->gen_thru_poa_collocation (true);
3435 else if (av[i][2] == 'l')
3437 if (av[i][3] == 'e' && av[i][4] == 'm')
3439 be_global->gen_ciao_exec_idl (true);
3441 else
3443 ACE_ERROR ((
3444 LM_ERROR,
3445 ACE_TEXT ("IDL: I don't understand ")
3446 ACE_TEXT ("the '%s' option\n"),
3447 av[i]
3449 idl_global->parse_args_exit (1);
3452 break;
3454 else if (av[i][2] == 'd')
3456 if ('\0' == av[i][3])
3458 // Generating Direct collocated stubs.
3459 be_global->gen_direct_collocation (true);
3461 else
3463 ACE_ERROR ((
3464 LM_ERROR,
3465 ACE_TEXT ("IDL: I don't understand ")
3466 ACE_TEXT ("the '%C' option\n"),
3467 av[i]
3469 idl_global->parse_args_exit (1);
3472 else if (av[i][2] == 'o')
3474 if (av[i][3] == 's')
3476 // Generating ostream operators for each type.
3477 this->gen_ostream_operators (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] == 'I')
3492 size_t options = ACE_OS::strlen (av[i]) - 3;
3493 size_t j;
3494 size_t k = i;
3495 // Generate implementation files.
3496 be_global->gen_impl_files (1);
3498 for (j = 0; j < options; ++j)
3500 if (av[k][j + 3] == 's')
3502 idl_global->append_idl_flag (av[i + 1]);
3503 be_global->implementation_skel_ending (av[i + 1]);
3504 ++i;
3506 else if (av[k][j + 3] == 'h')
3508 idl_global->append_idl_flag (av[i + 1]);
3509 be_global->implementation_hdr_ending (av[i + 1]);
3510 ++i;
3512 else if (av[k][j + 3] == 'b')
3514 idl_global->append_idl_flag (av[i + 1]);
3515 be_global->impl_class_prefix (av[i + 1]);
3516 ++i;
3518 else if (av[k][j + 3] == 'e')
3520 idl_global->append_idl_flag (av[i + 1]);
3521 be_global->impl_class_suffix (av[i + 1]);
3522 ++i;
3524 else if (av[k][j + 3] == 'c')
3526 be_global->gen_copy_ctor (true);
3528 else if (av[k][j + 3] == 'a')
3530 be_global->gen_assign_op (true);
3532 else if (av[k][j + 3] == 'd')
3534 be_global->gen_impl_debug_info (true);
3536 else if (ACE_OS::ace_isalpha (av[k][j + 3] ))
3538 ACE_ERROR ((
3539 LM_ERROR,
3540 ACE_TEXT ("IDL: I don't understand")
3541 ACE_TEXT (" the '%C' option\n"),
3542 av[i]
3544 idl_global->parse_args_exit (1);
3548 else if (av[i][2] == 'a' && av[i][3] == 't' && av[i][4] == 'a')
3550 // Generate the AnyTypeCode_Adapter version of the Any insert
3551 // policy - used with the sequences of basic types in the ORB.
3552 be_global->gen_anytypecode_adapter (true);
3554 else
3556 ACE_ERROR ((
3557 LM_ERROR,
3558 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3559 av[i]
3561 idl_global->parse_args_exit (1);
3564 break;
3565 case 'S':
3566 // Suppress generation of...
3567 if (av[i][2] == 'a')
3569 if (av[i][3] == 'l')
3571 // Suppress Any support for local interfaces.
3572 be_global->gen_local_iface_anyops (false);
3574 else if (av[i][3] == 't')
3576 be_global->gen_arg_traits (false);
3578 else
3580 // Suppress all Any support.
3581 be_global->any_support (false);
3584 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])
3586 be_global->gen_svnt_cpp_files (false);
3588 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])
3590 be_global->gen_svnt_t_files (false);
3592 else if (av[i][2] == 'o' && av[i][3] == 'r' && av[i][4] == 'b' && '\0' == av[i][5])
3594 be_global->gen_orb_h_include (false);
3596 else if (av[i][2] == 'f' && av[i][3] == 'r')
3598 // Suppress generation of valuetype factory registration
3599 // in CIAO servants.
3600 be_global->gen_ciao_valuefactory_reg (false);
3602 else if (av[i][2] == 't')
3604 // Suppress typecode generation
3605 // Anys must be suppressed as well.
3606 be_global->tc_support (false);
3607 be_global->any_support (false);
3609 else if (av[i][2] == 'p')
3611 // Suppress generating Thru_POA collocated stubs.
3612 be_global->gen_thru_poa_collocation (false);
3614 else if (av[i][2] == 'd')
3616 // sSppress generating Direct collocated stubs.
3617 be_global->gen_direct_collocation (false);
3619 else if (av[i][2] == 'c')
3621 if (av[i][3] == 'i')
3623 // No stub inline.
3624 be_global->gen_client_inline (false);
3626 else if (av[i][3] == 'c')
3628 // No stub
3629 be_global->gen_client_stub (false);
3631 else if (av[i][3] == 'h')
3633 // No stub
3634 be_global->gen_client_header (false);
3636 else if (av[i][3] == 'd' && av[i][4] == 'r')
3638 // No cdr support.
3639 be_global->cdr_support (false);
3641 else
3643 ACE_ERROR ((
3644 LM_ERROR,
3645 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3646 av[i]
3648 idl_global->parse_args_exit (1);
3651 else if (av[i][2] == 'm')
3653 // Turn off ccm preprocessing.
3654 idl_global->ignore_idl3 (true);
3656 else if (av[i][2] == 'S')
3658 if ('\0' == av[i][3])
3660 // Disable skeleton file generation.
3661 be_global->gen_skel_files (false);
3662 be_global->gen_server_skeleton (false);
3664 else
3666 ACE_ERROR ((
3667 LM_ERROR,
3668 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3669 av[i]
3671 idl_global->parse_args_exit (1);
3674 else if (av[i][2] == 's')
3676 if (av[i][3] == 'c')
3678 // No skeleton inline.
3679 be_global->gen_server_skeleton (false);
3681 else if (av[i][3] == 'h')
3683 // No skeleton inline.
3684 be_global->gen_server_header (false);
3686 else
3688 ACE_ERROR ((
3689 LM_ERROR,
3690 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3691 av[i]
3693 idl_global->parse_args_exit (1);
3696 else if (av[i][2] == 'e')
3698 // Disable custom file endings for included idl/pidl
3699 // files from TAO specific include paths.
3700 be_global->gen_custom_ending (false);
3702 else if (av[i][2] == 'g')
3704 // Disable generation of unique guards.
3705 be_global->gen_unique_guards (false);
3707 else
3709 ACE_ERROR ((
3710 LM_ERROR,
3711 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3712 av[i]
3714 idl_global->parse_args_exit (1);
3717 break;
3718 case 'T':
3719 if (av[i][2] == 'S')
3721 unsigned long ul = ACE_OS::strtoul (av[i + 1], 0, 10);
3722 be_global->tab_size (ul);
3723 ++i;
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 default:
3737 ACE_ERROR ((
3738 LM_ERROR,
3739 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3740 av[i]
3743 idl_global->parse_args_exit (1);