diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-12-16 00:25:00 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-12-16 00:25:00 +0000 |
commit | 65558df5cea0b2e5e6dabc007c74fb454b9c842a (patch) | |
tree | 4f453550ddf36ca62a8c0e35a690e6ff42e99a78 | |
parent | 39d20f3e3777907df8e87fe5906ebbfc966951a8 (diff) | |
download | ATCD-65558df5cea0b2e5e6dabc007c74fb454b9c842a.tar.gz |
ChangeLogTag:Thu Dec 15 16:19:48 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
43 files changed, 340 insertions, 37 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 51f14e632b6..005e08d99d9 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,53 @@ +Thu Dec 15 16:19:48 2005 Ossama Othman <ossama@dre.vanderbilt.edu> + + * TAO_IDL/be/be_codegen.cpp: + * TAO_IDL/be/be_global.cpp: + * TAO_IDL/be/be_valuetype.cpp: + * TAO_IDL/be/be_visitor_arg_traits.cpp: + * TAO_IDL/be/be_visitor_traits.cpp: + * TAO_IDL/be/be_visitor_array/any_op_ch.cpp: + * TAO_IDL/be/be_visitor_array/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp: + * TAO_IDL/be/be_visitor_enum/any_op_ch.cpp: + * TAO_IDL/be/be_visitor_enum/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp: + * TAO_IDL/be/be_visitor_exception/any_op_ch.cpp: + * TAO_IDL/be/be_visitor_exception/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp: + * TAO_IDL/be/be_visitor_interface/any_op_ch.cpp: + * TAO_IDL/be/be_visitor_interface/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp: + * TAO_IDL/be/be_visitor_root/root.cpp: + * TAO_IDL/be/be_visitor_root/root_ch.cpp: + * TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp: + * TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp: + * TAO_IDL/be/be_visitor_structure/any_op_ch.cpp: + * TAO_IDL/be/be_visitor_structure/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp: + * TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp: + * TAO_IDL/be/be_visitor_union/any_op_ch.cpp: + * TAO_IDL/be/be_visitor_union/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp: + * TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp: + * TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp: + * TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp: + * TAO_IDL/be_include/be_global.h: + * TAO_IDL/driver/drv_args.cpp: + + Added ability to set "versioned" namespace opening and closing + text. Addresses problem where applications that do not enable + versioned namespace support in their own code need not get + "versioned" stubs/skeletons. + Tue Dec 13 12:13:26 2005 Douglas C. Schmidt <schmidt@cs.wustl.edu> * COPYING: Updated this file to mention compliance issues wrt the diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index 7afc494d4a4..409b79db827 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -31,15 +31,6 @@ ACE_RCSID (be, "$Id$") -namespace -{ - char const TAO_BEGIN_VERSIONED_NAMESPACE_DECL[] = - "\n\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\n"; - - char const TAO_END_VERSIONED_NAMESPACE_DECL[] = - "\n\nTAO_END_VERSIONED_NAMESPACE_DECL\n\n"; -} - TAO_CodeGen * tao_cg = 0; TAO_CodeGen::TAO_CodeGen (void) @@ -256,7 +247,7 @@ TAO_CodeGen::start_client_header (const char *fname) // Begin versioned namespace support after initial headers have been // included, but before the inline file and post include // directives. - *this->client_header_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->client_header_ << be_global->versioning_begin (); return 0; } @@ -311,7 +302,7 @@ TAO_CodeGen::start_client_stubs (const char *fname) // Begin versioned namespace support after all headers have been // included, but before any code is generated. - *this->client_stubs_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->client_stubs_ << be_global->versioning_begin (); return 0; } @@ -348,7 +339,7 @@ TAO_CodeGen::start_client_inline (const char *fname) // Begin versioned namespace support after initial headers, if any, // have been included. - *this->client_inline_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->client_inline_ << be_global->versioning_begin (); return 0; } @@ -490,7 +481,7 @@ TAO_CodeGen::start_server_header (const char *fname) // Begin versioned namespace support after initial headers have been // included, but before the inline file and post include // directives. - *this->server_header_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->server_header_ << be_global->versioning_begin (); return 0; } @@ -548,7 +539,7 @@ TAO_CodeGen::start_server_template_header (const char *fname) // Begin versioned namespace support after initial headers have been // included, but before the inline file and post include // directives. - *this->server_template_header_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->server_template_header_ << be_global->versioning_begin (); return 0; } @@ -626,7 +617,7 @@ TAO_CodeGen::start_server_skeletons (const char *fname) // Begin versioned namespace support after initial headers have been // included, but before the inline file and post include // directives. - *this->server_skeletons_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->server_skeletons_ << be_global->versioning_begin (); return 0; } @@ -692,7 +683,7 @@ TAO_CodeGen::start_server_template_skeletons (const char *fname) // Begin versioned namespace support after initial headers have been // included, but before the inline file and post include // directives. - *this->server_template_skeletons_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->server_template_skeletons_ << be_global->versioning_begin (); return 0; } @@ -729,7 +720,7 @@ TAO_CodeGen::start_server_inline (const char *fname) // Begin versioned namespace support after initial headers, if any, have been // included. - *this->server_inline_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->server_inline_ << be_global->versioning_begin (); return 0; } @@ -769,7 +760,7 @@ TAO_CodeGen::start_server_template_inline (const char *fname) // Begin versioned namespace support after initial headers have been // included, but before the inline file and post include // directives. - *this->server_template_inline_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->server_template_inline_ << be_global->versioning_begin (); return 0; } @@ -921,7 +912,7 @@ TAO_CodeGen::start_anyop_header (const char *fname) // Begin versioned namespace support after initial headers have been // included, but before the inline file and post include // directives. - *this->anyop_header_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->anyop_header_ << be_global->versioning_begin (); return 0; } @@ -966,7 +957,7 @@ TAO_CodeGen::start_anyop_source (const char *fname) // Begin versioned namespace support after initial headers have been // included, but before the inline file and post include // directives. - *this->anyop_source_ << TAO_BEGIN_VERSIONED_NAMESPACE_DECL; + *this->anyop_source_ << be_global->versioning_begin (); return 0; } @@ -1098,12 +1089,12 @@ TAO_CodeGen::end_client_header (void) // Generate the <<= and >>= operators here. *this->client_header_ << be_nl << be_nl << "// TAO_IDL - Generated from" - << be_nl << "// " << __FILE__ << ":" << __LINE__; - + << be_nl << "// " << __FILE__ << ":" << + __LINE__ << be_nl; // End versioned namespace support before remaining include // directives at end of file. - *this->client_header_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->client_header_ << be_global->versioning_end (); // Only when we generate a client inline file generate the include if (be_global->gen_client_inline ()) @@ -1137,7 +1128,7 @@ TAO_CodeGen::end_client_inline (void) // End versioned namespace support. Do not place include directives // before this. - *this->client_inline_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->client_inline_ << be_global->versioning_end (); } void @@ -1147,7 +1138,7 @@ TAO_CodeGen::end_client_stubs (void) // End versioned namespace support. Do not place include directives // before this. - *this->client_stubs_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->client_stubs_ << be_global->versioning_end (); } int @@ -1159,7 +1150,7 @@ TAO_CodeGen::end_server_header (void) // End versioned namespace support. Do not place include directives // before this. - *this->server_header_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->server_header_ << be_global->versioning_end (); // Insert the template header. if (be_global->gen_tie_classes ()) @@ -1201,7 +1192,7 @@ TAO_CodeGen::end_server_inline (void) // End versioned namespace support. Do not place include directives // before this. - *this->server_inline_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->server_inline_ << be_global->versioning_end (); } int @@ -1261,7 +1252,7 @@ TAO_CodeGen::end_server_template_header (void) // End versioned namespace support. Do not place include directives // before this. - *this->server_template_header_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->server_template_header_ << be_global->versioning_end (); // Insert the code to include the inline file. *this->server_template_header_ << "#if defined (__ACE_INLINE__)"; @@ -1310,7 +1301,7 @@ TAO_CodeGen::end_server_template_inline (void) // End versioned namespace support. Do not place include directives // before this. - *this->server_template_inline_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->server_template_inline_ << be_global->versioning_end (); return 0; } @@ -1320,7 +1311,7 @@ TAO_CodeGen::end_server_template_skeletons (void) { // End versioned namespace support. Do not place include directives // before this. - *this->server_template_skeletons_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->server_template_skeletons_ << be_global->versioning_end (); // Code to put the last #endif. *this->server_template_skeletons_ << "\n#endif /* ifndef */\n"; @@ -1333,7 +1324,7 @@ TAO_CodeGen::end_server_skeletons (void) { // End versioned namespace support. Do not place include directives // before this. - *this->server_skeletons_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->server_skeletons_ << be_global->versioning_end (); // Code to put the last #endif. *this->server_skeletons_ << "\n\n#endif /* ifndef */\n"; @@ -1346,7 +1337,7 @@ TAO_CodeGen::end_anyop_header (void) { // End versioned namespace support. Do not place include directives // before this. - *this->anyop_header_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->anyop_header_ << be_global->versioning_end (); if (be_global->post_include () != 0) @@ -1367,7 +1358,7 @@ TAO_CodeGen::end_anyop_source (void) { // End versioned namespace support. Do not place include directives // before this. - *this->anyop_source_ << TAO_END_VERSIONED_NAMESPACE_DECL; + *this->anyop_source_ << be_global->versioning_end (); *this->anyop_source_ << "\n"; diff --git a/TAO/TAO_IDL/be/be_global.cpp b/TAO/TAO_IDL/be/be_global.cpp index 7a2fad72b1b..9eb2c7031c2 100644 --- a/TAO/TAO_IDL/be/be_global.cpp +++ b/TAO/TAO_IDL/be/be_global.cpp @@ -45,6 +45,10 @@ BE_GlobalData::BE_GlobalData (void) pch_include_ (0), pre_include_ (0), post_include_ (0), + core_versioning_begin_ ("\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n"), + core_versioning_end_ ("\nTAO_END_VERSIONED_NAMESPACE_DECL\n"), + versioning_begin_ (), + versioning_end_ (), client_hdr_ending_ (ACE::strnew ("C.h")), client_stub_ending_ (ACE::strnew ("C.cpp")), client_inline_ending_ (ACE::strnew ("C.inl")), @@ -562,6 +566,54 @@ BE_GlobalData::post_include (const char *s) this->post_include_ = ACE_OS::strdup (s); } +void +BE_GlobalData::versioning_begin (const char * s) +{ + this->versioning_begin_ = + ACE_CString ("\n\n") + + ACE_CString (s) + + ACE_CString ("\n\n"); + + this->core_versioning_end_ += this->versioning_begin_; // Yes, "begin". +} + +const char * +BE_GlobalData::versioning_begin (void) const +{ + return this->versioning_begin_.c_str (); +} + +const char * +BE_GlobalData::core_versioning_begin (void) const +{ + return this->core_versioning_begin_.c_str (); +} + +void +BE_GlobalData::versioning_end (const char * s) +{ + this->versioning_end_ = + ACE_CString ("\n\n") + + ACE_CString (s) + + ACE_CString ("\n\n"); + + this->core_versioning_begin_ = + this->versioning_end_ // Yes, "end". + + this->core_versioning_begin_; // Initialized in constructor. +} + +const char * +BE_GlobalData::versioning_end (void) const +{ + return this->versioning_end_.c_str (); +} + +const char * +BE_GlobalData::core_versioning_end (void) const +{ + return this->core_versioning_end_.c_str (); +} + // Set the client_hdr_ending. void BE_GlobalData::client_hdr_ending (const char* s) diff --git a/TAO/TAO_IDL/be/be_valuetype.cpp b/TAO/TAO_IDL/be/be_valuetype.cpp index b8fd83d6b6c..3e2550cd081 100644 --- a/TAO/TAO_IDL/be/be_valuetype.cpp +++ b/TAO/TAO_IDL/be/be_valuetype.cpp @@ -457,6 +457,8 @@ be_valuetype::gen_helper_header (char *, char *) << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + *os << "namespace CORBA" << be_nl << "{" << be_idt_nl @@ -468,6 +470,8 @@ be_valuetype::gen_helper_header (char *, char *) *os << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + return 0; } @@ -484,6 +488,7 @@ be_valuetype::gen_helper_inline (char *, char *) << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; *os << "#if defined (__ACE_INLINE__)" << be_nl << be_nl + << be_global->core_versioning_begin () << be_nl << "namespace CORBA" << be_nl << "{" << be_idt_nl @@ -493,6 +498,7 @@ be_valuetype::gen_helper_inline (char *, char *) << this->full_name () << " *);" << be_uidt_nl << "}" << be_nl << be_nl + << be_global->core_versioning_end () << be_nl << "#endif /*__ACE_INLINE__*/"; return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp index f7a77246c3f..476d94437bd 100644 --- a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp @@ -69,6 +69,8 @@ be_visitor_arg_traits::visit_root (be_root *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; + *os << be_global->core_versioning_begin () << be_nl; + *os << be_nl << be_nl << "// Arg traits specializations." << be_nl << "namespace TAO" << be_nl @@ -85,6 +87,8 @@ be_visitor_arg_traits::visit_root (be_root *node) *os << be_uidt_nl << "}" << be_nl; + *os << be_global->core_versioning_end () << be_nl; + return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp index 950690a142f..b3ec2642578 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp @@ -52,11 +52,15 @@ be_visitor_array_any_op_ch::visit_array (be_array *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + *os << macro << " void operator<<= (::CORBA::Any &, const " << node->name () << "_forany &);" << be_nl; *os << macro << " ::CORBA::Boolean operator>>= (const ::CORBA::Any &, " << node->name () << "_forany &);"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_hdr_any_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp index 06073cb6f91..facda38a048 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp @@ -54,6 +54,8 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) << "// TAO_IDL - Generated from " << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Since we don't generate CDR stream operators for types that // explicitly contain a local interface (at some level), we // must override these Any template class methods to avoid @@ -125,6 +127,8 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) << ");" << be_uidt << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_stub_any_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp index 00d3ecc3ff0..5cc70fe22a7 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp @@ -115,6 +115,8 @@ be_visitor_array_cdr_op_ch::visit_array (be_array *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Generate the CDR << and >> operator declarations. *os << be_global->stub_export_macro () << " CORBA::Boolean" << " operator<< (TAO_OutputCDR &, const "; @@ -150,6 +152,8 @@ be_visitor_array_cdr_op_ch::visit_array (be_array *node) *os << node->name () << "_forany &);"; } + *os << be_global->core_versioning_end () << be_nl; + node->cli_hdr_cdr_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp index a3725dc31d4..20a3092c9aa 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp @@ -176,6 +176,8 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Set the sub state as generating code for the output operator. this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_OUTPUT); *os << "::CORBA::Boolean operator<< (" << be_idt << be_idt_nl @@ -213,6 +215,8 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) *os << "}"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_stub_cdr_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp index 91c1fde0c47..4b815165473 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp @@ -51,6 +51,8 @@ be_visitor_enum_any_op_ch::visit_enum (be_enum *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; + *os << be_global->core_versioning_begin () << be_nl; + // Generate the Any <<= and >>= operators. *os << be_nl << be_nl << macro << " void operator<<= (::CORBA::Any &, " << node->name () @@ -58,6 +60,8 @@ be_visitor_enum_any_op_ch::visit_enum (be_enum *node) *os << macro << " ::CORBA::Boolean operator>>= (const ::CORBA::Any &, " << node->name () << " &);"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_hdr_any_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp index f35cc47839a..71f18bac4f5 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp @@ -51,6 +51,8 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Since we don't generate CDR stream operators for types that // explicitly contain a local interface (at some level), we // must override these Any template class methods to avoid @@ -109,6 +111,8 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_stub_any_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp index 0315d8d709b..395390ba4fd 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp @@ -49,12 +49,16 @@ be_visitor_enum_cdr_op_ch::visit_enum (be_enum *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // generate the CDR << and >> operators *os << be_global->stub_export_macro () << " ::CORBA::Boolean" << " operator<< (TAO_OutputCDR &, " << node->name () << ");" << be_nl; *os << be_global->stub_export_macro () << " ::CORBA::Boolean" << " operator>> (TAO_InputCDR &, " << node->name () << " &);"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_hdr_cdr_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp index 03fe27f85e6..4b7067c7ab2 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp @@ -50,6 +50,8 @@ be_visitor_enum_cdr_op_cs::visit_enum (be_enum *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + *os << "::CORBA::Boolean operator<< (TAO_OutputCDR & strm, " << node->name () << " _tao_enumerator)" << be_nl << "{" << be_idt_nl @@ -71,6 +73,8 @@ be_visitor_enum_cdr_op_cs::visit_enum (be_enum *node) << "return _tao_success;" << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_stub_cdr_op_gen (I_TRUE); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp index 4be883ec90b..3682ee0670d 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp @@ -52,6 +52,8 @@ be_visitor_exception_any_op_ch::visit_exception (be_exception *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; + *os << be_global->core_versioning_begin () << be_nl; + *os << be_nl << be_nl << macro << " void operator<<= (::CORBA::Any &, const " << node->name () << " &); // copying version" << be_nl; @@ -62,7 +64,8 @@ be_visitor_exception_any_op_ch::visit_exception (be_exception *node) *os << macro << " ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const " << node->name () << " *&);"; - + *os << be_global->core_versioning_end () << be_nl; + // All we have to do is to visit the scope and generate code. if (this->visit_scope (node) == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp index 9dbed0d7913..2a0618d7809 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp @@ -49,6 +49,8 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) << "// TAO_IDL - Generated from " << be_nl << "// " << __FILE__ << ":" << __LINE__; + *os << be_global->core_versioning_begin () << be_nl; + if (!node->is_local ()) { *os << be_nl << be_nl @@ -174,6 +176,8 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + // all we have to do is to visit the scope and generate code if (this->visit_scope (node) == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp index bea4c76931f..920e14412e7 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp @@ -51,6 +51,8 @@ be_visitor_exception_cdr_op_ch::visit_exception (be_exception *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; + *os << be_global->core_versioning_begin () << be_nl; + *os << be_nl << be_nl << be_global->stub_export_macro () << " ::CORBA::Boolean" << " operator<< (TAO_OutputCDR &, const " << node->name () @@ -59,6 +61,7 @@ be_visitor_exception_cdr_op_ch::visit_exception (be_exception *node) << " operator>> (TAO_InputCDR &, " << node->name () << " &);"; + *os << be_global->core_versioning_end () << be_nl; // Set the substate as generating code for the types defined in our scope. this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_SCOPE); diff --git a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp index 66756dd7705..ce9d86f8d83 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp @@ -59,6 +59,8 @@ be_visitor_exception_cdr_op_cs::visit_exception (be_exception *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; + *os << be_global->core_versioning_begin () << be_nl; + // Set the sub state as generating code for the output operator. this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_OUTPUT); @@ -164,6 +166,8 @@ be_visitor_exception_cdr_op_cs::visit_exception (be_exception *node) *os << "}"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_stub_cdr_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp index 21681f94492..e87982b4447 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp @@ -92,6 +92,8 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node) *os << "#else\n\n"; } + *os << be_global->core_versioning_begin () << be_nl; + *os << macro << " void operator<<= (::CORBA::Any &, " << node->name () << "_ptr); // copying" << be_nl; *os << macro << " void operator<<= (::CORBA::Any &, " << node->name () @@ -99,6 +101,8 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node) *os << macro << " ::CORBA::Boolean operator>>= (const ::CORBA::Any &, " << node->name () << "_ptr &);"; + *os << be_global->core_versioning_end () << be_nl; + if (module != 0) { *os << "\n\n#endif"; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp index 9bcbcba0496..87e0899c0b2 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp @@ -53,6 +53,8 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) // All template specializations must be generated before the instantiations // in the operators. + *os << be_global->core_versioning_begin () << be_nl; + if (! node->is_abstract ()) { *os << be_nl << be_nl @@ -121,6 +123,7 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) << "}"; } + *os << be_global->core_versioning_end () << be_nl; be_module *module = 0; @@ -196,6 +199,8 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) *os << "#else\n"; } + *os << be_global->core_versioning_begin () << be_nl; + *os << be_nl << be_nl << "// Copying insertion." << be_nl << "void" << be_nl @@ -241,6 +246,8 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + if (module != 0) { *os << "\n\n#endif"; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp index 845866a7568..c09ed666805 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp @@ -54,6 +54,8 @@ be_visitor_interface_cdr_op_ch::visit_interface (be_interface *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Generate the CDR << and >> operator declarations. *os << be_global->stub_export_macro () << " ::CORBA::Boolean " << "operator<< (TAO_OutputCDR &, const " << node->full_name () @@ -62,6 +64,8 @@ be_visitor_interface_cdr_op_ch::visit_interface (be_interface *node) << "operator>> (TAO_InputCDR &, " << node->full_name () << "_ptr &);"; + *os << be_global->core_versioning_end () << be_nl; + // Set the substate as generating code for the types defined in our scope. this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_SCOPE); diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp index d115c4671c6..369273c817e 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp @@ -62,6 +62,8 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Set the sub state as generating code for the output operator. this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_OUTPUT); @@ -140,6 +142,8 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node) *os << "return 1;" << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_stub_cdr_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_root/root.cpp b/TAO/TAO_IDL/be/be_visitor_root/root.cpp index 5c384bae2ef..53da1f01bac 100644 --- a/TAO/TAO_IDL/be/be_visitor_root/root.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root/root.cpp @@ -197,6 +197,8 @@ int be_visitor_root::visit_root (be_root *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + *os << "// Overrides of CORBA::release and CORBA::is_nil for" << be_nl << "// interfaces that inherit from both CORBA::Object" << be_nl @@ -220,6 +222,8 @@ int be_visitor_root::visit_root (be_root *node) { *os << be_uidt_nl << "}"; + + *os << be_global->core_versioning_end () << be_nl; } } diff --git a/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp b/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp index 095d73b3fc8..26ab72be1cc 100644 --- a/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp @@ -61,6 +61,8 @@ be_visitor_root_ch::init (void) << "// TAO_IDL - Generated from " << be_nl << "// " << __FILE__ << ":" << __LINE__; + *os << be_global->core_versioning_begin () << be_nl; + *os << be_nl << be_nl << "namespace TAO" << be_nl << "{" << be_idt_nl; @@ -72,7 +74,10 @@ be_visitor_root_ch::init (void) *os << "template<typename T> class AbstractBase_Narrow_Utils;" << be_nl; } - *os << "template<typename T> class Narrow_Utils;" << be_uidt_nl << "}" ; + *os << "template<typename T> class Narrow_Utils;" << be_uidt_nl + << "}" ; + + *os << be_global->core_versioning_end () << be_nl; } return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp index 772e2435db0..9195f4c7d3e 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp @@ -52,6 +52,8 @@ be_visitor_sequence_any_op_ch::visit_sequence (be_sequence *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Generate the Any <<= and >>= operators. *os << macro; *os << " void" @@ -74,6 +76,8 @@ be_visitor_sequence_any_op_ch::visit_sequence (be_sequence *node) *os << node->name (); *os << " *&);"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_hdr_any_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp index a614ac55509..a4699901a26 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp @@ -53,6 +53,8 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << "// TAO_IDL - Generated from " << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Since we don't generate CDR stream operators for types that // explicitly contain a local interface (at some level), we // must override these Any template class methods to avoid @@ -149,6 +151,8 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_stub_any_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp index 6b0e1e24d2b..c4a48dd236e 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp @@ -79,6 +79,8 @@ be_visitor_sequence_cdr_op_ch::visit_sequence (be_sequence *node) << "\n#define _TAO_CDR_OP_" << node->flat_name () << "_H_"; } + *os << be_global->core_versioning_begin () << be_nl; + *os << be_nl << be_nl << be_global->stub_export_macro () << " ::CORBA::Boolean" << " operator<< (" << be_idt << be_idt_nl @@ -91,6 +93,8 @@ be_visitor_sequence_cdr_op_ch::visit_sequence (be_sequence *node) << node->name () << " &" << be_uidt_nl << ");" << be_uidt; + *os << be_global->core_versioning_end () << be_nl; + if (!tdef) { *os << "\n\n#endif /* _TAO_CDR_OP_" diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp index fdb63147f1b..d0013d76194 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp @@ -100,6 +100,8 @@ be_visitor_sequence_cdr_op_cs::visit_sequence (be_sequence *node) << "#define _TAO_CDR_OP_" << node->flat_name () << "_CPP_" << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Set the sub state as generating code for the output operator. this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_OUTPUT); @@ -252,6 +254,8 @@ be_visitor_sequence_cdr_op_cs::visit_sequence (be_sequence *node) *os << "return false;" << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + *os << be_nl << be_nl << "#endif /* _TAO_CDR_OP_" << node->flat_name () << "_CPP_ */"; diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp index c1a351406d4..3d30576a792 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp @@ -52,6 +52,8 @@ be_visitor_structure_any_op_ch::visit_structure (be_structure *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + *os << macro << " void operator<<= (::CORBA::Any &, const " << node->name () << " &); // copying version" << be_nl; *os << macro << " void operator<<= (::CORBA::Any &, " << node->name () @@ -61,6 +63,7 @@ be_visitor_structure_any_op_ch::visit_structure (be_structure *node) *os << macro << " ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const " << node->name () << " *&);"; + *os << be_global->core_versioning_end () << be_nl; // All we have to do is to visit the scope and generate code. if (this->visit_scope (node) == -1) diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp index bbb3250ab5f..ec9ee323817 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp @@ -53,6 +53,8 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) << "// TAO_IDL - Generated from " << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Since we don't generate CDR stream operators for types that // explicitly contain a local interface (at some level), we // must override these Any template class methods to avoid @@ -150,6 +152,8 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + // all we have to do is to visit the scope and generate code if (this->visit_scope (node) == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp index f29f1e5a5fd..8986fd0f56b 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp @@ -53,6 +53,8 @@ be_visitor_structure_cdr_op_ch::visit_structure (be_structure *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + *os << be_global->stub_export_macro () << " ::CORBA::Boolean" << " operator<< (TAO_OutputCDR &, const " << node->name () << " &);" << be_nl; @@ -60,6 +62,7 @@ be_visitor_structure_cdr_op_ch::visit_structure (be_structure *node) << " operator>> (TAO_InputCDR &, " << node->name () << " &);"; + *os << be_global->core_versioning_end () << be_nl; // Set the substate as generating code for the types defined in our scope. this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_SCOPE); diff --git a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp index 73841a9b18e..8b1322ad2d8 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp @@ -60,6 +60,8 @@ be_visitor_structure_cdr_op_cs::visit_structure (be_structure *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Set the sub state as generating code for the output operator. this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_OUTPUT); @@ -135,6 +137,8 @@ be_visitor_structure_cdr_op_cs::visit_structure (be_structure *node) *os << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_stub_cdr_op_gen (I_TRUE); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_traits.cpp b/TAO/TAO_IDL/be/be_visitor_traits.cpp index a75d0943cd3..20c8625047f 100644 --- a/TAO/TAO_IDL/be/be_visitor_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_traits.cpp @@ -61,6 +61,8 @@ be_visitor_traits::visit_root (be_root *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; + *os << be_global->core_versioning_begin () << be_nl; + *os << be_nl << be_nl << "// Traits specializations." << be_nl << "namespace TAO" << be_nl @@ -77,6 +79,8 @@ be_visitor_traits::visit_root (be_root *node) *os << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp index 9a5328f90a7..ee9a79df3e8 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp @@ -645,7 +645,10 @@ be_visitor_typecode_defn::visit_array (be_array *node) // @todo Can we automate duplicate detection within the IDL compiler // itself? os << "\n#ifndef _TAO_TYPECODE_" << node->flat_name () << "_GUARD" - << "\n#define _TAO_TYPECODE_" << node->flat_name () << "_GUARD" << be_nl; + << "\n#define _TAO_TYPECODE_" << node->flat_name () << "_GUARD" + << be_nl; + + os << be_global->core_versioning_begin () << be_nl; // namespace begin os << "namespace TAO" << be_nl @@ -728,6 +731,8 @@ be_visitor_typecode_defn::visit_array (be_array *node) << "}" << be_uidt_nl << "}" << be_nl << be_nl; + os << be_global->core_versioning_end () << be_nl; + os << "\n#endif /* _TAO_TYPECODE_" << node->flat_name () << "_GUARD */" << be_nl; @@ -962,6 +967,9 @@ be_visitor_typecode_defn::visit_sequence (be_sequence * node) << "\n#define _TAO_TYPECODE_" << node->flat_name () << "_GUARD" << be_nl; // namespace begin + + os << be_global->core_versioning_begin () << be_nl; + os << "namespace TAO" << be_nl << "{" << be_idt_nl << "namespace TypeCode" << be_nl @@ -998,6 +1006,8 @@ be_visitor_typecode_defn::visit_sequence (be_sequence * node) << "}" << be_uidt_nl << "}" << be_nl << be_nl; + os << be_global->core_versioning_end () << be_nl; + os << "\n#endif /* _TAO_TYPECODE_" << node->flat_name () << "_GUARD */" << be_nl << be_nl; @@ -1030,6 +1040,9 @@ be_visitor_typecode_defn::visit_string (be_string * node) << "\n#define _TAO_TYPECODE_" << node->flat_name () << "_GUARD" << be_nl; // namespace begin + + os << be_global->core_versioning_begin () << be_nl; + os << "namespace TAO" << be_nl << "{" << be_idt_nl << "namespace TypeCode" << be_nl @@ -1055,6 +1068,8 @@ be_visitor_typecode_defn::visit_string (be_string * node) << "}" << be_uidt_nl << "}" << be_nl << be_nl; + os << be_global->core_versioning_end () << be_nl; + os << "\n#endif /* _TAO_TYPECODE_" << node->flat_name () << "_GUARD */" << be_nl << be_nl; 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 fe951a47060..d36a5155638 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 @@ -52,6 +52,8 @@ be_visitor_union_any_op_ch::visit_union (be_union *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + *os << macro << " void operator<<= (::CORBA::Any &, const " << node->name () << " &); // copying version" << be_nl; *os << macro << " void operator<<= (::CORBA::Any &, " << node->name () @@ -61,6 +63,8 @@ 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; + if (this->visit_scope (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp index 62532ab116b..b84932013c1 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp @@ -53,6 +53,8 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) << "// TAO_IDL - Generated from " << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Since we don't generate CDR stream operators for types that // explicitly contain a local interface (at some level), we // must override these Any template class methods to avoid @@ -150,6 +152,8 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + // All we have to do is to visit the scope and generate code. if (this->visit_scope (node) == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp index c65afad6779..f55a5c83d83 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp @@ -53,6 +53,8 @@ be_visitor_union_cdr_op_ch::visit_union (be_union *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + *os << be_global->stub_export_macro () << " ::CORBA::Boolean" << " operator<< (TAO_OutputCDR &, const " << node->name () << " &);" << be_nl; @@ -60,6 +62,7 @@ be_visitor_union_cdr_op_ch::visit_union (be_union *node) << " operator>> (TAO_InputCDR &, " << node->name () << " &);"; + *os << be_global->core_versioning_end () << be_nl; // Set the substate as generating code for the types defined in our scope. this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_SCOPE); diff --git a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp index 6c12a1dd7b1..59a621cf4b2 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp @@ -66,6 +66,8 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + // Set the sub state as generating code for the output operator. this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_OUTPUT); @@ -203,6 +205,8 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) << "return result;" << be_uidt_nl << "}"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_stub_cdr_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp index 91ab4bab216..e763f9917c9 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp @@ -69,7 +69,7 @@ be_visitor_valuebox_any_op_ch::visit_valuebox (be_valuebox *node) -1); } - // Some compilers handle "any" operators in a namespace + // Some compilers handle "any" operatorrs in a namespace // corresponding to their module, others do not. *os << "\n\n#if defined (ACE_ANY_OPS_USE_NAMESPACE)\n"; @@ -94,6 +94,8 @@ be_visitor_valuebox_any_op_ch::visit_valuebox (be_valuebox *node) *os << "#else\n\n"; } + *os << be_global->core_versioning_begin () << be_nl; + *os << macro << " void operator<<= (::CORBA::Any &, " << node->name () << " *); // copying" << be_nl; @@ -103,6 +105,8 @@ be_visitor_valuebox_any_op_ch::visit_valuebox (be_valuebox *node) *os << macro << " ::CORBA::Boolean operator>>= (const ::CORBA::Any &, " << node->name () << " *&);"; + *os << be_global->core_versioning_end () << be_nl; + if (module != 0) { *os << "\n\n#endif"; diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp index b4945e33bf9..cde4eff0f7c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp @@ -55,6 +55,8 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; + *os << be_global->core_versioning_begin () << be_nl; + // All template specializations must be generated before the instantiations // in the operators. *os << be_nl << be_nl @@ -73,6 +75,7 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) << "}" << be_uidt_nl << "}" << be_nl << be_nl; + *os << be_global->core_versioning_end () << be_nl; be_module *module = 0; @@ -146,6 +149,8 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) *os << "#else\n\n"; } + *os << be_global->core_versioning_begin () << be_nl; + *os << "// Copying insertion." << be_nl << "void" << be_nl << "operator<<= (" << be_idt << be_idt_nl @@ -189,6 +194,8 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) << ");" << be_uidt << be_uidt << be_uidt_nl << "}" << be_nl << be_nl; + *os << be_global->core_versioning_end () << be_nl; + if (module != 0) { *os << "\n\n#endif"; diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp index e6984d70a1f..29e474db40b 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp @@ -49,6 +49,8 @@ be_visitor_valuebox_cdr_op_ch::visit_valuebox (be_valuebox *node) << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + *os << be_global->core_versioning_begin () << be_nl; + *os << be_global->stub_export_macro () << " " << "::CORBA::Boolean operator<< (TAO_OutputCDR &, const " << node->full_name () << " *);" << be_nl; @@ -57,6 +59,8 @@ be_visitor_valuebox_cdr_op_ch::visit_valuebox (be_valuebox *node) << "::CORBA::Boolean operator>> (TAO_InputCDR &, " << node->full_name () << " *&);"; + *os << be_global->core_versioning_end () << be_nl; + node->cli_hdr_cdr_op_gen (1); return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp index 44534680d0e..176f4994b97 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp @@ -51,6 +51,8 @@ be_visitor_valuebox_cdr_op_cs::visit_valuebox (be_valuebox *node) *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; +*os << be_global->core_versioning_begin () << be_nl; + // Set the sub state as generating code for the output operator. this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_OUTPUT); @@ -83,6 +85,7 @@ be_visitor_valuebox_cdr_op_cs::visit_valuebox (be_valuebox *node) << be_uidt_nl << "}" << be_nl << be_nl; + *os << be_global->core_versioning_end () << be_nl; return 0; } diff --git a/TAO/TAO_IDL/be_include/be_global.h b/TAO/TAO_IDL/be_include/be_global.h index 2bdc8ada201..e27e4dd5b3e 100644 --- a/TAO/TAO_IDL/be_include/be_global.h +++ b/TAO/TAO_IDL/be_include/be_global.h @@ -206,6 +206,26 @@ public: // set the name of the include file to be put at the bottom of every // header file. + /// 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. void client_hdr_ending (const char* s); @@ -522,6 +542,20 @@ private: char* pre_include_; char* post_include_; + /// Text that opens a "versioned" namespace for core TAO/orbsvcs + /// related code. + ACE_CString core_versioning_begin_; + + /// Text that closes a "versioned" namespace for core TAO/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_; diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp index 1d94b68f1c3..46b0ccb5c36 100644 --- a/TAO/TAO_IDL/driver/drv_args.cpp +++ b/TAO/TAO_IDL/driver/drv_args.cpp @@ -248,6 +248,16 @@ DRV_usage (void) )); ACE_DEBUG (( LM_DEBUG, + ACE_TEXT (" -Wb,versioning_begin\t\t\tSet text that opens a ") + ACE_TEXT ("a \"versioned\" namespace\n") + )); + ACE_DEBUG (( + LM_DEBUG, + ACE_TEXT (" -Wb,versioning_end\t\t\tSet text that closes a ") + ACE_TEXT ("a \"versioned\" namespace\n") + )); + ACE_DEBUG (( + LM_DEBUG, ACE_TEXT (" -Yp,path\t\tdefines location of preprocessor\n") )); |