3 //=============================================================================
7 * Header file for class containing compiler back end global data.
9 * @author Jeff Parsons <parsons@cs.wustl.edu>
11 //=============================================================================
16 #include "TAO_IDL_BE_Export.h"
18 #include "ace/Unbounded_Queue.h"
19 #include "ace/SString.h"
25 class be_interface_fwd
;
27 class AST_PredefinedType
;
30 // Defines a class containing all back end global data.
33 * Storage of global data specific to the compiler back end
35 class TAO_IDL_BE_Export BE_GlobalData
38 /// various lookup strategies
47 /// To help with DDD portability in DDS4CCM
59 ~BE_GlobalData (void);
61 // To switch between changing or non-changing standard include
62 // files (e.g. tao/corba.h) so that #include statements can be
63 // generated with ""s or <>s respectively.
64 void changing_standard_include_files (size_t changing
);
65 size_t changing_standard_include_files (void);
67 // Helper functions that generate the file names for the C++ mapping
69 // The parameter <base_name_only> set to 0 (no base name, but full
70 // name with output dir path, is useful, when I just want just the
71 // base name to use in #include's etc.
72 static const char *be_get_client_hdr_fname (
73 bool base_name_only
= false);
75 static const char *be_get_client_stub_fname (void);
77 static const char *be_get_client_inline_fname (
78 bool base_name_only
= false);
80 static const char *be_get_server_hdr_fname (
81 bool base_name_only
= false);
83 static const char *be_get_implementation_hdr_fname (
84 bool base_name_only
= false);
86 static const char *be_get_implementation_skel_fname (
87 bool base_name_only
= false);
89 static const char *be_get_server_template_hdr_fname (
90 bool base_name_only
= false);
92 static const char *be_get_server_skeleton_fname (void);
94 static const char *be_get_implementation_skeleton_fname (void);
96 static const char *be_get_server_template_skeleton_fname (
97 bool base_name_only
= false);
99 static const char *be_get_anyop_source_fname (
100 bool base_name_only
= false);
102 static const char *be_get_anyop_header_fname (
103 bool base_name_only
= false);
105 static const char *be_get_ciao_svnt_hdr_fname (
106 bool base_name_only
= false);
108 static const char *be_get_ciao_tmpl_svnt_hdr_fname (
109 bool base_name_only
=false);
111 static const char *be_get_ciao_svnt_src_fname (
112 bool base_name_only
= false);
114 static const char *be_get_ciao_tmpl_svnt_src_fname (
115 bool base_name_only
=false);
117 static const char *be_get_ciao_exec_hdr_fname (
118 bool base_name_only
= false);
120 static const char *be_get_ciao_exec_src_fname (
121 bool base_name_only
= false);
123 static const char *be_get_ciao_exec_stub_hdr_fname (
124 bool base_name_only
= false);
126 static const char *be_get_ciao_exec_idl_fname (
127 bool base_name_only
= false);
129 static const char *be_get_ciao_conn_hdr_fname (
130 bool base_name_only
= false);
132 static const char *be_get_ciao_conn_src_fname (
133 bool base_name_only
= false);
135 static const char *be_get_ciao_ami_conn_idl_fname (
136 bool base_name_only
= false);
138 static const char *be_get_ciao_ami_conn_impl_hdr_fname (
139 bool base_name_only
= false);
141 static const char *be_get_ciao_ami_conn_impl_src_fname (
142 bool base_name_only
= false);
144 // Helper functions: obtain the names of each generated file given
145 // the IDL file name.
146 // The parameter <base_name_only> set to 0 (no base name, but full
147 // name with output dir path, is useful, when I want just the
148 // base name to use in #include's etc.
149 static const char *be_get_client_hdr (
150 UTL_String
*idl_file_name
,
151 bool base_name_only
= false);
153 static const char *be_get_client_stub (
154 UTL_String
*idl_file_name
);
156 static const char *be_get_client_inline (
157 UTL_String
*idl_file_name
,
158 bool base_name_only
= false);
160 static const char *be_get_server_hdr (
161 UTL_String
*idl_file_name
,
162 bool base_name_only
= false);
164 static const char *be_get_svnt_template_hdr (
165 UTL_String
*idl_file_name
,
166 bool base_name_only
= false);
168 static const char *be_get_implementation_hdr (
169 UTL_String
*idl_file_name
,
170 bool base_name_only
= false);
172 static const char *be_get_implementation_skel (
173 UTL_String
*idl_file_name
,
174 bool base_name_only
= false);
176 static const char *be_get_server_template_hdr (
177 UTL_String
*idl_file_name
,
178 bool base_name_only
= false);
180 static const char *be_get_server_skeleton (
181 UTL_String
*idl_file_name
);
183 static const char *be_get_server_template_skeleton (
184 UTL_String
*idl_file_name
,
185 bool base_name_only
= false);
187 static const char *be_get_anyop_header (
188 UTL_String
*idl_file_name
,
189 bool base_name_only
= false);
191 static const char *be_get_anyop_source (
192 UTL_String
*idl_file_name
,
193 bool base_name_only
= false);
195 static const char *be_get_ciao_svnt_header (
196 UTL_String
*idl_file_name
,
197 bool base_name_only
= false);
199 static const char *be_get_ciao_svnt_template_header (
200 UTL_String
*idl_file_name
,
201 bool base_name_only
= false);
203 static const char *be_get_ciao_svnt_source (
204 UTL_String
*idl_file_name
,
205 bool base_name_only
= false);
207 static const char *be_get_ciao_svnt_template_source (
208 UTL_String
*idl_file_name
,
209 bool base_name_only
= false);
211 static const char *be_get_ciao_exec_header (
212 UTL_String
*idl_file_name
,
213 bool base_name_only
= false);
215 static const char *be_get_ciao_exec_source (
216 UTL_String
*idl_file_name
,
217 bool base_name_only
= false);
219 static const char *be_get_ciao_exec_stub_header (
220 UTL_String
*idl_file_name
,
221 bool base_name_only
= false);
223 static const char *be_get_ciao_exec_idl (
224 UTL_String
*idl_file_name
,
225 bool base_name_only
= false);
227 static const char *be_get_ciao_conn_header (
228 UTL_String
*idl_file_name
,
229 bool base_name_only
= false);
231 static const char *be_get_ciao_conn_source (
232 UTL_String
*idl_file_name
,
233 bool base_name_only
= false);
235 static const char *be_get_dds_typesupport_header (
236 UTL_String
*idl_file_name
,
237 bool base_name_only
= false);
239 static const char *be_get_ciao_ami_conn_idl (
240 UTL_String
*idl_file_name
,
241 bool base_name_only
= false);
243 static const char *be_get_ciao_ami_conn_impl_hdr (
244 UTL_String
*idl_file_name
,
245 bool base_name_only
= false);
247 static const char *be_get_ciao_ami_conn_impl_src (
248 UTL_String
*idl_file_name
,
249 bool base_name_only
= false);
251 /// Returns the macro name for exporting server side classes in Win32
253 const char* skel_export_macro (void) const;
255 /// Set the macro name for export server side classes in Win32 DLL.
256 void skel_export_macro (const char* s
);
258 /// Returns the name of the include file that contains the server
259 /// side export macro definition.
260 const char* skel_export_include (void) const;
262 /// Set the name of the include file that contains the server side
263 /// export macro definition.
264 void skel_export_include (const char* s
);
266 /// Returns the name of the include file that will be generated for the
267 /// server side export macro definition.
268 const char* skel_export_file (void) const;
270 /// Set the name of the include file that the will be generated for server
271 /// side export macro definition.
272 void skel_export_file (const char* s
);
274 /// Returns the macro name for exporting client side classes in Win32
276 const char* stub_export_macro (void) const;
278 /// Set the macro name for export client side classes in Win32 DLL.
279 void stub_export_macro (const char* s
);
281 /// Returns the name of the include file that contains the client
282 /// side export macro definition.
283 const char* stub_export_include (void) const;
285 /// Set the name of the include file that contains the client side
286 /// export macro definition.
287 void stub_export_include (const char* s
);
289 /// Returns the name of the include file will be generated for the client
290 /// side export macro definition.
291 const char* stub_export_file (void) const;
293 /// Set the name of the include file that will be generated for the client
294 /// side export macro definition.
295 void stub_export_file (const char* s
);
297 /// Returns the macro name for exporting *A.h file classes in Win32
299 const char* anyop_export_macro (void) const;
301 /// Set the macro name for export *A.h file classes in Win32 DLL.
302 void anyop_export_macro (const char* s
);
304 /// Returns the name of the include file that contains the *A.h
305 /// file export macro definition.
306 const char* anyop_export_include (void) const;
308 /// Set the name of the include file that contains the *A.h file
309 /// export macro definition.
310 void anyop_export_include (const char* s
);
312 /// Returns the macro name for exporting exec impl classes in Win32
314 const char* exec_export_macro (void) const;
316 /// Set the macro name for export exec impl classes in Win32 DLL.
317 void exec_export_macro (const char* s
);
319 /// Returns the name of the include file that contains the exec
320 /// impl export macro definition.
321 const char* exec_export_include (void) const;
323 /// Set the name of the include file that contains the exec impl
324 /// export macro definition.
325 void exec_export_include (const char* s
);
327 /// Returns the macro name for exporting CIAO svnt classes in Win32
329 const char* svnt_export_macro (void) const;
331 /// Set the macro name for export CIAO svnt classes in Win32 DLL.
332 void svnt_export_macro (const char* s
);
334 /// Returns the name of the include file that contains the CIAO
335 /// svnt export macro definition.
336 const char* svnt_export_include (void) const;
338 /// Set the name of the include file that contains the CIAO svnt
339 /// export macro definition.
340 void svnt_export_include (const char* s
);
342 /// Returns the macro name for exporting CIAO connector
343 /// classes in Win32 DLL.
344 const char* conn_export_macro (void) const;
346 /// Set the macro name for export CIAO connector
347 /// classes in Win32 DLL.
348 void conn_export_macro (const char* s
);
350 /// Returns the name of the include file that contains the CIAO
351 /// connector export macro definition.
352 const char* conn_export_include (void) const;
354 /// Set the name of the include file that contains the CIAO
355 /// connector export macro definition.
356 void conn_export_include (const char* s
);
358 /// Returns the name of the include file to be used for precompiled
360 const char* pch_include (void) const;
362 /// Set the name of the include file to be used for precompiled
364 void pch_include (const char* s
);
366 /// Returns the name of the include file to be put at the top of
367 /// every header file.
368 const char* pre_include (void) const;
370 /// Set the name of the include file to be put at the top of every
372 void pre_include (const char* s
);
374 /// Returns the name of the include file to be put at the bottom of
375 /// every header file.
376 const char* post_include (void) const;
378 /// Set the name of the include file to be put at the bottom of every
380 void post_include (const char* s
);
382 /// Returns the guard that is placed in the client header file
383 const char* include_guard (void) const;
385 /// Set the guard that is placed in the client header file
386 void include_guard (const char* s
);
388 /// Returns the name of the include file that is used instead of the own
389 /// generated client header file
390 const char* safe_include (void) const;
392 /// set the name of the include file that is used instead of the own
393 /// generated client header file
394 void safe_include (const char* s
);
396 /// Returns the name of the include file that should on get
397 /// generated in the client header file
398 const char* unique_include (void) const;
400 /// Set the name of the include file that should on get
401 /// generated in the client header file
402 void unique_include (const char* s
);
404 /// Returns the name of the include file that should be used as
405 /// stripped_filename
406 const char* stripped_filename (void) const;
408 /// Set the name of the include file that should be used as stripped_filename
409 void stripped_filename (const char* s
);
411 /// Set text that opens a "versioned" namespace.
412 void versioning_begin (const char* s
);
414 /// Get text that opens a "versioned" namespace.
415 const char * versioning_begin (void) const;
417 /// Set include file for "versioned" namespace.
418 void versioning_include (const char* s
);
420 /// Get include file for "versioned" namespace.
421 const char * versioning_include (void) const;
423 /// Get text that opens a "versioned" namespace for core TAO/orbsvcs
425 const char * core_versioning_begin (void) const;
427 /// Set text that closes a "versioned" namespace.
428 void versioning_end (const char* s
);
430 /// Get text that closes a "versioned" namespace.
431 const char * versioning_end (void) const;
433 /// Get text that closes a "versioned" namespace for core TAO/orbsvcs
435 const char * core_versioning_end (void) const;
437 // = Set and get methods for different file name endings.
439 /// Set the client_hdr_ending.
440 void client_hdr_ending (const char* s
);
442 /// Get the client_hdr_ending.
443 const char* client_hdr_ending (void) const;
445 /// Set the client_inline_ending.
446 void client_inline_ending (const char* s
);
448 /// Get the client_inline_ending.
449 const char* client_inline_ending (void) const;
451 /// Set the client_stub_ending.
452 void client_stub_ending (const char* s
);
454 /// Get the client_stub_ending.
455 const char* client_stub_ending (void) const;
457 /// Set the server_hdr_ending.
458 void server_hdr_ending (const char* s
);
460 /// Get the server_hdr_ending.
461 const char* server_hdr_ending (void) const;
463 /// Set the implementation_hdr_ending.
464 void implementation_hdr_ending (const char* s
);
466 /// Set the implementation class prefix.
467 void impl_class_prefix (const char* s
);
469 /// Set the implementation class suffix.
470 void impl_class_suffix (const char* s
);
472 /// Set the implementation_skel_ending.
473 void implementation_skel_ending (const char* s
);
475 /// Get the implementation_hdr_ending.
476 const char* implementation_hdr_ending (void) const;
478 ///Get implementation class prefix
479 const char* impl_class_prefix (void) const;
481 ///Get implementation class suffix
482 const char* impl_class_suffix (void) const;
484 /// Get the implementation_skel_ending.
485 const char* implementation_skel_ending (void) const;
487 /// Set the server_template_hdr_ending.
488 void server_template_hdr_ending (const char* s
);
490 /// Get the server_template_hdr_ending.
491 const char* server_template_hdr_ending (void) const;
493 /// Set the server_skeleton_ending.
494 void server_skeleton_ending (const char* s
);
496 /// Get the server_skeleton_ending.
497 const char* server_skeleton_ending (void) const;
499 /// Set the server_template_skeleton_ending.
500 void server_template_skeleton_ending (const char* s
);
502 /// Get the server_template_skeleton_ending.
503 const char* server_template_skeleton_ending (void) const;
505 /// Set the anyop_header_ending.
506 void anyop_header_ending (const char* s
);
508 /// Get the anyop_header_ending.
509 const char* anyop_header_ending (void) const;
511 /// Set the anyop_source_ending.
512 void anyop_source_ending (const char* s
);
514 /// Get the anyop_source_ending.
515 const char* anyop_source_ending (void) const;
517 /// Similar to above, but for CIAO servant and executor
518 /// impl and executor IDL files, if generated.
519 void ciao_svnt_header_template_ending (const char* s
);
520 const char* ciao_svnt_header_template_ending (void) const;
522 void ciao_svnt_source_template_ending (const char* s
);
523 const char* ciao_svnt_source_template_ending (void) const;
525 void ciao_svnt_header_ending (const char* s
);
526 const char* ciao_svnt_header_ending (void) const;
528 void ciao_svnt_source_ending (const char* s
);
529 const char* ciao_svnt_source_ending (void) const;
531 void ciao_exec_header_ending (const char* s
);
532 const char* ciao_exec_header_ending (void) const;
534 void ciao_exec_source_ending (const char* s
);
535 const char* ciao_exec_source_ending (void) const;
537 void ciao_exec_stub_header_ending (const char* s
);
538 const char* ciao_exec_stub_header_ending (void) const;
540 void ciao_exec_idl_ending (const char* s
);
541 const char* ciao_exec_idl_ending (void) const;
543 void ciao_conn_header_ending (const char* s
);
544 const char* ciao_conn_header_ending (void) const;
546 void ciao_conn_source_ending (const char* s
);
547 const char* ciao_conn_source_ending (void) const;
549 /// For generating TypeSupport header file includes.
550 void dds_typesupport_hdr_ending (const char* s
);
551 const char* dds_typesupport_hdr_ending (void) const;
553 /// For optionally generating CIAO AMI connector IDL file.
554 void ciao_ami_conn_idl_ending (const char* s
);
555 const char* ciao_ami_conn_idl_ending (void) const;
557 /// For optionally generating CIAO AMI reply handler
558 /// impl header file.
559 void ciao_ami_conn_impl_hdr_ending (const char* s
);
560 const char* ciao_ami_conn_impl_hdr_ending (void) const;
562 /// For optionally generating CIAO AMI reply handler
563 /// impl source file.
564 void ciao_ami_conn_impl_src_ending (const char* s
);
565 const char* ciao_ami_conn_impl_src_ending (void) const;
567 /// For optionally controlling the container type, default is Session
568 void ciao_container_type (const char* s
);
569 const char* ciao_container_type (void) const;
571 /// Set the clonable_in_args.
572 void use_clonable_in_args (bool clonable
);
574 /// Get the clonable_in_args setting.
575 bool use_clonable_in_args (void) const;
577 /// Get the gen_seq_template_export_ member.
578 bool gen_template_export (void) const;
580 /// Set the gen_seq_template_export_ member.
581 void gen_template_export (bool val
);
583 /// Get the gen_ostream_operators_ member.
584 bool gen_ostream_operators (void) const;
586 /// Set the gen_ostream_operators_ member.
587 void gen_ostream_operators (bool val
);
589 /// Get the gen_static_desc_operations_ member.
590 bool gen_static_desc_operations (void) const;
592 /// Set the gen_static_desc_operations_ member.
593 void gen_static_desc_operations (bool val
);
597 * Set the directory where all the IDL-Compiler-Generated files are
598 * to be kept. Default is current directory from which the
599 * <tao_idl> is called.
601 void output_dir (const char* s
);
604 * Get the directory where all the IDL-Compiler-Generated files are
605 * to be kept. Default is current directory from which the
606 * <tao_idl> is called.
608 const char* output_dir (void) const;
610 /// Set the path for all *C.* file includes.
611 /// Default is local directory or $TAO_ROOT/tao.
612 void stub_include_dir (const char* s
);
614 /// Get the path for all *C.* file includes.
615 /// Default is local directory or $TAO_ROOT/tao.
616 const char* stub_include_dir (void) const;
618 /// Set the directory where all the *S.* files are
619 /// to be kept. Default is output_dir_.
620 void skel_output_dir (const char* s
);
622 /// Get the directory where all the *S.* files are
623 /// to be kept. Default is output_dir_.
624 const char* skel_output_dir (void) const;
626 /// Set the directory where all the *A.* files are
627 /// to be kept. Default is output_dir_.
628 void anyop_output_dir (const char* s
);
630 /// Get the directory where all the *A.* files are
631 /// to be kept. Default is output_dir_.
632 const char* anyop_output_dir (void) const;
634 /// Set the directory where all the *exec.* files are
635 /// to be kept. Default is output_dir_.
636 void exec_output_dir (const char* s
);
638 /// Get the directory where all the *exec.* files are
639 /// to be kept. Default is output_dir_.
640 const char* exec_output_dir (void) const;
642 ///Get the flag for not overwriting already existing exec files.
643 bool overwrite_not_exec (void) const;
645 ///Set the flag for not overwriting already existing exec files.
646 void overwrite_not_exec (bool val
);
649 void any_support (bool);
651 /// Check Any support.
652 bool any_support (void) const;
655 void cdr_support (bool);
657 /// Check cdr support.
658 bool cdr_support (void) const;
660 /// Set TypeCode support.
661 void tc_support (bool);
663 /// Check TypeCode support
664 bool tc_support (void) const;
666 /// Set optimized valuetype member accessor generation.
667 void obv_opt_accessor (bool);
669 /// Check optimized valuetype member accessor generation.
670 bool obv_opt_accessor (void) const;
672 /// Set generation of implementation files.
673 void gen_impl_files (bool);
675 /// Check if we want to generate implementation files.
676 bool gen_impl_files (void) const;
678 /// Set generation of source file and line number for implementation files.
679 void gen_impl_debug_info (bool);
681 /// Check generation of source file and line number implementation files.
682 bool gen_impl_debug_info (void) const;
684 /// Set generation of copy constructor.
685 void gen_copy_ctor (bool);
687 /// Check if we want to generate the copy constructor.
688 bool gen_copy_ctor (void) const;
690 /// Set the generation of the assignment operator.
691 void gen_assign_op (bool);
693 /// Check if we want to generate the assignment operator.
694 bool gen_assign_op (void) const;
696 /// Set whether we want to generate Thru_POA collocation stubs.
697 void gen_thru_poa_collocation (bool);
699 /// Check if we want to generate Thru_POA collocation stubs.
700 bool gen_thru_poa_collocation (void) const;
702 /// Set whether we want to generate Direct collocation stubs.
703 void gen_direct_collocation (bool);
705 /// Check if we want to generate Direct collocation stubs.
706 bool gen_direct_collocation (void) const;
708 /// Set whether we want to generate for CORBA/e
709 void gen_corba_e (bool);
711 /// Check if we want to generate for CORBA/e
712 bool gen_corba_e (void) const;
714 /// Set whether we want to generate for Minimum CORBA
715 void gen_minimum_corba (bool);
717 /// Check if we want to generate for Minimum CORBA
718 bool gen_minimum_corba (void) const;
720 /// Set whether we want to generate for noeventCCM
721 void gen_noeventccm (bool);
723 /// Check if we want to generate for noeventCCM
724 bool gen_noeventccm (void) const;
726 /// Set whether we want to generate for LwCCM
727 void gen_lwccm (bool);
729 /// Check if we want to generate for LwCCM
730 bool gen_lwccm (void) const;
732 /// Set optimized typecodes.
735 /// Check if TypeCodes are optimized.
736 bool opt_tc (void) const;
738 /// To enable or disable AMI4CCM call back feature
739 void ami4ccm_call_back (bool value
);
742 bool ami4ccm_call_back (void) const;
744 /// To enable or disable AMI call back feature of the Messaging
745 /// specification in the generated code.
746 void ami_call_back (bool value
);
749 bool ami_call_back (void) const;
751 /// To enable or disable AMH in the generated code.
752 void gen_amh_classes (bool value
);
755 bool gen_amh_classes (void) const;
757 /// Set the generation of tie classes and files.
758 void gen_tie_classes (bool value
);
761 bool gen_tie_classes (void) const;
763 /// To enable or disable AMI call back feature of the Messaging
764 /// specification in the generated code.
765 void gen_smart_proxies (bool value
);
768 bool gen_smart_proxies (void) const;
771 void gen_inline_constants (bool value
);
774 bool gen_inline_constants (void) const;
777 void gen_orb_h_include (bool value
);
780 bool gen_orb_h_include (void) const;
782 /// Generate an empty anyop header (A.h)
783 bool gen_empty_anyop_header (void) const;
785 /// Generate an empty anyop header (A.h)
786 void gen_empty_anyop_header (bool value
);
788 /// Set the lookup strategy.
789 void lookup_strategy (LOOKUP_STRATEGY s
);
791 /// Return the enumerated value for the lookup strategy. Default is
793 LOOKUP_STRATEGY
lookup_strategy (void) const;
795 /// Set the DDS implementation.
796 void dds_impl (char const * const val
);
798 /// Return the enumerated value for the DDS implementation.
800 DDS_IMPL
dds_impl (void) const;
802 /// Cleanup function.
805 /// Used in the generation of extern function declarations so we
806 /// can use non-defined interfaces as members and parameters.
807 ACE_Unbounded_Queue
<be_interface_fwd
*> non_defined_interfaces
;
809 /// Accessor for the member, sets it on the first call.
810 AST_PredefinedType
*void_type (void);
812 /// Accessor for the member, sets it on the first call.
813 be_interface
*ccmobject (void);
815 /// Accessor for the member, sets it on the first call.
816 be_module
*messaging (void);
818 /// Accessor for the member, sets it on the first call.
819 be_valuetype
*messaging_exceptionholder (void);
821 /// Accessor for the member, sets it on the first call.
822 be_interface
*messaging_replyhandler (void);
824 /// Accessors for the member.
825 bool gen_anyop_files (void) const;
826 void gen_anyop_files (bool val
);
828 /// Accessors for the member gen_skel_files_.
829 bool gen_skel_files (void) const;
830 void gen_skel_files (bool val
);
832 /// Accessors for the member gen_svnt_cpp_files_.
833 bool gen_svnt_cpp_files (void) const;
834 void gen_svnt_cpp_files (bool val
);
836 /// Accessors for the member gen_svnt_t_files_.
837 bool gen_svnt_t_files (void) const;
838 void gen_svnt_t_files (bool val
);
840 /// Accessors for the member gen_client_inline_.
841 bool gen_client_inline (void) const;
842 void gen_client_inline (bool val
);
844 /// Accessors for the member gen_client_stub_.
845 bool gen_client_stub (void) const;
846 void gen_client_stub (bool val
);
848 /// Accessors for the member gen_client_header_.
849 bool gen_client_header (void) const;
850 void gen_client_header (bool val
);
852 /// Accessors for the member gen_server_skeleton_.
853 bool gen_server_skeleton (void) const;
854 void gen_server_skeleton (bool val
);
856 /// Accessors for the member gen_server_header_.
857 bool gen_server_header (void) const;
858 void gen_server_header (bool val
);
860 /// Accessors for the member gen_local_iface_anyops_.
861 bool gen_local_iface_anyops (void) const;
862 void gen_local_iface_anyops (bool val
);
864 /// Accessors for the member gen_custom_ending_.
865 bool gen_custom_ending (void) const;
866 void gen_custom_ending (bool val
);
868 /// Accessors for the member gen_unique_guards_.
869 bool gen_unique_guards (void) const;
870 void gen_unique_guards (bool val
);
872 /// Accessors for the corresponding members.
874 bool gen_ciao_svnt (void) const;
875 void gen_ciao_svnt (bool val
);
877 bool gen_ciao_exec_idl (void) const;
878 void gen_ciao_exec_idl (bool val
);
880 bool gen_ciao_exec_impl (void) const;
881 void gen_ciao_exec_impl (bool val
);
883 bool gen_ciao_exec_reactor_impl (void) const;
884 void gen_ciao_exec_reactor_impl (bool val
);
886 bool gen_ciao_conn_impl (void) const;
887 void gen_ciao_conn_impl (bool val
);
889 bool gen_dds_typesupport_idl (void) const;
890 void gen_dds_typesupport_idl (bool val
);
892 bool gen_ciao_valuefactory_reg (void) const;
893 void gen_ciao_valuefactory_reg (bool val
);
895 bool gen_stub_export_hdr_file (void) const;
896 void gen_stub_export_hdr_file (bool val
);
898 bool gen_skel_export_hdr_file (void) const;
899 void gen_skel_export_hdr_file (bool val
);
901 bool gen_svnt_export_hdr_file (void) const;
902 void gen_svnt_export_hdr_file (bool val
);
904 bool gen_exec_export_hdr_file (void) const;
905 void gen_exec_export_hdr_file (bool val
);
907 bool gen_conn_export_hdr_file (void) const;
908 void gen_conn_export_hdr_file (bool val
);
910 bool alt_mapping (void) const;
911 void alt_mapping (bool val
);
913 bool in_facet_servant (void) const;
914 void in_facet_servant (bool val
);
916 bool gen_arg_traits (void) const;
917 void gen_arg_traits (bool val
);
919 bool gen_anytypecode_adapter (void) const;
920 void gen_anytypecode_adapter (bool val
);
922 bool no_fixed_err () const;
923 void no_fixed_err (bool val
);
925 unsigned long tab_size (void) const;
926 void tab_size (unsigned long val
);
928 /// Command line passed to ACE_Process::spawn. Different
929 /// implementations in IDL and IFR backends.
930 ACE_CString
spawn_options (void);
933 * Parse an argument that the frontend did not recognize.
935 void parse_args (long &i
, char **av
);
939 * To switch between changing or non-changing standard include
940 * files (e.g. tao/corba.h) so that #include statements can be
941 * generated with ""s or <>s respectively.
943 size_t changing_standard_include_files_
;
945 // Macros and includes used to export classes from generated code.
946 char* skel_export_macro_
;
947 char* skel_export_include_
;
948 char* skel_export_file_
;
949 char* stub_export_macro_
;
950 char* stub_export_include_
;
951 char* stub_export_file_
;
953 // Macro and include used on ORB .pidl files generating to the
954 // AnyTypeCode library.
955 char* anyop_export_macro_
;
956 char* anyop_export_include_
;
958 char* exec_export_macro_
;
959 char* exec_export_include_
;
960 char* svnt_export_macro_
;
961 char* svnt_export_include_
;
962 char* conn_export_macro_
;
963 char* conn_export_include_
;
968 char* include_guard_
;
970 char* unique_include_
;
971 char* stripped_filename_
;
973 /// Text that opens a "versioned" namespace for core TAO and orbsvcs
975 ACE_CString core_versioning_begin_
;
977 /// Text that closes a "versioned" namespace for core TAO and
978 /// orbsvcs related code.
979 ACE_CString core_versioning_end_
;
981 /// Text that opens a "versioned" namespace.
982 ACE_CString versioning_begin_
;
984 /// Text that closes a "versioned" namespace.
985 ACE_CString versioning_end_
;
987 /// Include for versioned namespace include
988 ACE_CString versioning_include_
;
990 /// Client's header file name ending. Default is "C.h".
991 char* client_hdr_ending_
;
993 /// Client's stub's file name ending. Default is "C.cpp".
994 char* client_stub_ending_
;
996 /// Client's inline file name ending. Default is "C.i".
997 char* client_inline_ending_
;
999 /// Server's hdr file name ending. Default is "S.h".
1000 char* server_hdr_ending_
;
1002 /// Implementation's hdr file name ending. Default is "I.h".
1003 char* implementation_hdr_ending_
;
1005 // Implementation's skeleton file name ending. Default is "I.cpp".
1006 char* implementation_skel_ending_
;
1008 /// Implementaion class prefix
1009 char* impl_class_prefix_
;
1011 /// Implementation class suffix
1012 char* impl_class_suffix_
;
1014 /// Server's template hdr file name ending. Default is "S_T.h".
1015 char* server_template_hdr_ending_
;
1017 /// Server's skeleton file name ending. Default is "S.cpp".
1018 char* server_skeleton_ending_
;
1020 /// Server's template skeleton file name ending. Default is
1022 char* server_template_skeleton_ending_
;
1024 /// Anyop header file name ending. Default is "A.h".
1025 char* anyop_hdr_ending_
;
1027 /// Anyop source file name ending. Default is "A.cpp".
1028 char* anyop_src_ending_
;
1030 /// CIAO servant template header file name ending. Default is "_svnt_T.h".
1031 char* ciao_svnt_hdr_template_ending_
;
1033 /// CIAO servant template source file name ending. Default is "_svnt_T.cpp".
1034 char* ciao_svnt_src_template_ending_
;
1036 /// CIAO servant header file name ending. Default is "_svnt.h".
1037 char* ciao_svnt_hdr_ending_
;
1039 /// CIAO servant source file name ending. Default is "_svnt.cpp".
1040 char* ciao_svnt_src_ending_
;
1042 /// CIAO executor impl header file name ending. Default is "_exec.h".
1043 char* ciao_exec_hdr_ending_
;
1045 /// CIAO executor impl source file name ending. Default is "_exec.cpp".
1046 char* ciao_exec_src_ending_
;
1048 /// CIAO executor stub header file name ending. Default is "EC.h".
1049 char* ciao_exec_stub_hdr_ending_
;
1051 /// CIAO executor IDL file name ending. Default is "E.idl".
1052 char* ciao_exec_idl_ending_
;
1054 /// CIAO connector impl header file name ending. Default is "_conn.h".
1055 char* ciao_conn_hdr_ending_
;
1057 /// CIAO connector impl source file name ending. Default is "_conn.cpp".
1058 char* ciao_conn_src_ending_
;
1060 /// DDS TypeSupport header file name ending. Default is "Support.h".
1061 char* dds_typesupport_hdr_ending_
;
1063 /// CIAO AMI connector IDL file name ending. Default is "A.idl".
1064 char* ciao_ami_conn_idl_ending_
;
1066 /// CIAO AMI reply handler impl header file name ending.
1067 /// Default is "A_impl.h".
1068 char* ciao_ami_conn_impl_hdr_ending_
;
1070 /// CIAO AMI reply handler impl source file name ending.
1071 /// Default is "A_impl.cpp".
1072 char* ciao_ami_conn_impl_src_ending_
;
1074 /// CIAO container type
1075 /// Default is "Session".
1076 char* ciao_container_type_
;
1079 * Directory where all the IDL-Compiler-Generated files are to be
1080 * kept. Default value is 0 for this string which means the current
1081 * directory from which the <tao_idl> is called.
1086 * Path for all *C.* includes. Default value is 0, in which case
1087 * the local directory or $TAO_ROOT/tao is used.
1089 char* stub_include_dir_
;
1092 * Directory where all the *S.* files are to be
1093 * kept. Default value is 0 for this string which means the
1094 * value for output_dir_ is used.
1096 char* skel_output_dir_
;
1099 * Directory where all the *A.* files are to be
1100 * kept. Default value is 0 for this string which means the
1101 * value for output_dir_ is used.
1103 char* anyop_output_dir_
;
1106 * Directory where all the *exec.* files are to be
1107 * kept. Default value is 0 for this string which means the
1108 * value for output_dir_ is used.
1110 char* exec_output_dir_
;
1113 /// do we support Any operators?
1116 /// do we support cdr?
1119 /// do we support typecodes?
1122 /// do we optimize valuetype accessors?
1123 bool obv_opt_accessor_
;
1125 /// are we generating implementation files?
1126 bool gen_impl_files_
;
1128 /// are we generating source file and line numbers for implementation files?
1129 bool gen_impl_debug_info_
;
1131 /// are we generating the copy constructor?
1132 bool gen_copy_ctor_
;
1134 /// are we generating the assignment operator?
1135 bool gen_assign_op_
;
1137 /// are we generating Thru_POA collocated stubs?
1138 bool gen_thru_poa_collocation_
;
1140 /// are we generating Direct collocated stubs?
1141 bool gen_direct_collocation_
;
1143 /// are we generating for CORBA/e
1146 /// are we generating for Minimum CORBA
1147 bool gen_minimum_corba_
;
1149 /// are we generating for LwCCM
1152 /// are we generating for noeventCCM
1153 bool gen_noeventccm_
;
1155 /// do we generate optimized typecodes?
1158 /// Flag to indicate whether the AMI4ccm Call back feature should be enabled
1159 /// for the generated files or not.
1160 bool ami4ccm_call_back_
;
1163 * Flag to indicate whether the AMI Call back feature of the
1164 * Messaging specification should be enabled for the generated files
1167 bool ami_call_back_
;
1169 /// Flag for generating AMH classes.
1170 bool gen_amh_classes_
;
1172 /// Flag to indicate whether we generate the tie classes and
1174 bool gen_tie_classes_
;
1176 /// Flag to indicate whether smart proxies classes will be generated
1178 bool gen_smart_proxies_
;
1180 /// Flag to indicate whether we are using an inline form of constant
1181 /// generation that pleases the C++ compiler better on some platforms.
1182 bool gen_inline_constants_
;
1184 /// Flag to indicate whether ORB.h include should be generated, needed for
1185 /// regenerating the pidl files.
1186 bool gen_orb_h_include_
;
1188 /// Flag to indicate whether an empty A.h should be generated
1189 bool gen_empty_anyop_header_
;
1191 /// The enumerated value indicating the lookup strategy.
1192 LOOKUP_STRATEGY lookup_strategy_
;
1194 /// The enumerated value indicating the DDS implementation.
1197 /// Used for void operation return types.
1198 AST_PredefinedType
*void_type_
;
1200 /// Reference holder for component skeleton visitors.
1201 be_interface
*ccmobject_
;
1203 /// Storage for the messaging exceptions holder's virtual scope.
1204 be_module
*messaging_
;
1206 /// Storage for exception holders' base class node.
1207 be_valuetype
*messaging_exceptionholder_
;
1209 /// Storage for the reply handlers' base class node.
1210 be_interface
*messaging_replyhandler_
;
1212 /// Separate files for generated Any operators?
1213 bool gen_anyop_files_
;
1215 /// True by default, but a command line option can turn this off so that
1216 /// we don't generate a S.cpp file
1217 bool gen_skel_files_
;
1219 /// True by default, but a command line option can turn this of so that
1220 /// we don't generate a svnt.cpp file
1221 bool gen_svnt_cpp_files_
;
1223 /// True by default, but a command line option can turn this of so that
1224 /// we don't generate a svnt_T.cpp file
1225 bool gen_svnt_t_files_
;
1227 /// True by default, but a command line option can turn this off so
1228 /// that we don't generate a client inline file
1229 bool gen_client_inline_
;
1231 /// True by default, but a command line option can turn this off so
1232 /// that we don't generate a client stub file
1233 bool gen_client_stub_
;
1235 /// True by default, but a command line option can turn this off so
1236 /// that we don't generate a client header file
1237 bool gen_client_header_
;
1239 /// True by default, but a command line option can turn this off so
1240 /// that we don't generate a server skeleton file
1241 bool gen_server_skeleton_
;
1243 /// True by default, but a command line option can turn this off so
1244 /// that we don't generate a server header file
1245 bool gen_server_header_
;
1247 /// True by default, can be turned off by a command line option
1248 /// for regenerating internal ORB files.
1249 bool gen_local_iface_anyops_
;
1251 /// Use in_clonable_arg_val instead of in_arg_val?
1252 bool use_clonable_in_args_
;
1254 /// Generate explicit export for Visual Studio bug workaround,
1255 /// needed only in TAO basic sequence *C.h files.
1256 bool gen_template_export_
;
1258 /// Generate ostream operators for each type declaration, for
1259 /// debugging or logging.
1260 bool gen_ostream_operators_
;
1262 /// Generate static description operations for each interface
1263 bool gen_static_desc_operations_
;
1266 * True by default, but a command line option can turn this off so
1267 * custom ending will not be applied to files in $TAO_ROOT/,
1268 * $TAO_ROOT/tao, $TAO_ROOT/orbsvcs, $TAO_ROOT/CIAO, $TAO_ROOT/CIAO/ciao.
1270 bool gen_custom_ending_
;
1273 * True by default, but a command line option can turn this off so
1274 * the generated code (header) files will not be proteced by unique guards.
1276 bool gen_unique_guards_
;
1278 /// False by default, these flags trigger code generation
1279 bool gen_ciao_svnt_
;
1280 bool gen_ciao_exec_idl_
;
1281 bool gen_ciao_exec_impl_
;
1282 bool gen_ciao_exec_reactor_impl_
;
1284 ///Flag to indicate whether generated exec files should
1285 ///overwritten already existing exe files
1286 bool overwrite_not_exec_
;
1288 /// False by default, this flag triggers code generation
1289 /// for CCM connector implementations.
1290 bool gen_ciao_conn_impl_
;
1292 /// Used for DDS implementations other than OpenDDS.
1293 bool gen_dds_typesupport_idl_
;
1295 /// Generate automatic valuetype factory registration in
1297 bool gen_ciao_valuefactory_reg_
;
1299 /// Flags toggling export header file generation.
1300 bool gen_stub_export_hdr_file_
;
1301 bool gen_skel_export_hdr_file_
;
1302 bool gen_svnt_export_hdr_file_
;
1303 bool gen_exec_export_hdr_file_
;
1304 bool gen_conn_export_hdr_file_
;
1306 /// 2 spaces by default, can be set from the command line.
1307 unsigned int tab_size_
;
1309 /// Are we generating STL types?
1312 /// Are we in the act of generating a facet servant?
1313 bool in_facet_servant_
;
1315 /// Are we generating arg traits template instantiations?
1316 bool gen_arg_traits_
;
1318 /// Generating arg traits in the ORB for the basic type
1319 /// sequences requires the AnyTypeCode_Adapter class.
1320 bool gen_anytypecode_adapter_
;
1322 /// Don't generate an error for usage of the fixed data type
1326 #endif /* _BE_GLOBAL_H */