diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-12-17 03:17:24 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-12-17 03:17:24 +0000 |
commit | fbe59a9fd9c79a58c8eff004bf0881ff0bbd1723 (patch) | |
tree | dc3eb9d070c1a4fae6b26e56b7013d52b3c70370 /TAO/TAO_IDL | |
parent | 65558df5cea0b2e5e6dabc007c74fb454b9c842a (diff) | |
download | ATCD-fbe59a9fd9c79a58c8eff004bf0881ff0bbd1723.tar.gz |
ChangeLogTag:Fri Dec 16 18:06:27 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r-- | TAO/TAO_IDL/be/be_global.cpp | 78 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_global.h | 27 | ||||
-rw-r--r-- | TAO/TAO_IDL/driver/drv_args.cpp | 5 |
4 files changed, 93 insertions, 19 deletions
diff --git a/TAO/TAO_IDL/be/be_global.cpp b/TAO/TAO_IDL/be/be_global.cpp index 9eb2c7031c2..0a2c93b5867 100644 --- a/TAO/TAO_IDL/be/be_global.cpp +++ b/TAO/TAO_IDL/be/be_global.cpp @@ -47,8 +47,13 @@ BE_GlobalData::BE_GlobalData (void) post_include_ (0), core_versioning_begin_ ("\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n"), core_versioning_end_ ("\nTAO_END_VERSIONED_NAMESPACE_DECL\n"), +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) versioning_begin_ (), versioning_end_ (), +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ client_hdr_ending_ (ACE::strnew ("C.h")), client_stub_ending_ (ACE::strnew ("C.cpp")), client_inline_ending_ (ACE::strnew ("C.inl")), @@ -566,6 +571,10 @@ BE_GlobalData::post_include (const char *s) this->post_include_ = ACE_OS::strdup (s); } +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) void BE_GlobalData::versioning_begin (const char * s) { @@ -576,11 +585,20 @@ BE_GlobalData::versioning_begin (const char * s) this->core_versioning_end_ += this->versioning_begin_; // Yes, "begin". } +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ const char * BE_GlobalData::versioning_begin (void) const { +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) return this->versioning_begin_.c_str (); +#else + static char const empty_string[] = ""; + return empty_string; +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ } const char * @@ -589,6 +607,10 @@ BE_GlobalData::core_versioning_begin (void) const return this->core_versioning_begin_.c_str (); } +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) void BE_GlobalData::versioning_end (const char * s) { @@ -601,11 +623,20 @@ BE_GlobalData::versioning_end (const char * s) this->versioning_end_ // Yes, "end". + this->core_versioning_begin_; // Initialized in constructor. } +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ const char * BE_GlobalData::versioning_end (void) const { +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) return this->versioning_end_.c_str (); +#else + static char const empty_string[] = ""; + return empty_string; +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ } const char * @@ -1836,18 +1867,26 @@ BE_GlobalData::parse_args (long &i, char **av) void BE_GlobalData::prep_be_arg (char *s) { - const char arg_macro[] = "export_macro="; - const char arg_include[] = "export_include="; - const char skel_arg_macro[] = "skel_export_macro="; - const char skel_arg_include[] = "skel_export_include="; - const char stub_arg_macro[] = "stub_export_macro="; - const char stub_arg_include[] = "stub_export_include="; - const char anyop_arg_macro[] = "anyop_export_macro="; - const char anyop_arg_include[] = "anyop_export_include="; - const char arg_pch_include[] = "pch_include="; - const char arg_pre_include[] = "pre_include="; - const char arg_post_include[] = "post_include="; - const char obv_opt_accessor[] = "obv_opt_accessor"; + static const char arg_macro[] = "export_macro="; + static const char arg_include[] = "export_include="; + static const char skel_arg_macro[] = "skel_export_macro="; + static const char skel_arg_include[] = "skel_export_include="; + static const char stub_arg_macro[] = "stub_export_macro="; + static const char stub_arg_include[] = "stub_export_include="; + static const char anyop_arg_macro[] = "anyop_export_macro="; + static const char anyop_arg_include[] = "anyop_export_include="; + static const char arg_pch_include[] = "pch_include="; + static const char arg_pre_include[] = "pre_include="; + static const char arg_post_include[] = "post_include="; + static const char obv_opt_accessor[] = "obv_opt_accessor"; + +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) + static const char arg_versioning_begin[] = "versioning_begin="; + static const char arg_versioning_end[] = "versioning_end="; +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ char* last = 0; @@ -1916,6 +1955,21 @@ BE_GlobalData::prep_be_arg (char *s) { be_global->obv_opt_accessor (1); } +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) + else if (ACE_OS::strstr (arg, arg_versioning_begin) == arg) + { + char const * const val = arg + sizeof (arg_versioning_begin) - 1; + be_global->versioning_begin (val); + } + else if (ACE_OS::strstr (arg, arg_versioning_end) == arg) + { + char const * const val = arg + sizeof (arg_versioning_end) - 1; + be_global->versioning_end (val); + } +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ else { ACE_ERROR ((LM_ERROR, diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp index d36a5155638..897acca7ad6 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp @@ -63,7 +63,7 @@ be_visitor_union_any_op_ch::visit_union (be_union *node) *os << macro << " ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const " << node->name () << " *&);"; - *os << be_global->core_versioning_begin () << be_nl; + *os << be_global->core_versioning_end () << be_nl; if (this->visit_scope (node) == -1) { diff --git a/TAO/TAO_IDL/be_include/be_global.h b/TAO/TAO_IDL/be_include/be_global.h index e27e4dd5b3e..33e8d5c4df9 100644 --- a/TAO/TAO_IDL/be_include/be_global.h +++ b/TAO/TAO_IDL/be_include/be_global.h @@ -206,9 +206,14 @@ public: // set the name of the include file to be put at the bottom of every // header file. +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) /// Set text that opens a "versioned" namespace. void versioning_begin (const char* s); - +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ + /// Get text that opens a "versioned" namespace. const char * versioning_begin (void) const; @@ -216,9 +221,14 @@ public: /// related code. const char * core_versioning_begin (void) const; +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) /// Set text that closes a "versioned" namespace. void versioning_end (const char* s); - +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ + /// Get text that closes a "versioned" namespace. const char * versioning_end (void) const; @@ -542,19 +552,24 @@ private: char* pre_include_; char* post_include_; - /// Text that opens a "versioned" namespace for core TAO/orbsvcs + /// 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/orbsvcs - /// related code. + /// Text that closes a "versioned" namespace for core TAO and + /// orbsvcs related code. ACE_CString core_versioning_end_; - + +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) /// Text that opens a "versioned" namepace. ACE_CString versioning_begin_; /// Text that closes a "versioned" namepace. ACE_CString versioning_end_; +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ // Client's header file name ending. Default is "C.h". char* client_hdr_ending_; diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp index 46b0ccb5c36..df41cf50ab3 100644 --- a/TAO/TAO_IDL/driver/drv_args.cpp +++ b/TAO/TAO_IDL/driver/drv_args.cpp @@ -246,6 +246,10 @@ DRV_usage (void) ACE_TEXT (" -Wb,obv_opt_accessor\t\t\t\toptimizes access to base class ") ACE_TEXT ("data in valuetypes\n") )); +#if (defined (ACE_HAS_VERSIONED_NAMESPACE) \ + && ACE_HAS_VERSIONED_NAMESPACE == 1) \ + || (defined (TAO_HAS_VERSIONED_NAMESPACE) \ + && TAO_HAS_VERSIONED_NAMESPACE == 1) ACE_DEBUG (( LM_DEBUG, ACE_TEXT (" -Wb,versioning_begin\t\t\tSet text that opens a ") @@ -256,6 +260,7 @@ DRV_usage (void) ACE_TEXT (" -Wb,versioning_end\t\t\tSet text that closes a ") ACE_TEXT ("a \"versioned\" namespace\n") )); +#endif /* ACE_HAS_VERSIONED_NAMESPACE || TAO_HAS_VERSIONED_NAMESPACE */ ACE_DEBUG (( LM_DEBUG, ACE_TEXT (" -Yp,path\t\tdefines location of preprocessor\n") |