diff options
author | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-02-01 02:30:34 +0000 |
---|---|---|
committer | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-02-01 02:30:34 +0000 |
commit | 785dbe6888d89ebc4c0c06e6ab996aff1f20c281 (patch) | |
tree | 939b7ded80ee788d2b852059a2283702e36a16e2 | |
parent | 2024d20ffaaaef98e249ca4c1ce79d0255b1b49d (diff) | |
download | ATCD-785dbe6888d89ebc4c0c06e6ab996aff1f20c281.tar.gz |
Added these two options to the tao_idl compiler.
-in To generate #include statements with <>'s for the standard include
files (e.g. tao/corba.h) indicating them as non-changing files
-ic To generate #include statements with ""s for changing standard
include files (e.g. tao/corba.h).
-rw-r--r-- | TAO/TAO_IDL/be/be_codegen.cpp | 22 | ||||
-rw-r--r-- | TAO/TAO_IDL/driver/drv_args.cpp | 9 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/idl_global.h | 18 | ||||
-rw-r--r-- | TAO/TAO_IDL/tao_idl.1 | 8 |
4 files changed, 53 insertions, 4 deletions
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index f16147d5736..9139bdc081e 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -158,7 +158,27 @@ TAO_CodeGen::start_client_header (const char *fname) this->client_header_->print ("#if !defined (%s)\n", macro_name); this->client_header_->print ("#define %s\n\n", macro_name); - *this->client_header_ << "#include \"tao/corba.h\"\n"; + // Including standard files + + // switch between changing or non-changing standard include files + // include files, so that #include statements can be + // generated with ""s or <>s respectively, for the standard include + // files (e.g. tao/corba.h) + *this->client_header_ << "#include "; + + if (idl_global->changing_standard_include_files () == 1) + *this->client_header_ << "\""; + else + *this->client_header_ << "<"; + + *this->client_header_ << "tao/corba.h"; + + if (idl_global->changing_standard_include_files () == 1) + *this->client_header_ << "\"\n"; + else + *this->client_header_ << ">\n"; + + // Other include files if (idl_global->export_include () != 0) { diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp index 4e484b0496e..4bd11fcb43d 100644 --- a/TAO/TAO_IDL/driver/drv_args.cpp +++ b/TAO/TAO_IDL/driver/drv_args.cpp @@ -136,6 +136,8 @@ DRV_usage (void) cerr << GTDEVEL (" -H dynamic_hash\t\tTo force dynamic hashed operation lookup strategy. Default is perfect hashing\n"); cerr << GTDEVEL (" -H linear_search\t\tTo force linear searchoperation lookup strategy\n"); cerr << GTDEVEL (" -H binary_search\t\tTo force binary search operation lookup strategy\n"); + cerr << GTDEVEL (" -in \t\t\tTo generate <>s for standard #include'd files (non-changing files)\n"); + cerr << GTDEVEL (" -ic \t\t\tTo generate \"\"s for standard #include'd files (changing files) <\n"); cerr << GTDEVEL (" -Idir\t\t\tincludes dir in search path for preprocessor\n"); cerr << GTDEVEL (" -o <output_dir>\tOutput directory for the generated files. Default is current directory\n"); cerr << GTDEVEL (" -si\t\t\tServer's inline file name ending. Default is S.i\n"); @@ -342,6 +344,13 @@ DRV_parse_args (long ac, char **av) i++; break; + // Switching between "'s and <'s when we generate + // #include statements for the standard files (e.g. tao/corba.h) + case 'i': + if (av[i][2] == 'c') + idl_global->changing_standard_include_files (1); + break; + // Path for the perfect hash generator(gperf) program. Default // is $ACE_ROOT/bin/gperf. case 'g': diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h index 8d3ad855127..1d78e6bf613 100644 --- a/TAO/TAO_IDL/include/idl_global.h +++ b/TAO/TAO_IDL/include/idl_global.h @@ -280,8 +280,8 @@ public: // = Access methods to deal with other IDL files included in the main // IDL file. These IDL files are exactly the same strings that are - // "#include"d in the main IDL file, not the ones after CC - // preprocessor parsed the file. + // "#include"d in the main IDL file, not the ones after CC + // preprocessor parsed the file. // Just storing the pointer. No memory will be allocated. virtual void add_to_included_idl_files (char* file_name); @@ -315,7 +315,14 @@ public: virtual void idl_src_file(String *); // Set the source IDL file that is being parsed. - // helper functions that generate the file names for the C++ mapping + virtual void changing_standard_include_files (size_t changing); + virtual size_t changing_standard_include_files (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. + + + // 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 @@ -562,6 +569,11 @@ private: // before? String *pd_idl_src_file; // IDL source file. + + size_t changing_standard_include_files_; + // 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. char* export_macro_; char* export_include_; diff --git a/TAO/TAO_IDL/tao_idl.1 b/TAO/TAO_IDL/tao_idl.1 index 9e1cf66f469..ebd9e76d402 100644 --- a/TAO/TAO_IDL/tao_idl.1 +++ b/TAO/TAO_IDL/tao_idl.1 @@ -86,6 +86,14 @@ based operation lookup strategy. To specify the IDL compiler to generate skelton code that uses linear search based operation lookup strategy. .TP +.B "\-in" +To generate #include statements with <>'s for the standard include +files (e.g. tao/corba.h) indicating them as non-changing files +.TP +.B "\-ic" +To generate #include statements with ""s for changing standard include +files (e.g. tao/corba.h). +.TP .B \-g To specify the path for the perfect hasing program (GPERF). Default is $ACE_ROOT/bin/gperf or whatever the ACE_GPERF macro was defined to be during |