2 //=============================================================================
6 * Stores global data specific to the compiler back end.
8 * @author Jeff Parsons <parsons@cs.wustl.edu>
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"
20 #include "ast_predefined_type.h"
23 #include "utl_identifier.h"
24 #include "utl_string.h"
25 #include "global_extern.h"
26 #include "idl_defines.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_
),
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),
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),
116 gen_noeventccm_ (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),
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)
180 BE_GlobalData::changing_standard_include_files (size_t changing
)
182 this->changing_standard_include_files_
= changing
;
186 BE_GlobalData::changing_standard_include_files ()
188 return this->changing_standard_include_files_
;
191 /************ Helper functions **************/
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)
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
215 const char *base
= nullptr;
217 static const char* extensions
[] = {
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
]);
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.
250 ACE_OS::sprintf (fname
, "%s/", output_path
);
252 // Append the base part to fname.
253 ACE_OS::strncpy (fname
+ ACE_OS::strlen (fname
),
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 '/'.
267 for (char* j
= fname
; *j
!= 0; ++i
, ++j
)
273 if (*(j
+ 1) == '\\')
286 // Append the newextension.
287 ACE_OS::strcat (fname
, new_extension
);
292 BE_GlobalData::be_get_client_hdr (UTL_String
*idl_file_name
,
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
))
306 return be_change_idl_file_extension (idl_file_name
,
309 : be_global
->client_hdr_ending (),
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 ());
321 BE_GlobalData::be_get_client_inline (UTL_String
*idl_file_name
,
324 return be_change_idl_file_extension (idl_file_name
,
325 be_global
->client_inline_ending (),
330 BE_GlobalData::be_get_server_hdr (UTL_String
*idl_file_name
,
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
))
344 return be_change_idl_file_extension (idl_file_name
,
347 : be_global
->server_hdr_ending (),
354 BE_GlobalData::be_get_svnt_template_hdr (UTL_String
*idl_file_name
,
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
))
368 return be_change_idl_file_extension (idl_file_name
,
371 : be_global
->ciao_svnt_header_template_ending (),
378 BE_GlobalData::be_get_implementation_hdr (UTL_String
*idl_file_name
,
381 return be_change_idl_file_extension (idl_file_name
,
382 be_global
->implementation_hdr_ending (),
387 BE_GlobalData::be_get_implementation_skel (UTL_String
*idl_file_name
,
390 return be_change_idl_file_extension (idl_file_name
,
391 be_global
->implementation_skel_ending (),
396 BE_GlobalData::be_get_server_template_hdr (UTL_String
*idl_file_name
,
399 return be_change_idl_file_extension (idl_file_name
,
400 be_global
->server_template_hdr_ending (),
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 (),
417 BE_GlobalData::be_get_server_template_skeleton (UTL_String
*idl_file_name
,
420 return be_change_idl_file_extension (idl_file_name
,
421 be_global
->server_template_skeleton_ending (),
428 BE_GlobalData::be_get_anyop_header (UTL_String
*idl_file_name
,
431 return be_change_idl_file_extension (idl_file_name
,
432 be_global
->anyop_header_ending (),
438 BE_GlobalData::be_get_anyop_source (UTL_String
*idl_file_name
,
441 return be_change_idl_file_extension (idl_file_name
,
442 be_global
->anyop_source_ending (),
448 BE_GlobalData::be_get_ciao_svnt_header (UTL_String
*idl_file_name
,
451 return be_change_idl_file_extension (idl_file_name
,
452 be_global
->ciao_svnt_header_ending (),
457 BE_GlobalData::be_get_ciao_svnt_template_header (UTL_String
*idl_file_name
,
460 return be_change_idl_file_extension (idl_file_name
,
461 be_global
->ciao_svnt_header_template_ending (),
467 BE_GlobalData::be_get_ciao_svnt_source (UTL_String
*idl_file_name
,
470 return be_change_idl_file_extension (idl_file_name
,
471 be_global
->ciao_svnt_source_ending (),
476 BE_GlobalData::be_get_ciao_svnt_template_source (UTL_String
*idl_file_name
,
479 return be_change_idl_file_extension (idl_file_name
,
480 be_global
->ciao_svnt_source_template_ending (),
485 BE_GlobalData::be_get_ciao_exec_header (UTL_String
*idl_file_name
,
488 return be_change_idl_file_extension (idl_file_name
,
489 be_global
->ciao_exec_header_ending (),
497 BE_GlobalData::be_get_ciao_exec_source (UTL_String
*idl_file_name
,
500 return be_change_idl_file_extension (idl_file_name
,
501 be_global
->ciao_exec_source_ending (),
509 BE_GlobalData::be_get_ciao_exec_stub_header (
510 UTL_String
*idl_file_name
,
514 be_change_idl_file_extension (
516 be_global
->ciao_exec_stub_header_ending (),
521 BE_GlobalData::be_get_ciao_exec_idl (
522 UTL_String
*idl_file_name
,
526 be_change_idl_file_extension (
528 be_global
->ciao_exec_idl_ending (),
533 BE_GlobalData::be_get_ciao_conn_header (UTL_String
*idl_file_name
,
536 return be_change_idl_file_extension (idl_file_name
,
537 be_global
->ciao_conn_header_ending (),
542 BE_GlobalData::be_get_ciao_conn_source (UTL_String
*idl_file_name
,
545 return be_change_idl_file_extension (idl_file_name
,
546 be_global
->ciao_conn_source_ending (),
551 BE_GlobalData::be_get_dds_typesupport_header (
552 UTL_String
*idl_file_name
,
556 be_change_idl_file_extension (
558 be_global
->dds_typesupport_hdr_ending (),
563 BE_GlobalData::be_get_ciao_ami_conn_idl (
564 UTL_String
*idl_file_name
,
568 be_change_idl_file_extension (
570 be_global
->ciao_ami_conn_idl_ending (),
575 BE_GlobalData::be_get_ciao_ami_conn_impl_hdr (
576 UTL_String
*idl_file_name
,
580 be_change_idl_file_extension (
582 be_global
->ciao_ami_conn_impl_hdr_ending (),
587 BE_GlobalData::be_get_ciao_ami_conn_impl_src (
588 UTL_String
*idl_file_name
,
592 be_change_idl_file_extension (
594 be_global
->ciao_ami_conn_impl_src_ending (),
599 BE_GlobalData::be_get_client_hdr_fname (
603 be_get_client_hdr (idl_global
->stripped_filename (),
608 BE_GlobalData::be_get_client_stub_fname ()
611 be_get_client_stub (idl_global
->stripped_filename ());
615 BE_GlobalData::be_get_client_inline_fname (
619 be_get_client_inline (idl_global
->stripped_filename (),
624 BE_GlobalData::be_get_server_hdr_fname (
628 be_get_server_hdr (idl_global
->stripped_filename (),
633 BE_GlobalData::be_get_implementation_hdr_fname (
637 be_get_implementation_hdr (idl_global
->stripped_filename (),
642 BE_GlobalData::be_get_implementation_skel_fname (
646 be_get_implementation_skel (idl_global
->stripped_filename (),
651 BE_GlobalData::be_get_server_template_hdr_fname (
655 be_get_server_template_hdr (idl_global
->stripped_filename (),
660 BE_GlobalData::be_get_server_skeleton_fname ()
663 be_get_server_skeleton (idl_global
->stripped_filename ());
667 BE_GlobalData::be_get_implementation_skeleton_fname ()
670 be_get_implementation_skel (idl_global
->stripped_filename ());
674 BE_GlobalData::be_get_server_template_skeleton_fname (
678 be_get_server_template_skeleton (idl_global
->stripped_filename (),
683 BE_GlobalData::be_get_anyop_source_fname (
687 be_get_anyop_source (idl_global
->stripped_filename (),
692 BE_GlobalData::be_get_anyop_header_fname (
696 be_get_anyop_header (idl_global
->stripped_filename (),
701 BE_GlobalData::be_get_ciao_svnt_hdr_fname (bool base_name_only
)
704 be_get_ciao_svnt_header (idl_global
->stripped_filename (),
709 BE_GlobalData::be_get_ciao_tmpl_svnt_hdr_fname (bool base_name_only
)
712 be_get_ciao_svnt_template_header (idl_global
->stripped_filename (),
717 BE_GlobalData::be_get_ciao_svnt_src_fname (
721 be_get_ciao_svnt_source (idl_global
->stripped_filename (),
726 BE_GlobalData::be_get_ciao_tmpl_svnt_src_fname (
730 be_get_ciao_svnt_template_source (idl_global
->stripped_filename (),
735 BE_GlobalData::be_get_ciao_exec_hdr_fname (
739 be_get_ciao_exec_header (idl_global
->stripped_filename (),
744 BE_GlobalData::be_get_ciao_exec_src_fname (
748 be_get_ciao_exec_source (idl_global
->stripped_filename (),
753 BE_GlobalData::be_get_ciao_exec_stub_hdr_fname (
757 be_get_ciao_exec_stub_header (
758 idl_global
->stripped_filename (),
763 BE_GlobalData::be_get_ciao_exec_idl_fname (
767 be_get_ciao_exec_idl (
768 idl_global
->stripped_filename (),
773 BE_GlobalData::be_get_ciao_conn_hdr_fname (
777 be_get_ciao_conn_header (idl_global
->stripped_filename (),
782 BE_GlobalData::be_get_ciao_conn_src_fname (
786 be_get_ciao_conn_source (idl_global
->stripped_filename (),
791 BE_GlobalData::be_get_ciao_ami_conn_idl_fname (
795 be_get_ciao_ami_conn_idl (idl_global
->stripped_filename (),
800 BE_GlobalData::be_get_ciao_ami_conn_impl_hdr_fname (
804 be_get_ciao_ami_conn_impl_hdr (idl_global
->stripped_filename (),
809 BE_GlobalData::be_get_ciao_ami_conn_impl_src_fname (
813 be_get_ciao_ami_conn_impl_src (idl_global
->stripped_filename (),
818 BE_GlobalData::skel_export_macro () const
820 if (this->skel_export_macro_
== nullptr)
825 return this->skel_export_macro_
;
829 BE_GlobalData::skel_export_macro (const char *s
)
831 ACE::strdelete (this->skel_export_macro_
);
832 this->skel_export_macro_
= ACE::strnew (s
);
836 BE_GlobalData::skel_export_include () const
838 return this->skel_export_include_
;
842 BE_GlobalData::skel_export_include (const char *s
)
844 ACE::strdelete (this->skel_export_include_
);
845 this->skel_export_include_
= ACE::strnew (s
);
849 BE_GlobalData::skel_export_file () const
851 return this->skel_export_file_
;
855 BE_GlobalData::skel_export_file (const char *s
)
857 ACE::strdelete (this->skel_export_file_
);
858 this->skel_export_file_
= ACE::strnew (s
);
862 BE_GlobalData::stub_export_macro () const
864 if (this->stub_export_macro_
== nullptr)
869 return this->stub_export_macro_
;
873 BE_GlobalData::stub_export_macro (const char *s
)
875 ACE::strdelete (this->stub_export_macro_
);
876 this->stub_export_macro_
= ACE::strnew (s
);
880 BE_GlobalData::stub_export_include () const
882 return this->stub_export_include_
;
886 BE_GlobalData::stub_export_include (const char *s
)
888 ACE::strdelete (this->stub_export_include_
);
889 this->stub_export_include_
= ACE::strnew (s
);
893 BE_GlobalData::stub_export_file () const
895 return this->stub_export_file_
;
899 BE_GlobalData::stub_export_file (const char *s
)
901 ACE::strdelete (this->stub_export_file_
);
902 this->stub_export_file_
= ACE::strnew (s
);
906 BE_GlobalData::anyop_export_macro () const
908 if (this->anyop_export_macro_
== nullptr)
913 return this->anyop_export_macro_
;
917 BE_GlobalData::anyop_export_macro (const char *s
)
919 ACE::strdelete (this->anyop_export_macro_
);
920 this->anyop_export_macro_
= ACE::strnew (s
);
924 BE_GlobalData::anyop_export_include () const
926 return this->anyop_export_include_
;
930 BE_GlobalData::anyop_export_include (const char *s
)
932 ACE::strdelete (this->anyop_export_include_
);
933 this->anyop_export_include_
= ACE::strnew (s
);
937 BE_GlobalData::exec_export_macro () const
939 if (this->exec_export_macro_
== nullptr)
944 return this->exec_export_macro_
;
948 BE_GlobalData::exec_export_macro (const char *s
)
950 ACE::strdelete (this->exec_export_macro_
);
951 this->exec_export_macro_
= ACE::strnew (s
);
955 BE_GlobalData::exec_export_include () const
957 return this->exec_export_include_
;
961 BE_GlobalData::exec_export_include (const char *s
)
963 ACE::strdelete (this->exec_export_include_
);
964 this->exec_export_include_
= ACE::strnew (s
);
968 BE_GlobalData::svnt_export_macro () const
970 if (this->svnt_export_macro_
== nullptr)
975 return this->svnt_export_macro_
;
979 BE_GlobalData::svnt_export_macro (const char *s
)
981 ACE::strdelete (this->svnt_export_macro_
);
982 this->svnt_export_macro_
= ACE::strnew (s
);
986 BE_GlobalData::svnt_export_include () const
988 return this->svnt_export_include_
;
992 BE_GlobalData::svnt_export_include (const char *s
)
994 ACE::strdelete (this->svnt_export_include_
);
995 this->svnt_export_include_
= ACE::strnew (s
);
999 BE_GlobalData::conn_export_macro () const
1001 if (this->conn_export_macro_
== nullptr)
1006 return this->conn_export_macro_
;
1010 BE_GlobalData::conn_export_macro (const char *s
)
1012 ACE::strdelete (this->conn_export_macro_
);
1013 this->conn_export_macro_
= ACE::strnew (s
);
1017 BE_GlobalData::conn_export_include () const
1019 return this->conn_export_include_
;
1023 BE_GlobalData::conn_export_include (const char *s
)
1025 ACE::strdelete (this->conn_export_include_
);
1026 this->conn_export_include_
= ACE::strnew (s
);
1030 BE_GlobalData::pch_include () const
1032 return this->pch_include_
;
1036 BE_GlobalData::pch_include (const char *s
)
1038 ACE::strdelete (this->pch_include_
);
1039 this->pch_include_
= ACE::strnew (s
);
1043 BE_GlobalData::pre_include () const
1045 return this->pre_include_
;
1049 BE_GlobalData::pre_include (const char *s
)
1051 ACE::strdelete (this->pre_include_
);
1052 this->pre_include_
= ACE::strnew (s
);
1056 BE_GlobalData::post_include () const
1058 return this->post_include_
;
1062 BE_GlobalData::post_include (const char *s
)
1064 ACE::strdelete (this->post_include_
);
1065 this->post_include_
= ACE::strnew (s
);
1069 BE_GlobalData::include_guard () const
1071 return this->include_guard_
;
1075 BE_GlobalData::include_guard (const char *s
)
1077 ACE::strdelete (this->include_guard_
);
1078 this->include_guard_
= ACE::strnew (s
);
1082 BE_GlobalData::safe_include () const
1084 return this->safe_include_
;
1088 BE_GlobalData::safe_include (const char *s
)
1090 ACE::strdelete (this->safe_include_
);
1091 this->safe_include_
= ACE::strnew (s
);
1095 BE_GlobalData::unique_include () const
1097 return this->unique_include_
;
1101 BE_GlobalData::unique_include (const char *s
)
1103 ACE::strdelete (this->unique_include_
);
1104 this->unique_include_
= ACE::strnew (s
);
1108 BE_GlobalData::stripped_filename () const
1110 return this->stripped_filename_
;
1114 BE_GlobalData::stripped_filename (const char *s
)
1116 ACE::strdelete (this->stripped_filename_
);
1117 this->stripped_filename_
= ACE::strnew (s
);
1121 BE_GlobalData::versioning_begin () const
1123 return this->versioning_begin_
.c_str ();
1127 BE_GlobalData::versioning_include (const char * s
)
1129 this->versioning_include_
= s
;
1133 BE_GlobalData::versioning_include () const
1135 return this->versioning_include_
.c_str ();
1139 BE_GlobalData::core_versioning_begin () const
1141 return this->core_versioning_begin_
.c_str ();
1145 BE_GlobalData::versioning_end (const char * s
)
1147 this->versioning_end_
=
1148 ACE_CString ("\n\n")
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";
1161 BE_GlobalData::versioning_begin (const char * s
)
1163 this->versioning_begin_
=
1164 ACE_CString ("\n\n")
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_
;
1177 BE_GlobalData::versioning_end () const
1179 return this->versioning_end_
.c_str ();
1183 BE_GlobalData::core_versioning_end () const
1185 return this->core_versioning_end_
.c_str ();
1189 BE_GlobalData::anyops_versioning_begin () const
1191 return this->anyops_versioning_begin_
.c_str ();
1195 BE_GlobalData::anyops_versioning_end () const
1197 return this->anyops_versioning_end_
.c_str ();
1200 // Set the client_hdr_ending.
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.
1210 BE_GlobalData::client_hdr_ending () const
1212 return this->client_hdr_ending_
;
1216 BE_GlobalData::client_inline_ending (const char* s
)
1218 ACE::strdelete (client_inline_ending_
);
1219 this->client_inline_ending_
= ACE::strnew (s
);
1223 BE_GlobalData::client_inline_ending () const
1225 return this->client_inline_ending_
;
1228 // Set the client_stub_ending.
1230 BE_GlobalData::client_stub_ending (const char* s
)
1232 ACE::strdelete (this->client_stub_ending_
);
1233 this->client_stub_ending_
= ACE::strnew (s
);
1237 BE_GlobalData::client_stub_ending () const
1239 return this->client_stub_ending_
;
1243 BE_GlobalData::server_hdr_ending (const char* s
)
1245 ACE::strdelete (this->server_hdr_ending_
);
1246 this->server_hdr_ending_
= ACE::strnew (s
);
1250 BE_GlobalData::server_hdr_ending () const
1252 return this->server_hdr_ending_
;
1256 BE_GlobalData::implementation_hdr_ending (const char* s
)
1258 ACE::strdelete (this->implementation_hdr_ending_
);
1259 this->implementation_hdr_ending_
= ACE::strnew (s
);
1263 BE_GlobalData::implementation_skel_ending (const char* s
)
1265 ACE::strdelete (this->implementation_skel_ending_
);
1266 this->implementation_skel_ending_
= ACE::strnew (s
);
1270 BE_GlobalData::impl_class_prefix (const char* s
)
1272 ACE::strdelete (this->impl_class_prefix_
);
1273 this->impl_class_prefix_
= ACE::strnew (s
);
1277 BE_GlobalData::impl_class_suffix (const char* s
)
1279 ACE::strdelete (this->impl_class_suffix_
);
1280 this->impl_class_suffix_
= ACE::strnew (s
);
1284 BE_GlobalData::impl_class_prefix () const
1286 return this->impl_class_prefix_
;
1290 BE_GlobalData::implementation_hdr_ending () const
1292 return this->implementation_hdr_ending_
;
1296 BE_GlobalData::impl_class_suffix () const
1298 return this->impl_class_suffix_
;
1302 BE_GlobalData::implementation_skel_ending () const
1304 return this->implementation_skel_ending_
;
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
);
1315 BE_GlobalData::server_template_hdr_ending () const
1317 return this->server_template_hdr_ending_
;
1321 BE_GlobalData::server_skeleton_ending (const char* s
)
1323 ACE::strdelete (this->server_skeleton_ending_
);
1324 this->server_skeleton_ending_
= ACE::strnew (s
);
1328 BE_GlobalData::server_skeleton_ending () const
1330 return this->server_skeleton_ending_
;
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
);
1341 BE_GlobalData::server_template_skeleton_ending () const
1343 return this->server_template_skeleton_ending_
;
1347 BE_GlobalData::anyop_header_ending (const char* s
)
1349 ACE::strdelete (this->anyop_hdr_ending_
);
1350 this->anyop_hdr_ending_
= ACE::strnew (s
);
1354 BE_GlobalData::use_clonable_in_args (bool clonable
)
1356 this->use_clonable_in_args_
= clonable
;
1360 BE_GlobalData::use_clonable_in_args () const
1362 return this->use_clonable_in_args_
;
1366 BE_GlobalData::gen_template_export () const
1368 return this->gen_template_export_
;
1372 BE_GlobalData::gen_template_export (bool val
)
1374 this->gen_template_export_
= val
;
1378 BE_GlobalData::gen_ostream_operators () const
1380 return this->gen_ostream_operators_
;
1384 BE_GlobalData::gen_ostream_operators (bool val
)
1386 this->gen_ostream_operators_
= val
;
1391 BE_GlobalData::gen_static_desc_operations () const
1393 return this->gen_static_desc_operations_
;
1397 BE_GlobalData::gen_static_desc_operations (bool val
)
1399 this->gen_static_desc_operations_
= val
;
1403 BE_GlobalData::anyop_header_ending () const
1405 return this->anyop_hdr_ending_
;
1409 BE_GlobalData::anyop_source_ending (const char* s
)
1411 ACE::strdelete (this->anyop_src_ending_
);
1412 this->anyop_src_ending_
= ACE::strnew (s
);
1416 BE_GlobalData::anyop_source_ending () const
1418 return this->anyop_src_ending_
;
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
);
1429 BE_GlobalData::ciao_svnt_header_ending () const
1431 return this->ciao_svnt_hdr_ending_
;
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
);
1442 BE_GlobalData::ciao_svnt_source_ending () const
1444 return this->ciao_svnt_src_ending_
;
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
);
1455 BE_GlobalData::ciao_svnt_header_template_ending () const
1457 return this->ciao_svnt_hdr_template_ending_
;
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
);
1468 BE_GlobalData::ciao_svnt_source_template_ending () const
1470 return this->ciao_svnt_src_template_ending_
;
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
);
1481 BE_GlobalData::ciao_exec_header_ending () const
1483 return this->ciao_exec_hdr_ending_
;
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
);
1494 BE_GlobalData::ciao_exec_source_ending () const
1496 return this->ciao_exec_src_ending_
;
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
);
1507 BE_GlobalData::ciao_exec_stub_header_ending () const
1509 return this->ciao_exec_stub_hdr_ending_
;
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
);
1520 BE_GlobalData::ciao_exec_idl_ending () const
1522 return this->ciao_exec_idl_ending_
;
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
);
1533 BE_GlobalData::ciao_conn_header_ending () const
1535 return this->ciao_conn_hdr_ending_
;
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
);
1546 BE_GlobalData::ciao_conn_source_ending () const
1548 return this->ciao_conn_src_ending_
;
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
);
1559 BE_GlobalData::dds_typesupport_hdr_ending () const
1561 return this->dds_typesupport_hdr_ending_
;
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
);
1572 BE_GlobalData::ciao_ami_conn_idl_ending () const
1574 return this->ciao_ami_conn_idl_ending_
;
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
);
1585 BE_GlobalData::ciao_ami_conn_impl_hdr_ending () const
1587 return this->ciao_ami_conn_impl_hdr_ending_
;
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
);
1598 BE_GlobalData::ciao_ami_conn_impl_src_ending () const
1600 return this->ciao_ami_conn_impl_src_ending_
;
1604 BE_GlobalData::ciao_container_type (const char* s
)
1606 ACE::strdelete (this->ciao_container_type_
);
1607 this->ciao_container_type_
= ACE::strnew (s
);
1611 BE_GlobalData::ciao_container_type () const
1613 return this->ciao_container_type_
;
1617 BE_GlobalData::output_dir (const char* s
)
1619 ACE::strdelete (this->output_dir_
);
1620 this->output_dir_
= ACE::strnew (s
);
1624 BE_GlobalData::output_dir () const
1626 return this->output_dir_
;
1629 BE_GlobalData::overwrite_not_exec () const
1631 return this->overwrite_not_exec_
;
1635 BE_GlobalData::overwrite_not_exec (bool val
)
1637 this->overwrite_not_exec_
= val
;
1641 BE_GlobalData::skel_output_dir (const char* s
)
1643 ACE::strdelete (this->skel_output_dir_
);
1644 this->skel_output_dir_
= ACE::strnew (s
);
1648 BE_GlobalData::skel_output_dir () const
1650 return this->skel_output_dir_
;
1654 BE_GlobalData::stub_include_dir (const char* s
)
1656 ACE::strdelete (this->stub_include_dir_
);
1657 this->stub_include_dir_
= ACE::strnew (s
);
1661 BE_GlobalData::stub_include_dir () const
1663 return this->stub_include_dir_
;
1667 BE_GlobalData::anyop_output_dir (const char* s
)
1669 ACE::strdelete (this->anyop_output_dir_
);
1670 this->anyop_output_dir_
= ACE::strnew (s
);
1674 BE_GlobalData::anyop_output_dir () const
1676 return this->anyop_output_dir_
;
1680 BE_GlobalData::exec_output_dir (const char* s
)
1682 ACE::strdelete (this->exec_output_dir_
);
1683 this->exec_output_dir_
= ACE::strnew (s
);
1687 BE_GlobalData::exec_output_dir () const
1689 return this->exec_output_dir_
;
1692 BE_GlobalData::any_support (bool val
)
1694 this->any_support_
= val
;
1698 BE_GlobalData::any_support () const
1700 return this->any_support_
;
1704 BE_GlobalData::cdr_support (bool val
)
1706 this->cdr_support_
= val
;
1710 BE_GlobalData::cdr_support () const
1712 return this->cdr_support_
;
1716 BE_GlobalData::tc_support (bool val
)
1718 this->tc_support_
= val
;
1722 BE_GlobalData::tc_support () const
1724 return this->tc_support_
;
1728 BE_GlobalData::obv_opt_accessor (bool val
)
1730 this->obv_opt_accessor_
= val
;
1734 BE_GlobalData::obv_opt_accessor () const
1736 return this->obv_opt_accessor_
;
1740 BE_GlobalData::gen_impl_files (bool val
)
1742 this->gen_impl_files_
= val
;
1746 BE_GlobalData::gen_impl_files () const
1748 return this->gen_impl_files_
;
1752 BE_GlobalData::gen_impl_debug_info (bool val
)
1754 this->gen_impl_debug_info_
= val
;
1758 BE_GlobalData::gen_impl_debug_info () const
1760 return this->gen_impl_debug_info_
;
1764 BE_GlobalData::gen_copy_ctor (bool val
)
1766 this->gen_copy_ctor_
= val
;
1770 BE_GlobalData::gen_copy_ctor () const
1772 return this->gen_copy_ctor_
;
1776 BE_GlobalData::gen_assign_op (bool val
)
1778 this->gen_assign_op_
= val
;
1782 BE_GlobalData::gen_assign_op () const
1784 return this->gen_assign_op_
;
1788 BE_GlobalData::gen_thru_poa_collocation (bool val
)
1790 this->gen_thru_poa_collocation_
= val
;
1794 BE_GlobalData::gen_thru_poa_collocation () const
1796 return this->gen_thru_poa_collocation_
;
1800 BE_GlobalData::gen_direct_collocation (bool val
)
1802 this->gen_direct_collocation_
= val
;
1806 BE_GlobalData::gen_direct_collocation () const
1808 return this->gen_direct_collocation_
;
1812 BE_GlobalData::gen_corba_e (bool val
)
1814 this->gen_corba_e_
= val
;
1818 BE_GlobalData::gen_corba_e () const
1820 return this->gen_corba_e_
;
1824 BE_GlobalData::gen_minimum_corba (bool val
)
1826 this->gen_minimum_corba_
= val
;
1830 BE_GlobalData::gen_minimum_corba () const
1832 return this->gen_minimum_corba_
;
1836 BE_GlobalData::gen_noeventccm (bool val
)
1838 this->gen_noeventccm_
= val
;
1842 BE_GlobalData::gen_noeventccm () const
1844 return this->gen_noeventccm_
;
1848 BE_GlobalData::gen_lwccm (bool val
)
1850 this->gen_lwccm_
= val
;
1854 BE_GlobalData::gen_lwccm () const
1856 return this->gen_lwccm_
;
1861 BE_GlobalData::opt_tc (bool val
)
1863 this->opt_tc_
= val
;
1867 BE_GlobalData::opt_tc () const
1869 return this->opt_tc_
;
1873 BE_GlobalData::ami4ccm_call_back (bool val
)
1875 this->ami4ccm_call_back_
= val
;
1879 BE_GlobalData::ami4ccm_call_back () const
1881 return this->ami4ccm_call_back_
;
1885 BE_GlobalData::ami_call_back (bool val
)
1887 this->ami_call_back_
= val
;
1891 BE_GlobalData::ami_call_back () const
1893 return this->ami_call_back_
;
1897 BE_GlobalData::gen_amh_classes (bool val
)
1899 this->gen_amh_classes_
= val
;
1903 BE_GlobalData::gen_amh_classes () const
1905 return this->gen_amh_classes_
;
1909 BE_GlobalData::gen_tie_classes (bool val
)
1911 this->gen_tie_classes_
= val
;
1915 BE_GlobalData::gen_tie_classes () const
1917 return this->gen_tie_classes_
;
1921 BE_GlobalData::gen_smart_proxies (bool val
)
1923 this->gen_smart_proxies_
= val
;
1927 BE_GlobalData::gen_smart_proxies () const
1929 return this->gen_smart_proxies_
;
1933 BE_GlobalData::gen_inline_constants (bool val
)
1935 this->gen_inline_constants_
= val
;
1939 BE_GlobalData::gen_inline_constants () const
1941 return this->gen_inline_constants_
;
1945 BE_GlobalData::gen_orb_h_include (bool val
)
1947 this->gen_orb_h_include_
= val
;
1951 BE_GlobalData::gen_orb_h_include () const
1953 return this->gen_orb_h_include_
;
1957 BE_GlobalData::gen_empty_anyop_header (bool val
)
1959 this->gen_empty_anyop_header_
= val
;
1963 BE_GlobalData::gen_empty_anyop_header () const
1965 return this->gen_empty_anyop_header_
;
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_
;
1981 BE_GlobalData::dds_impl (char const * const val
)
1983 ACE_CString
tmp (val
, nullptr, false);
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
;
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 (),
2011 BE_GlobalData::DDS_IMPL
2012 BE_GlobalData::dds_impl () const
2014 return this->dds_impl_
;
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
)
2209 AST_PredefinedType
*
2210 BE_GlobalData:: void_type ()
2212 if (nullptr == this->void_type_
)
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_
;
2225 BE_GlobalData::ccmobject ()
2227 if (nullptr == this->ccmobject_
)
2229 Identifier
*local_id
= nullptr;
2230 ACE_NEW_RETURN (local_id
,
2231 Identifier ("CCMObject"),
2233 UTL_ScopedName
*local_name
= nullptr;
2234 ACE_NEW_RETURN (local_name
,
2235 UTL_ScopedName (local_id
, nullptr),
2238 Identifier
*module_id
= nullptr;
2239 ACE_NEW_RETURN (module_id
,
2240 Identifier ("Components"),
2242 UTL_ScopedName
sn (module_id
,
2246 idl_global
->scopes ().top_non_null ()->lookup_by_name (&sn
,
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_
;
2266 BE_GlobalData::messaging ()
2268 if (nullptr == this->messaging_
)
2270 Identifier
*id
= nullptr;
2271 UTL_ScopedName
*sn
= nullptr;
2274 Identifier ("Messaging"),
2282 ACE_NEW_RETURN (this->messaging_
,
2286 this->messaging_
->set_name (sn
);
2289 return this->messaging_
;
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
);
2302 Identifier ("Messaging"),
2305 // Create a valuetype "ExceptionHolder"
2306 // from which we inherit.
2307 UTL_ScopedName
*full_name
= nullptr;
2308 ACE_NEW_RETURN (full_name
,
2314 Identifier ("ExceptionHolder"),
2317 UTL_ScopedName
*local_name
= nullptr;
2318 ACE_NEW_RETURN (local_name
,
2323 full_name
->nconc (local_name
);
2325 ACE_NEW_RETURN (this->messaging_exceptionholder_
,
2326 be_valuetype (full_name
,
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_
;
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.
2372 Identifier ("Messaging"),
2375 UTL_ScopedName
*full_name
= nullptr;
2376 ACE_NEW_RETURN (full_name
,
2382 Identifier ("ReplyHandler"),
2385 ACE_NEW_RETURN (local_name
,
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
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_
;
2416 BE_GlobalData::gen_anyop_files () const
2418 return this->gen_anyop_files_
;
2422 BE_GlobalData::gen_anyop_files (bool val
)
2424 this->gen_anyop_files_
= val
;
2428 BE_GlobalData::gen_skel_files () const
2430 return this->gen_skel_files_
;
2434 BE_GlobalData::gen_skel_files (bool val
)
2436 this->gen_skel_files_
= val
;
2440 BE_GlobalData::gen_svnt_cpp_files () const
2442 return this->gen_svnt_cpp_files_
;
2446 BE_GlobalData::gen_svnt_cpp_files (bool val
)
2448 this->gen_svnt_cpp_files_
= val
;
2452 BE_GlobalData::gen_svnt_t_files () const
2454 return this->gen_svnt_t_files_
;
2458 BE_GlobalData::gen_svnt_t_files (bool val
)
2460 this->gen_svnt_t_files_
= val
;
2464 BE_GlobalData::gen_client_inline () const
2466 return this->gen_client_inline_
;
2470 BE_GlobalData::gen_client_inline (bool val
)
2472 this->gen_client_inline_
= val
;
2476 BE_GlobalData::gen_client_stub () const
2478 return this->gen_client_stub_
;
2482 BE_GlobalData::gen_client_stub (bool val
)
2484 this->gen_client_stub_
= val
;
2488 BE_GlobalData::gen_client_header () const
2490 return this->gen_client_header_
;
2494 BE_GlobalData::gen_client_header (bool val
)
2496 this->gen_client_header_
= val
;
2500 BE_GlobalData::gen_server_skeleton () const
2502 return this->gen_server_skeleton_
;
2506 BE_GlobalData::gen_server_skeleton (bool val
)
2508 this->gen_server_skeleton_
= val
;
2512 BE_GlobalData::gen_server_header () const
2514 return this->gen_server_header_
;
2518 BE_GlobalData::gen_server_header (bool val
)
2520 this->gen_server_header_
= val
;
2524 BE_GlobalData::gen_local_iface_anyops () const
2526 return this->gen_local_iface_anyops_
;
2530 BE_GlobalData::gen_local_iface_anyops (bool val
)
2532 this->gen_local_iface_anyops_
= val
;
2536 BE_GlobalData::gen_custom_ending () const
2538 return this->gen_custom_ending_
;
2542 BE_GlobalData::gen_custom_ending (bool val
)
2544 this->gen_custom_ending_
= val
;
2548 BE_GlobalData::gen_unique_guards () const
2550 return this->gen_unique_guards_
;
2554 BE_GlobalData::gen_unique_guards (bool val
)
2556 this->gen_unique_guards_
= val
;
2560 BE_GlobalData::gen_ciao_svnt () const
2562 return this->gen_ciao_svnt_
;
2566 BE_GlobalData::gen_ciao_svnt (bool val
)
2568 this->gen_ciao_svnt_
= val
;
2572 BE_GlobalData::gen_ciao_exec_idl () const
2574 return this->gen_ciao_exec_idl_
;
2578 BE_GlobalData::gen_ciao_exec_idl (bool val
)
2580 this->gen_ciao_exec_idl_
= val
;
2584 BE_GlobalData::gen_ciao_exec_impl () const
2586 return this->gen_ciao_exec_impl_
;
2590 BE_GlobalData::gen_ciao_exec_impl (bool val
)
2592 this->gen_ciao_exec_impl_
= val
;
2596 BE_GlobalData::gen_ciao_exec_reactor_impl () const
2598 return this->gen_ciao_exec_reactor_impl_
;
2602 BE_GlobalData::gen_ciao_exec_reactor_impl (bool val
)
2604 this->gen_ciao_exec_reactor_impl_
= val
;
2608 BE_GlobalData::gen_ciao_conn_impl () const
2610 return this->gen_ciao_conn_impl_
;
2614 BE_GlobalData::gen_ciao_conn_impl (bool val
)
2616 this->gen_ciao_conn_impl_
= val
;
2620 BE_GlobalData::gen_dds_typesupport_idl () const
2622 return this->gen_dds_typesupport_idl_
;
2626 BE_GlobalData::gen_dds_typesupport_idl (bool val
)
2628 this->gen_dds_typesupport_idl_
= val
;
2632 BE_GlobalData::gen_ciao_valuefactory_reg () const
2634 return this->gen_ciao_valuefactory_reg_
;
2638 BE_GlobalData::gen_ciao_valuefactory_reg (bool val
)
2640 this->gen_ciao_valuefactory_reg_
= val
;
2644 BE_GlobalData::gen_stub_export_hdr_file () const
2646 return this->gen_stub_export_hdr_file_
;
2650 BE_GlobalData::gen_stub_export_hdr_file (bool val
)
2652 this->gen_stub_export_hdr_file_
= val
;
2656 BE_GlobalData::gen_skel_export_hdr_file () const
2658 return this->gen_skel_export_hdr_file_
;
2662 BE_GlobalData::gen_skel_export_hdr_file (bool val
)
2664 this->gen_skel_export_hdr_file_
= val
;
2668 BE_GlobalData::gen_svnt_export_hdr_file () const
2670 return this->gen_svnt_export_hdr_file_
;
2674 BE_GlobalData::gen_svnt_export_hdr_file (bool val
)
2676 this->gen_svnt_export_hdr_file_
= val
;
2680 BE_GlobalData::gen_exec_export_hdr_file () const
2682 return this->gen_exec_export_hdr_file_
;
2686 BE_GlobalData::gen_exec_export_hdr_file (bool val
)
2688 this->gen_exec_export_hdr_file_
= val
;
2692 BE_GlobalData::gen_conn_export_hdr_file () const
2694 return this->gen_conn_export_hdr_file_
;
2698 BE_GlobalData::gen_conn_export_hdr_file (bool val
)
2700 this->gen_conn_export_hdr_file_
= val
;
2704 BE_GlobalData::alt_mapping () const
2706 return this->alt_mapping_
;
2710 BE_GlobalData::alt_mapping (bool val
)
2712 this->alt_mapping_
= val
;
2716 BE_GlobalData::in_facet_servant () const
2718 return this->in_facet_servant_
;
2722 BE_GlobalData::in_facet_servant (bool val
)
2724 this->in_facet_servant_
= val
;
2728 BE_GlobalData::gen_arg_traits () const
2730 return this->gen_arg_traits_
;
2734 BE_GlobalData::gen_arg_traits (bool val
)
2736 this->gen_arg_traits_
= val
;
2740 BE_GlobalData::gen_anytypecode_adapter () const
2742 return this->gen_anytypecode_adapter_
;
2746 BE_GlobalData::gen_anytypecode_adapter (bool val
)
2748 this->gen_anytypecode_adapter_
= val
;
2752 BE_GlobalData::no_fixed_err () const
2754 return this->no_fixed_err_
;
2758 BE_GlobalData::no_fixed_err (bool val
)
2760 this->no_fixed_err_
= val
;
2764 BE_GlobalData::tab_size () const
2766 return this->tab_size_
;
2770 BE_GlobalData::tab_size (unsigned long val
)
2772 this->tab_size_
= val
;
2776 BE_GlobalData::spawn_options ()
2778 return idl_global
->idl_flags ();
2782 BE_GlobalData::parse_args (long &i
, char **av
)
2786 // = Various 'h'eader_file_name_endings.
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]);
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]);
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]);
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]);
2829 // I expect 'c' or 's' or 'I' or 'T' after this.
2832 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2835 idl_global
->parse_args_exit (1);
2839 if (av
[i
][2] == '\0')
2841 be_global
->use_clonable_in_args(true);
2847 ACE_TEXT ("IDL: I don't understand")
2848 ACE_TEXT (" the '%C' option\n"),
2851 idl_global
->parse_args_exit (1);
2854 // = Various 'c'lient side stub file_name_endings.
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]);
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]);
2875 // I expect 's' or 'i' after 'c'.
2878 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2881 idl_global
->parse_args_exit (1);
2884 // = Various 's'erver side skeleton file name endings.
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]);
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]);
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]);
2913 // I expect 's' or 'T' or or 't' after 's'.
2916 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2919 idl_global
->parse_args_exit (1);
2922 // Operation lookup strategy.
2923 // <perfect_hash>, <dynamic_hash> or <binary_search>
2924 // Default is perfect.
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
);
2952 ACE_ERROR ((LM_ERROR
,
2953 ACE_TEXT ("%C: unknown operation lookup <%C>\n"),
2956 idl_global
->parse_args_exit (1);
2961 // Switching between ""s and <>s when we generate
2962 // #include statements for the standard files (e.g. tao/corba.h)
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]);
2983 ACE_TEXT ("IDL: I don't understand")
2984 ACE_TEXT (" the '%C' option\n"),
2987 idl_global
->parse_args_exit (1);
2994 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
2997 idl_global
->parse_args_exit (1);
3001 // Path for the perfect hash generator(gperf) program. Default
3002 // is $ACE_ROOT/bin/ace_gperf.
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";
3015 idl_global
->gperf_path (tmp
.fast_rep ());
3022 ACE_TEXT ("IDL: I don't understand")
3023 ACE_TEXT (" the '%C' option\n"),
3026 idl_global
->parse_args_exit (1);
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.
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
)
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
)
3049 ACE_TEXT ("IDL: unable to create directory %C")
3050 ACE_TEXT (" specified by -o option\n"),
3053 idl_global
->parse_args_exit (1);
3056 be_global
->output_dir (av
[i
+ 1]);
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
)
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
)
3076 ACE_TEXT ("IDL: unable to create directory %C")
3077 ACE_TEXT (" specified by -oA option\n"),
3081 idl_global
->parse_args_exit (1);
3084 be_global
->anyop_output_dir (av
[i
+ 1]);
3091 ACE_TEXT ("IDL: I don't understand")
3092 ACE_TEXT (" the '%C' option\n"),
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
)
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
)
3115 ACE_TEXT ("IDL: unable to create directory %C")
3116 ACE_TEXT (" specified by -oE option\n"),
3120 idl_global
->parse_args_exit (1);
3123 be_global
->exec_output_dir (av
[i
+ 1]);
3130 ACE_TEXT ("IDL: I don't understand")
3131 ACE_TEXT (" the '%C' option\n"),
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);
3148 ACE_TEXT ("IDL: I don't understand")
3149 ACE_TEXT (" the '%C' option\n"),
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
)
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
)
3172 ACE_TEXT ("IDL: unable to create directory %C")
3173 ACE_TEXT (" specified by -oS option\n"),
3177 idl_global
->parse_args_exit (1);
3180 be_global
->skel_output_dir (av
[i
+ 1]);
3187 ACE_TEXT ("IDL: I don't understand")
3188 ACE_TEXT (" the '%C' option\n"),
3191 idl_global
->parse_args_exit (1);
3198 ACE_TEXT ("IDL: I don't understand")
3199 ACE_TEXT (" the '%C' option\n"),
3202 idl_global
->parse_args_exit (1);
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')
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);
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);
3255 else if (av
[i
][2] == 's' && av
[i
][3] == 'd')
3257 // Generate static description operations
3258 be_global
->gen_static_desc_operations (true);
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);
3274 else if (av
[i
][2] == 's')
3276 if (av
[i
][3] == 'p')
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
3295 be_global
->alt_mapping (true);
3301 ACE_TEXT ("IDL: I don't understand ")
3302 ACE_TEXT ("the '%C' option\n"),
3305 idl_global
->parse_args_exit (1);
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);
3332 ACE_TEXT ("IDL: I don't understand ")
3333 ACE_TEXT ("the '%s' option\n"),
3336 idl_global
->parse_args_exit (1);
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);
3353 ACE_TEXT ("IDL: I don't understand ")
3354 ACE_TEXT ("the '%s' option\n"),
3357 idl_global
->parse_args_exit (1);
3366 ACE_TEXT ("IDL: I don't understand ")
3367 ACE_TEXT ("the '%s' option\n"),
3370 idl_global
->parse_args_exit (1);
3375 else if (av
[i
][2] == 'u')
3377 if (av
[i
][3] == 'c')
3379 // Inline constants.
3380 be_global
->gen_inline_constants (false);
3386 ACE_TEXT ("IDL: I don't understand ")
3387 ACE_TEXT ("the '%C' option\n"),
3390 idl_global
->parse_args_exit (1);
3395 else if (av
[i
][2] == 'c')
3397 if (av
[i
][3] == 'e')
3400 be_global
->gen_corba_e (true);
3402 else if (av
[i
][3] == 'l')
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);
3416 ACE_TEXT ("IDL: I don't understand ")
3417 ACE_TEXT ("the '%C' option\n"),
3420 idl_global
->parse_args_exit (1);
3424 else if (av
[i
][2] == 'm')
3426 if (av
[i
][3] == 'c')
3429 be_global
->gen_minimum_corba (true);
3435 ACE_TEXT ("IDL: I don't understand ")
3436 ACE_TEXT ("the '%C' option\n"),
3439 idl_global
->parse_args_exit (1);
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);
3463 ACE_TEXT ("IDL: I don't understand ")
3464 ACE_TEXT ("the '%s' option\n"),
3467 idl_global
->parse_args_exit (1);
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);
3483 ACE_TEXT ("IDL: I don't understand ")
3484 ACE_TEXT ("the '%C' option\n"),
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);
3501 ACE_TEXT ("IDL: I don't understand ")
3502 ACE_TEXT ("the '%C' option\n"),
3505 idl_global
->parse_args_exit (1);
3508 else if (av
[i
][2] == 'I')
3510 size_t options
= ACE_OS::strlen (av
[i
]) - 3;
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]);
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]);
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]);
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]);
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] ))
3558 ACE_TEXT ("IDL: I don't understand")
3559 ACE_TEXT (" the '%C' option\n"),
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);
3576 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3579 idl_global
->parse_args_exit (1);
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);
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')
3642 be_global
->gen_client_inline (false);
3644 else if (av
[i
][3] == 'c')
3647 be_global
->gen_client_stub (false);
3649 else if (av
[i
][3] == 'h')
3652 be_global
->gen_client_header (false);
3654 else if (av
[i
][3] == 'd' && av
[i
][4] == 'r')
3657 be_global
->cdr_support (false);
3663 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
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);
3686 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
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);
3708 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
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);
3729 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3732 idl_global
->parse_args_exit (1);
3737 if (av
[i
][2] == 'S')
3739 unsigned long ul
= ACE_OS::strtoul (av
[i
+ 1], nullptr, 10);
3740 be_global
->tab_size (ul
);
3747 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3750 idl_global
->parse_args_exit (1);
3757 ACE_TEXT ("IDL: I don't understand the '%C' option\n"),
3761 idl_global
->parse_args_exit (1);