summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be_include/be_global.h
blob: cdb382f75264e297c721947fc3b0ddbc35697d8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
// -*- C++ -*-

//=============================================================================
/**
 *  @file    be_global.h
 *
 *  $Id$
 *
 *  Header file for class containing compiler back end global data.
 *
 *
 *  @author Jeff Parsons <parsons@cs.wustl.edu>
 */
//=============================================================================

#ifndef _BE_GLOBAL_H
#define _BE_GLOBAL_H

#include "TAO_IDL_BE_Export.h"

#include "ace/Unbounded_Queue.h"
#include "ace/SString.h"

class be_interface;
class be_valuetype;
class be_module;
class be_interface;
class be_interface_fwd;
class UTL_String;
class AST_PredefinedType;
class AST_Generator;

// Defines a class containing all back end global data.

/*
 * Storage of global data specific to the compiler back end
 */
class TAO_IDL_BE_Export BE_GlobalData
{
public:
  /// various lookup strategies
  enum LOOKUP_STRATEGY
  {
    TAO_LINEAR_SEARCH,
    TAO_DYNAMIC_HASH,
    TAO_PERFECT_HASH,
    TAO_BINARY_SEARCH
  };

  /// To help with DDD portability in DDS4CCM
  /// connectors.
  enum DDS_IMPL
  {
    DDS_NONE,
    NDDS,
    OPENSPLICE,
    OPENDDS,
    COREDX
  };

  BE_GlobalData (void);
  ~BE_GlobalData (void);

  // To switch between changing or non-changing standard include
  // files (e.g. tao/corba.h)  so that #include statements can be
  // generated with ""s or <>s respectively.
  void changing_standard_include_files (size_t changing);
  size_t changing_standard_include_files (void);

  // Helper functions that generate the file names for the C++ mapping
  // generated code.
  // The parameter <base_name_only> set to 0 (no base name, but full
  // name with output dir path, is useful, when I just want just the
  // base name to use in #include's etc.
  static const char *be_get_client_hdr_fname (
    bool base_name_only = false);

  static const char *be_get_client_stub_fname (void);

  static const char *be_get_client_inline_fname (
    bool base_name_only = false);

  static const char *be_get_server_hdr_fname (
    bool base_name_only = false);

  static const char *be_get_implementation_hdr_fname (
    bool base_name_only = false);

  static const char *be_get_implementation_skel_fname (
    bool base_name_only = false);

  static const char *be_get_server_template_hdr_fname (
    bool base_name_only = false);

  static const char *be_get_server_skeleton_fname (void);

  static const char *be_get_implementation_skeleton_fname (void);

  static const char *be_get_server_template_skeleton_fname (
    bool base_name_only = false);

  static const char *be_get_server_inline_fname (
    bool base_name_only = false);

  static const char *be_get_anyop_source_fname (
    bool base_name_only = false);

  static const char *be_get_anyop_header_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_svnt_hdr_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_svnt_src_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_exec_hdr_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_exec_src_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_exec_stub_hdr_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_exec_idl_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_conn_hdr_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_conn_src_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_ami_conn_idl_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_ami_conn_impl_hdr_fname (
    bool base_name_only = false);

  static const char *be_get_ciao_ami_conn_impl_src_fname (
    bool base_name_only = false);

  // Helper functions: obtain the names of each generated file given
  // the IDL file name.
  // The parameter <base_name_only> set to 0 (no base name, but full
  // name with output dir path, is useful, when I want just the
  // base name to use in #include's etc.
  static const char *be_get_client_hdr (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_client_stub (
    UTL_String *idl_file_name);

  static const char *be_get_client_inline (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_server_hdr (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_implementation_hdr (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_implementation_skel (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_server_template_hdr (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_server_skeleton (
    UTL_String *idl_file_name);

  static const char *be_get_server_template_skeleton (
      UTL_String *idl_file_name,
      bool base_name_only = false);

  static const char *be_get_server_inline (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_anyop_header (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_anyop_source (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_svnt_header (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_svnt_source (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_exec_header (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_exec_source (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_exec_stub_header (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_exec_idl (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_conn_header (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_conn_source (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_dds_typesupport_header (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_ami_conn_idl (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_ami_conn_impl_hdr (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  static const char *be_get_ciao_ami_conn_impl_src (
    UTL_String *idl_file_name,
    bool base_name_only = false);

  //// Returns the macro name for exporting server side classes in Win32
  //// DLL.
  const char* skel_export_macro (void) const;

  //// Set the macro name for export server side classes in Win32 DLL.
  void skel_export_macro (const char* s);

  //// Returns the name of the include file that contains the server
  //// side export macro definition.
  const char* skel_export_include (void) const;

  //// Set the name of the include file that contains the server side
  //// export macro definition.
  void skel_export_include (const char* s);

  //// Returns the name of the include file that will be generated for the
  //// server side export macro definition.
  const char* skel_export_file (void) const;

  //// Set the name of the include file that the will be generated for server
  //// side export macro definition.
  void skel_export_file (const char* s);

  //// Returns the macro name for exporting client side classes in Win32
  //// DLL.
  const char* stub_export_macro (void) const;

  //// Set the macro name for export client side classes in Win32 DLL.
  void stub_export_macro (const char* s);

  //// Returns the name of the include file that contains the client
  //// side export macro definition.
  const char* stub_export_include (void) const;

  //// Set the name of the include file that contains the client side
  //// export macro definition.
  void stub_export_include (const char* s);

  //// Returns the name of the include file will be generated for the client
  //// side export macro definition.
  const char* stub_export_file (void) const;

  //// Set the name of the include file that will be generated for the client
  //// side export macro definition.
  void stub_export_file (const char* s);

  //// Returns the macro name for exporting *A.h file classes in Win32
  //// DLL.
  const char* anyop_export_macro (void) const;

  //// Set the macro name for export *A.h file classes in Win32 DLL.
  void anyop_export_macro (const char* s);

  //// Returns the name of the include file that contains the *A.h
  //// file export macro definition.
  const char* anyop_export_include (void) const;

  //// Set the name of the include file that contains the *A.h file
  //// export macro definition.
  void anyop_export_include (const char* s);

  //// Returns the macro name for exporting exec impl classes in Win32
  //// DLL.
  const char* exec_export_macro (void) const;

  //// Set the macro name for export exec impl classes in Win32 DLL.
  void exec_export_macro (const char* s);

  //// Returns the name of the include file that contains the exec
  //// impl export macro definition.
  const char* exec_export_include (void) const;

  //// Set the name of the include file that contains the exec impl
  //// export macro definition.
  void exec_export_include (const char* s);

  //// Returns the macro name for exporting CIAO svnt classes in Win32
  //// DLL.
  const char* svnt_export_macro (void) const;

  //// Set the macro name for export CIAO svnt classes in Win32 DLL.
  void svnt_export_macro (const char* s);

  //// Returns the name of the include file that contains the CIAO
  //// svnt export macro definition.
  const char* svnt_export_include (void) const;

  //// Set the name of the include file that contains the CIAO svnt
  //// export macro definition.
  void svnt_export_include (const char* s);

  //// Returns the macro name for exporting CIAO connector
  //// classes in Win32 DLL.
  const char* conn_export_macro (void) const;

  //// Set the macro name for export CIAO connector
  //// classes in Win32 DLL.
  void conn_export_macro (const char* s);

  //// Returns the name of the include file that contains the CIAO
  //// connector export macro definition.
  const char* conn_export_include (void) const;

  //// Set the name of the include file that contains the CIAO
  //// connector export macro definition.
  void conn_export_include (const char* s);

  //// Returns the name of the include file to be used for precompiled
  //// header support.
  const char* pch_include (void) const;

  //// Set the name of the include file to be used for precompiled
  //// header support.
  void pch_include (const char* s);

  //// Returns the name of the include file to be put at the top of
  //// every header file.
  const char* pre_include (void) const;

  //// Set the name of the include file to be put at the top of every
  //// header file.
  void pre_include (const char* s);

  //// Returns the name of the include file to be put at the bottom of
  //// every header file.
  const char* post_include (void) const;

  //// Set the name of the include file to be put at the bottom of every
  //// header file.
  void post_include (const char* s);

  //// Returns the guard that is placed in the client header file
  const char* include_guard (void) const;

  //// Set the guard that is placed in the client header file
  void include_guard (const char* s);

  //// Returns the name of the include file that is used instead of the own
  //// generated client header file
  const char* safe_include (void) const;

  //// set the name of the include file that is used instead of the own
  //// generated client header file
  void safe_include (const char* s);

  //// Returns the name of the include file that should on get
  //// generated in the client header file
  const char* unique_include (void) const;

  /// Set the name of the include file that should on get
  /// generated in the client header file
  void unique_include (const char* s);

  /// Set text that opens a "versioned" namespace.
  void versioning_begin (const char* s);

  /// Get text that opens a "versioned" namespace.
  const char * versioning_begin (void) const;

  /// Get text that opens a "versioned" namespace for core TAO/orbsvcs
  /// related code.
  const char * core_versioning_begin (void) const;

  /// Set text that closes a "versioned" namespace.
  void versioning_end (const char* s);

  /// Get text that closes a "versioned" namespace.
  const char * versioning_end (void) const;

  /// Get text that closes a "versioned" namespace for core TAO/orbsvcs
  /// related code.
  const char * core_versioning_end (void) const;

  // = Set and get methods for different file name endings.

  /// Set the client_hdr_ending.
  void client_hdr_ending (const char* s);

  /// Get the client_hdr_ending.
  const char* client_hdr_ending (void) const;

  /// Set the client_inline_ending.
  void client_inline_ending (const char* s);

  /// Get the client_inline_ending.
  const char* client_inline_ending (void) const;

  /// Set the client_stub_ending.
  void  client_stub_ending (const char* s);

  /// Get the client_stub_ending.
  const char* client_stub_ending (void) const;

  /// Set the server_hdr_ending.
  void server_hdr_ending (const char* s);

  /// Get the server_hdr_ending.
  const char* server_hdr_ending (void) const;

  /// Set the implementation_hdr_ending.
  void implementation_hdr_ending (const char* s);

  /// Set the implementation class prefix.
  void impl_class_prefix (const char* s);

  /// Set the implementation class suffix.
  void impl_class_suffix (const char* s);

  /// Set the implementation_skel_ending.
  void implementation_skel_ending (const char* s);

  /// Get the implementation_hdr_ending.
  const char* implementation_hdr_ending (void) const;

  ///Get implementation class prefix
  const char* impl_class_prefix (void) const;

  ///Get implementation class suffix
  const char* impl_class_suffix (void) const;

  /// Get the implementation_skel_ending.
  const char* implementation_skel_ending (void) const;

  /// Set the server_template_hdr_ending.
  void server_template_hdr_ending (const char* s);

  /// Get the server_template_hdr_ending.
  const char* server_template_hdr_ending (void) const;

  /// Set the server_skeleton_ending.
  void server_skeleton_ending (const char* s);

  /// Get the server_skeleton_ending.
  const char* server_skeleton_ending (void) const;

  /// Set the server_template_skeleton_ending.
  void server_template_skeleton_ending (const char* s);

  /// Get the server_template_skeleton_ending.
  const char* server_template_skeleton_ending (void) const;

  /// Set the server_inline_ending.
  void server_inline_ending (const char* s);

  /// Get the server_inline_ending.
  const char* server_inline_ending (void) const;

  /// Set the anyop_header_ending.
  void anyop_header_ending (const char* s);

  /// Get the anyop_header_ending.
  const char* anyop_header_ending (void) const;

  /// Set the anyop_source_ending.
  void anyop_source_ending (const char* s);

  /// Get the anyop_source_ending.
  const char* anyop_source_ending (void) const;

  /// Similar to above, but for CIAO servant and executor
  /// impl and executor IDL files, if generated.
  void ciao_svnt_header_ending (const char* s);
  const char* ciao_svnt_header_ending (void) const;

  void ciao_svnt_source_ending (const char* s);
  const char* ciao_svnt_source_ending (void) const;

  void ciao_exec_header_ending (const char* s);
  const char* ciao_exec_header_ending (void) const;

  void ciao_exec_source_ending (const char* s);
  const char* ciao_exec_source_ending (void) const;

  void ciao_exec_stub_header_ending (const char* s);
  const char* ciao_exec_stub_header_ending (void) const;

  void ciao_exec_idl_ending (const char* s);
  const char* ciao_exec_idl_ending (void) const;

  void ciao_conn_header_ending (const char* s);
  const char* ciao_conn_header_ending (void) const;

  void ciao_conn_source_ending (const char* s);
  const char* ciao_conn_source_ending (void) const;

  /// For generating TypeSupport header file includes.
  void dds_typesupport_hdr_ending (const char* s);
  const char* dds_typesupport_hdr_ending (void) const;

  /// For optionally generating CIAO AMI connector IDL file.
  void ciao_ami_conn_idl_ending (const char* s);
  const char* ciao_ami_conn_idl_ending (void) const;

  /// For optionally generating CIAO AMI reply handler
  /// impl header file.
  void ciao_ami_conn_impl_hdr_ending (const char* s);
  const char* ciao_ami_conn_impl_hdr_ending (void) const;

  /// For optionally generating CIAO AMI reply handler
  /// impl source file.
  void ciao_ami_conn_impl_src_ending (const char* s);
  const char* ciao_ami_conn_impl_src_ending (void) const;

  /// For optionally controlling the container type, default is Session
  void ciao_container_type (const char* s);
  const char* ciao_container_type (void) const;

  /// Set the clonable_in_args.
  void use_clonable_in_args (bool clonable);

  /// Get the clonable_in_args setting.
  bool use_clonable_in_args (void) const;

  /// Get the gen_seq_template_export_ member.
  bool gen_template_export (void) const;

  /// Set the gen_seq_template_export_ member.
  void gen_template_export (bool val);

  /// Get the gen_ostream_operators_ member.
  bool gen_ostream_operators (void) const;

  /// Set the gen_ostream_operators_ member.
  void gen_ostream_operators (bool val);

  /**
   * Set the directory where all the IDL-Compiler-Generated files are
   * to be kept. Default is current directory from which the
   * <tao_idl> is called.
   */
  void output_dir (const char* s);

  /**
   * Get the directory where all the IDL-Compiler-Generated files are
   * to be kept. Default is current directory from which the
   * <tao_idl> is called.
   */
  const char* output_dir (void) const;

  /// Set the path for all *C.* file includes.
  /// Default is local directory or $TAO_ROOT/tao.
  void stub_include_dir (const char* s);

  /// Get the path for all *C.* file includes.
  /// Default is local directory or $TAO_ROOT/tao.
  const char* stub_include_dir (void) const;

  /// Set the directory where all the *S.* files are
  /// to be kept. Default is output_dir_.
  void skel_output_dir (const char* s);

  /// Get the directory where all the *S.* files are
  /// to be kept. Default is output_dir_.
  const char* skel_output_dir (void) const;

  /// Set the directory where all the *A.* files are
  /// to be kept. Default is output_dir_.
  void anyop_output_dir (const char* s);

  /// Get the directory where all the *A.* files are
  /// to be kept. Default is output_dir_.
  const char* anyop_output_dir (void) const;

  /// Set any support.
  void any_support (bool);

  /// Check Any support.
  bool any_support (void) const;

  /// Set cdr support.
  void cdr_support (bool);

  /// Check cdr support.
  bool cdr_support (void) const;

  /// Set TypeCode support.
  void tc_support (bool);

  /// Check TypeCode support
  bool tc_support (void) const;

  /// Set optimized valuetype member accessor generation.
  void obv_opt_accessor (bool);

  /// Check optimized valuetype member accessor generation.
  bool obv_opt_accessor (void) const;

  /// Set generation of implementation files.
  void gen_impl_files (bool);

  /// Check if we want to generate implementation files.
  bool gen_impl_files (void) const;

  /// Set generation of source file and line number for implementation files.
  void gen_impl_debug_info (bool);

  /// Check generation of source file and line number implementation files.
  bool gen_impl_debug_info (void) const;

  /// Set generation of copy constructor.
  void gen_copy_ctor (bool);

  /// Check if we want to generate the copy constructor.
  bool gen_copy_ctor (void) const;

  /// Set the generation of the assignment operator.
  void gen_assign_op (bool);

  /// Check if we want to generate the assignment operator.
  bool gen_assign_op (void) const;

  /// Set whether we want to generate Thru_POA collocation stubs.
  void gen_thru_poa_collocation (bool);

  /// Check if we want to generate Thru_POA collocation stubs.
  bool gen_thru_poa_collocation (void) const;

  /// Set whether we want to generate Direct collocation stubs.
  void gen_direct_collocation (bool);

  /// Check if we want to generate Direct collocation stubs.
  bool gen_direct_collocation (void) const;

  /// Set whether we want to generate for CORBA/e
  void gen_corba_e (bool);

  /// Check if we want to generate for CORBA/e
  bool gen_corba_e (void) const;

  /// Set whether we want to generate for Minimum CORBA
  void gen_minimum_corba (bool);

  /// Check if we want to generate for Minimum CORBA
  bool gen_minimum_corba (void) const;

  /// Set whether we want to generate for noeventCCM
  void gen_noeventccm (bool);

  /// Check if we want to generate for noeventCCM
  bool gen_noeventccm (void) const;

  /// Set whether we want to generate for LwCCM
  void gen_lwccm (bool);

  /// Check if we want to generate for LwCCM
  bool gen_lwccm (void) const;

  /// Set optimized typecodes.
  void opt_tc (bool);

  /// Check if TypeCodes are optimized.
  bool opt_tc (void) const;

  /// To enable or disable AMI4CCM call back feature
  void ami4ccm_call_back (bool value);

  /// Return the flag.
  bool ami4ccm_call_back (void) const;

  /// To enable or disable AMI call back feature of the Messaging
  /// specification in the generated code.
  void ami_call_back (bool value);

  /// Return the flag.
  bool ami_call_back (void) const;

  /// To enable or disable AMH in the generated code.
  void gen_amh_classes (bool value);

  /// Return the flag.
  bool gen_amh_classes (void) const;

  /// Set the generation of tie classes and files.
  void gen_tie_classes (bool value);

  /// Return the flag.
  bool gen_tie_classes (void) const;

  /// To enable or disable AMI call back feature of the Messaging
  /// specification in the generated code.
  void gen_smart_proxies (bool value);

  /// Return the flag.
  bool gen_smart_proxies (void) const;

  /// Set the flag.
  void gen_inline_constants (bool value);

  /// Return the flag.
  bool gen_inline_constants (void) const;

  /// Set the flag.
  void gen_orb_h_include (bool value);

  /// Return the flag.
  bool gen_orb_h_include (void) const;

  /// Generate an empty anyop header (A.h)
  bool gen_empty_anyop_header (void) const;

  /// Generate an empty anyop header (A.h)
  void gen_empty_anyop_header (bool value);

  /// Set the lookup strategy.
  void lookup_strategy (LOOKUP_STRATEGY s);

  /// Return the enumerated value for the lookup strategy. Default is
  /// perfect hashing.
  LOOKUP_STRATEGY lookup_strategy (void) const;

  /// Set the DDS implementation.
  void dds_impl (char const * const val);

  /// Return the enumerated value for the DDS implementation.
  /// Default is NDDS.
  DDS_IMPL dds_impl (void) const;

  /// Set the suffix of OpenDDS-specific native sequences.
  void opendds_sequence_suffix (const char *val);

  /// Return the suffix of OpenDDS-specific native sequences.
  const char *opendds_sequence_suffix (void) const;

  /// Cleanup function.
  void destroy (void);

  /// Used in the generation of declarations for
  /// xxx_Proxy_Broker_Factory_function_pointer.
  ACE_Unbounded_Queue<be_interface *> non_local_interfaces;

  /// Used in the generation of extern function declarations so we
  /// can use non-defined interfaces as members and parameters.
  ACE_Unbounded_Queue<be_interface_fwd *> non_defined_interfaces;

  /// Accessor for the member, sets it on the first call.
  AST_PredefinedType *void_type (void);

  /// Accessor for the member, sets it on the first call.
  be_interface *ccmobject (void);

  /// Accessor for the member, sets it on the first call.
  be_module *messaging (void);

  /// Accessor for the member, sets it on the first call.
  be_valuetype *messaging_exceptionholder (void);

  /// Accessor for the member, sets it on the first call.
  be_interface *messaging_replyhandler (void);

  /// Accessors for the member.
  bool gen_anyop_files (void) const;
  void gen_anyop_files (bool val);

  /// Accessors for the member gen_skel_files_.
  bool gen_skel_files (void) const;
  void gen_skel_files (bool val);

  /// Accessors for the member gen_client_inline_.
  bool gen_client_inline (void) const;
  void gen_client_inline (bool val);

  /// Accessors for the member gen_server_inline_.
  bool gen_server_inline (void) const;
  void gen_server_inline (bool val);

  /// Accessors for the member gen_client_stub_.
  bool gen_client_stub (void) const;
  void gen_client_stub (bool val);

  /// Accessors for the member gen_server_skeleton_.
  bool gen_server_skeleton (void) const;
  void gen_server_skeleton (bool val);

  /// Accessors for the member gen_local_iface_anyops_.
  bool gen_local_iface_anyops (void) const;
  void gen_local_iface_anyops (bool val);

  /// Accessors for the member gen_custom_ending_.
  bool gen_custom_ending (void) const;
  void gen_custom_ending (bool val);

  /// Accessors for the member gen_unique_guards_.
  bool gen_unique_guards (void) const;
  void gen_unique_guards (bool val);

  /// Accessors for the corresponding members.

  bool gen_ciao_svnt (void) const;
  void gen_ciao_svnt (bool val);

  bool gen_ciao_exec_idl (void) const;
  void gen_ciao_exec_idl (bool val);

  bool gen_ciao_exec_impl (void) const;
  void gen_ciao_exec_impl (bool val);

  bool gen_ciao_exec_reactor_impl (void) const;
  void gen_ciao_exec_reactor_impl (bool val);

  bool gen_ciao_conn_impl (void) const;
  void gen_ciao_conn_impl (bool val);

  bool gen_dds_typesupport_idl (void) const;
  void gen_dds_typesupport_idl (bool val);

  bool gen_ciao_valuefactory_reg (void) const;
  void gen_ciao_valuefactory_reg (bool val);

  bool gen_stub_export_hdr_file (void) const;
  void gen_stub_export_hdr_file (bool val);

  bool gen_skel_export_hdr_file (void) const;
  void gen_skel_export_hdr_file (bool val);

  bool gen_svnt_export_hdr_file (void) const;
  void gen_svnt_export_hdr_file (bool val);

  bool gen_exec_export_hdr_file (void) const;
  void gen_exec_export_hdr_file (bool val);

  bool gen_conn_export_hdr_file (void) const;
  void gen_conn_export_hdr_file (bool val);

  bool gen_lem_force_all (void) const;
  void gen_lem_force_all (bool val);

  bool alt_mapping (void) const;
  void alt_mapping (bool val);

  bool in_facet_servant (void) const;
  void in_facet_servant (bool val);

  bool gen_arg_traits (void) const;
  void gen_arg_traits (bool val);

  bool gen_anytypecode_adapter (void) const;
  void gen_anytypecode_adapter (bool val);

  unsigned long tab_size (void) const;
  void tab_size (unsigned long val);

  /// Command line passed to ACE_Process::spawn. Different
  /// implementations in IDL and IFR backends.
  ACE_CString spawn_options (void);

  /// Parse args that affect the backend.
  void parse_args (long &i, char **av);

private:
  /**
   * To switch between changing or non-changing standard include
   * files (e.g. tao/corba.h)  so that #include statements can be
   * generated with ""s or <>s respectively.
   */
  size_t changing_standard_include_files_;

  // Macros and includes used to export classes from generated code.
  char* skel_export_macro_;
  char* skel_export_include_;
  char* skel_export_file_;
  char* stub_export_macro_;
  char* stub_export_include_;
  char* stub_export_file_;

  // Macro and include used on ORB .pidl files generating to the
  // AnyTypeCode library.
  char* anyop_export_macro_;
  char* anyop_export_include_;

  char* exec_export_macro_;
  char* exec_export_include_;
  char* svnt_export_macro_;
  char* svnt_export_include_;
  char* conn_export_macro_;
  char* conn_export_include_;

  char* pch_include_;
  char* pre_include_;
  char* post_include_;
  char* include_guard_;
  char* safe_include_;
  char* unique_include_;

  /// Text that opens a "versioned" namespace for core TAO and orbsvcs
  /// related code.
  ACE_CString core_versioning_begin_;

  /// Text that closes a "versioned" namespace for core TAO and
  /// orbsvcs related code.
  ACE_CString core_versioning_end_;

  /// Text that opens a "versioned" namepace.
  ACE_CString versioning_begin_;

  /// Text that closes a "versioned" namepace.
  ACE_CString versioning_end_;

  /// Client's header file name ending. Default is "C.h".
  char* client_hdr_ending_;

  /// Client's stub's file name ending. Default is "C.cpp".
  char* client_stub_ending_;

  /// Client's inline file name ending. Default is "C.i".
  char* client_inline_ending_;

  /// Server's hdr file name ending. Default is "S.h".
  char* server_hdr_ending_;

  /// Implementation's hdr file name ending. Default is "I.h".
  char* implementation_hdr_ending_;

  // Implementation's skeleton file name ending. Default is "I.cpp".
  char* implementation_skel_ending_;

  /// Implementaion class prefix
  char* impl_class_prefix_;

  /// Implementation class suffix
  char* impl_class_suffix_;

  /// Server's template hdr file name ending. Default is "S_T.h".
  char* server_template_hdr_ending_;

  /// Server's skeleton file name ending. Default is "S.cpp".
  char* server_skeleton_ending_;

  /// Server's template skeleton file name ending. Default is
  /// "S_T.cpp".
  char* server_template_skeleton_ending_;

  /// Server's inline file name ending. Default is "S.i".
  char* server_inline_ending_;

  /// Anyop header file name ending. Default is "A.h".
  char* anyop_hdr_ending_;

  /// Anyop source file name ending. Default is "A.cpp".
  char* anyop_src_ending_;

  /// CIAO servant header file name ending. Default is "_svnt.h".
  char* ciao_svnt_hdr_ending_;

  /// CIAO servant source file name ending. Default is "_svnt.cpp".
  char* ciao_svnt_src_ending_;

  /// CIAO executor impl header file name ending. Default is "_exec.h".
  char* ciao_exec_hdr_ending_;

  /// CIAO executor impl source file name ending. Default is "_exec.cpp".
  char* ciao_exec_src_ending_;

  /// CIAO executor stub header file name ending. Default is "EC.h".
  char* ciao_exec_stub_hdr_ending_;

  /// CIAO executor IDL file name ending. Default is "E.idl".
  char* ciao_exec_idl_ending_;

  /// CIAO connector impl header file name ending. Default is "_conn.h".
  char* ciao_conn_hdr_ending_;

  /// CIAO connector impl source file name ending. Default is "_conn.cpp".
  char* ciao_conn_src_ending_;

  /// DDS TypeSupport header file name ending. Default is "Support.h".
  char* dds_typesupport_hdr_ending_;

  /// CIAO AMI connector IDL file name ending. Default is "A.idl".
  char* ciao_ami_conn_idl_ending_;

  /// CIAO AMI reply handler impl header file name ending.
  /// Default is "A_impl.h".
  char* ciao_ami_conn_impl_hdr_ending_;

  /// CIAO AMI reply handler impl source file name ending.
  /// Default is "A_impl.cpp".
  char* ciao_ami_conn_impl_src_ending_;

  /// CIAO container type
  /// Default is "Session".
  char* ciao_container_type_;

  /**
   * Directory where all the IDL-Compiler-Generated files are to be
   * kept. Default value is 0 for this string which means the current
   * directory from which the <tao_idl> is called.
   */
  char* output_dir_;

  /**
   * Path for all *C.* includes. Default value is 0, in which case
   * the local directory or $TAO_ROOT/tao is used.
   */
  char* stub_include_dir_;

  /**
   * Directory where all the *S.* files are to be
   * kept. Default value is 0 for this string which means the
   * value for output_dir_ is used.
   */
  char* skel_output_dir_;

  /**
   * Directory where all the *A.* files are to be
   * kept. Default value is 0 for this string which means the
   * value for output_dir_ is used.
   */
  char* anyop_output_dir_;

  /// do we support Any operators?
  bool any_support_;

  /// do we support cdr?
  bool cdr_support_;

  /// do we support typecodes?
  bool tc_support_;

  /// do we optimize valuetype accessors?
  bool obv_opt_accessor_;

  /// are we generating implementation files?
  bool gen_impl_files_;

  /// are we generating source file and line numbers for implementation files?
  bool gen_impl_debug_info_;

  /// are we generating the copy constructor?
  bool gen_copy_ctor_;

  /// are we generating the assignment operator?
  bool gen_assign_op_;

  /// are we generating Thru_POA collocated stubs?
  bool gen_thru_poa_collocation_;

  /// are we generating Direct collocated stubs?
  bool gen_direct_collocation_;

  /// are we generating for CORBA/e
  bool gen_corba_e_;

  /// are we generating for Minimum CORBA
  bool gen_minimum_corba_;

  /// are we generating for LwCCM
  bool gen_lwccm_;

  /// are we generating for noeventCCM
  bool gen_noeventccm_;

  /// do we generate optimized typecodes?
  bool opt_tc_;

  /// Flag to indicate whether the AMI4ccm Call back feature should be enabled
  /// for the generated files or not.
  bool ami4ccm_call_back_;

  /**
   * Flag to indicate whether the AMI Call back feature of the
   * Messaging specification should be enabled for the generated files
   * or not.
   */
  bool ami_call_back_;

  /// Flag for generating AMH classes.
  bool gen_amh_classes_;

  /// Flag to indicate whether we generate the tie classes and
  /// files or not.
  bool gen_tie_classes_;

  /// Flag to indicate whether smart proxies classes will be generated
  /// or not.
  bool gen_smart_proxies_;

  /// Flag to indicate whether we are using an inline form of constant
  /// generation that pleases the C++ compiler better on some platforms.
  bool gen_inline_constants_;

  /// Flag to indicate whether ORB.h include should be generated, needed for
  /// regenerating the pidl files.
  bool gen_orb_h_include_;

  /// Flag to indicate whether an empty A.h should be generated
  bool gen_empty_anyop_header_;

  /// The enumerated value indicating the lookup strategy.
  LOOKUP_STRATEGY lookup_strategy_;

  /// The enumerated value indicating the DDS implementation.
  DDS_IMPL dds_impl_;

  /// Option to customize the suffix of OpenDDS-specific sequences,
  /// for use with CIAO's dds4ccm implementation.
  ACE_CString opendds_sequence_suffix_;

  /// Used for void operation return types.
  AST_PredefinedType *void_type_;

  /// Reference holder for component skeleton visitors.
  be_interface *ccmobject_;

  /// Storage for the messaging exceptions holder's virtual scope.
  be_module *messaging_;

  /// Storage for exception holders' base class node.
  be_valuetype *messaging_exceptionholder_;

  /// Storage for the reply handlers' base class node.
  be_interface *messaging_replyhandler_;

  /// Separate files for generated Any operators?
  bool gen_anyop_files_;

  /// True by default, but a command line option can turn this off so
  /// we generate only an empty *S.h file on the skeleton side.
  bool gen_skel_files_;

  /// True by default, but a command line option can turn this off so
  /// that we don't generate a client inline file
  bool gen_client_inline_;

  /// True by default, but a command line option can turn this off so
  /// that we don't generate a server inline file
  bool gen_server_inline_;

  /// True by default, but a command line option can turn this off so
  /// that we don't generate a client stub file
  bool gen_client_stub_;

  /// True by default, but a command line option can turn this off so
  /// that we don't generate a server skeleton file
  bool gen_server_skeleton_;

  /// True by default, can be turned off by a command line option
  /// for regenerating internal ORB files.
  bool gen_local_iface_anyops_;

  /// Use in_clonable_arg_val instead of in_arg_val?
  bool use_clonable_in_args_;

  /// Generate explicit export for Visual Studio bug workaround,
  /// needed only in TAO basic sequence *C.h files.
  bool gen_template_export_;

  /// Generate ostream operators for each type declaration, for
  /// debugging or logging.
  bool gen_ostream_operators_;

  /**
   * True by default, but a command line option can turn this off so
   * custom ending will not be applied to files in $TAO_ROOT/,
   * $TAO_ROOT/tao, $TAO_ROOT/orbsvcs, $TAO_ROOT/CIAO, $TAO_ROOT/CIAO/ciao.
   */
  bool gen_custom_ending_;

 /**
   * True by default, but a command line option can turn this off so
   * the generated code (header) files will not be proteced by unique guards.
   */
  bool gen_unique_guards_;

  /// False by default, these flags trigger code generation
  /// formerly done by the CIAO CIDL compiler.
  bool gen_ciao_svnt_;
  bool gen_ciao_exec_idl_;
  bool gen_ciao_exec_impl_;
  bool gen_ciao_exec_reactor_impl_;

  /// False by default, this flag triggers code generation
  /// for CCM connector implementations.
  bool gen_ciao_conn_impl_;

  /// Used for DDS implementations other than OpenDDS.
  bool gen_dds_typesupport_idl_;

  /// Generate automatic valuetype factory registration in
  /// CIAO servants.
  bool gen_ciao_valuefactory_reg_;

  /// Flags toggling export header file generation.
  bool gen_stub_export_hdr_file_;
  bool gen_skel_export_hdr_file_;
  bool gen_svnt_export_hdr_file_;
  bool gen_exec_export_hdr_file_;
  bool gen_conn_export_hdr_file_;

  /// Toggles generation of exec IDL for facets with imported
  /// interface types (not in main IDL file).
  bool gen_lem_force_all_;

  /// 2 spaces by default, can be set from the command line.
  unsigned int tab_size_;

  /// Are we generating STL types?
  bool alt_mapping_;

  /// Are we in the act of generating a facet servant?
  bool in_facet_servant_;

  /// Are we generating arg traits template instantiations?
  bool gen_arg_traits_;

  /// Generating arg traits in the ORB for the basic type
  /// sequences requires the AnyTypeCode_Adapter class.
  bool gen_anytypecode_adapter_;
};

#endif /* _BE_GLOBAL_H */