From 83374d0cd016fa2ef62a11fb680a0e5d1a006031 Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Fri, 29 Oct 2021 20:57:32 -0500 Subject: GitHub Actions: Try MSVC builds with /std:c++17 and 20 --- .github/workflows/windows.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index dd81de97a90..36927bb9bc9 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -83,6 +83,24 @@ jobs: vcpkgarch: x86-windows vcpkglibdir: lib vcpkgpackages: openssl xerces-c zlib + - name: VS2019Debug64Cxx17 + vmimage: windows-2019 + mpctype: vs2019 + BuildPlatform: x64 + BuildConfiguration: Debug + vcpkgarch: x64-windows + vcpkglibdir: debug/lib + vcpkgpackages: openssl xerces-c zlib + OptionalMpcArgs: -value_template LanguageStandard=stdcpp17 + - name: VS2019Debug64Cxx20 + vmimage: windows-2019 + mpctype: vs2019 + BuildPlatform: x64 + BuildConfiguration: Debug + vcpkgarch: x64-windows + vcpkglibdir: debug/lib + vcpkgpackages: openssl xerces-c zlib + OptionalMpcArgs: -value_template LanguageStandard=stdcpp20 runs-on: ${{ matrix.vmimage }} name: ${{ matrix.name }} env: @@ -131,11 +149,11 @@ jobs: if: matrix.OptionalFeatures != '' - name: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc run: | - perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4 + perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4 ${{ matrix.OptionalMpcArgs }} shell: pwsh - name: Run mwc.pl on $(ACE_ROOT)/tests/tests.mwc run: | - perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:ACE_ROOT}/tests/tests.mwc -workers 4 + perl ${env:ACE_ROOT}/bin/mwc.pl -type ${{ matrix.mpctype }} ${env:ACE_ROOT}/tests/tests.mwc -workers 4 ${{ matrix.OptionalMpcArgs }} shell: pwsh - name: Setup msbuild uses: microsoft/setup-msbuild@v1 -- cgit v1.2.1 From ee68b18b68d55a6ad9daa1e67a6ebb681ce7a7c5 Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Sat, 30 Oct 2021 14:34:42 -0500 Subject: Fix compile errors on MSVC /std:c++17 --- ACE/ace/config-win32-msvc-142.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ACE/ace/config-win32-msvc-142.h b/ACE/ace/config-win32-msvc-142.h index af47ad9f722..daed3972259 100644 --- a/ACE/ace/config-win32-msvc-142.h +++ b/ACE/ace/config-win32-msvc-142.h @@ -25,5 +25,13 @@ #include "ace/config-win32-msvc-141.h" +#if _MSVC_LANG >= 202002L +# define ACE_HAS_CPP20 +#endif /* _MSVC_LANG >= 202002L */ + +#ifdef ACE_HAS_CPP17 +# define ACE_LACKS_AUTO_PTR +#endif + #include /**/ "ace/post.h" #endif /* ACE_CONFIG_WIN32_MSVC_142_H */ -- cgit v1.2.1 From 38932737b23d0e25dfed197b0e48137e7eea1a21 Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Sat, 30 Oct 2021 17:22:45 -0500 Subject: Add versioned namespace macros --- ACE/ace/Auto_Ptr.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ACE/ace/Auto_Ptr.h b/ACE/ace/Auto_Ptr.h index 9c10c1fde61..01236ce8198 100644 --- a/ACE/ace/Auto_Ptr.h +++ b/ACE/ace/Auto_Ptr.h @@ -73,6 +73,8 @@ ACE_END_VERSIONED_NAMESPACE_DECL using std::auto_ptr; #else /* !ACE_LACKS_AUTO_PTR */ +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + /** * @class auto_ptr * @@ -90,6 +92,8 @@ public: X *operator-> () const; }; +ACE_END_VERSIONED_NAMESPACE_DECL + #endif /* !ACE_LACKS_AUTO_PTR */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL -- cgit v1.2.1 From 9baea8b9ba5c34b5bf96f56c4852bb9824e85a3e Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Sun, 31 Oct 2021 12:56:00 -0500 Subject: ACE tests: fixed compatibility with MSVC /std:c++17 --- ACE/tests/DLL_Test.cpp | 2 ++ ACE/tests/Integer_Truncate_Test.cpp | 5 ++++- ACE/tests/Reactor_Remove_Resume_Test.cpp | 5 ++++- ACE/tests/randomize.h | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ACE/tests/DLL_Test.cpp b/ACE/tests/DLL_Test.cpp index 43facd7d8f4..7e43c6267f8 100644 --- a/ACE/tests/DLL_Test.cpp +++ b/ACE/tests/DLL_Test.cpp @@ -18,6 +18,8 @@ #include "ace/OS_NS_dlfcn.h" #include "DLL_Test.h" +#include + #if defined (ACE_LD_DECORATOR_STR) # define OBJ_SUFFIX ACE_LD_DECORATOR_STR ACE_DLL_SUFFIX #else diff --git a/ACE/tests/Integer_Truncate_Test.cpp b/ACE/tests/Integer_Truncate_Test.cpp index 0ba6b9fad83..ff15888cc73 100644 --- a/ACE/tests/Integer_Truncate_Test.cpp +++ b/ACE/tests/Integer_Truncate_Test.cpp @@ -329,8 +329,11 @@ sizeof_from_gt_sizeof_to () * Test method invocation functor. */ template -struct Caller : public std::unary_function +struct Caller { + typedef T argument_type; + typedef void result_type; + /// Constructor Caller () : success (true) {} diff --git a/ACE/tests/Reactor_Remove_Resume_Test.cpp b/ACE/tests/Reactor_Remove_Resume_Test.cpp index 16f23a6cbf1..e70af6e1f09 100644 --- a/ACE/tests/Reactor_Remove_Resume_Test.cpp +++ b/ACE/tests/Reactor_Remove_Resume_Test.cpp @@ -381,8 +381,11 @@ tp_reactor_factory () * * Reactor test execution functor. */ -struct Run_Test : public std::unary_function +struct Run_Test { + typedef reactor_factory_type argument_type; + typedef void result_type; + /// Function call operator overload. void operator() (reactor_factory_type factory) { diff --git a/ACE/tests/randomize.h b/ACE/tests/randomize.h index bdebd4db5e9..5389814548f 100644 --- a/ACE/tests/randomize.h +++ b/ACE/tests/randomize.h @@ -48,9 +48,10 @@ namespace */ template class randomize_element - : public std::unary_function { public: + typedef T &argument_type; + typedef void result_type; randomize_element (T * array, size_t size, unsigned int seed) : array_ (array) -- cgit v1.2.1 From b01722554a69d1850c026d529e5b0a5e023961cd Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Sun, 31 Oct 2021 21:07:11 -0500 Subject: getting libACE to compile with /std:c++20 avoid ambiguous calls to overloaded operators --- ACE/ace/Malloc.h | 2 ++ ACE/ace/Malloc_T.cpp | 26 +++++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ACE/ace/Malloc.h b/ACE/ace/Malloc.h index 06cc550c507..5f8e2fed9bc 100644 --- a/ACE/ace/Malloc.h +++ b/ACE/ace/Malloc.h @@ -287,6 +287,8 @@ public: void dump () const; }; + typedef ACE_Malloc_Header *MALLOC_HEADER_PTR; + /** * @class ACE_Name_Node * diff --git a/ACE/ace/Malloc_T.cpp b/ACE/ace/Malloc_T.cpp index ff8d6563db0..47d9126e96a 100644 --- a/ACE/ace/Malloc_T.cpp +++ b/ACE/ace/Malloc_T.cpp @@ -633,8 +633,8 @@ ACE_Malloc_T::shared_malloc (size_t nbytes) (nbytes + sizeof (MALLOC_HEADER) - 1) / sizeof (MALLOC_HEADER) + 1; // Add one for the itself. - MALLOC_HEADER *prevp = 0; - MALLOC_HEADER *currp = 0; + typename ACE_CB::MALLOC_HEADER_PTR prevp = 0; + typename ACE_CB::MALLOC_HEADER_PTR currp = 0; ACE_SEH_TRY { @@ -671,7 +671,7 @@ ACE_Malloc_T::shared_malloc (size_t nbytes) // allocate at tail end. ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nblocks_); currp->size_ -= nunits; - currp += currp->size_; + currp += static_cast (currp->size_); MALLOC_HEADER::init_ptr (&currp->next_block_, 0, this->cb_ptr_); @@ -697,7 +697,7 @@ ACE_Malloc_T::shared_malloc (size_t nbytes) if (remap_addr != 0) this->cb_ptr_ = (ACE_CB *) remap_addr; - if (currp != 0) + if (currp) { ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nblocks_); ACE_MALLOC_STATS (++this->cb_ptr_->malloc_stats_.nchunks_); @@ -787,8 +787,8 @@ ACE_Malloc_T::shared_free (void *ap) return; // Adjust AP to point to the block MALLOC_HEADER - MALLOC_HEADER *blockp = ((MALLOC_HEADER *) ap) - 1; - MALLOC_HEADER *currp = this->cb_ptr_->freep_; + typename ACE_CB::MALLOC_HEADER_PTR blockp = ((MALLOC_HEADER *) ap) - 1; + typename ACE_CB::MALLOC_HEADER_PTR currp = this->cb_ptr_->freep_; // Search until we find the location where the blocks belongs. Note // that addresses are kept in sorted order. @@ -797,18 +797,20 @@ ACE_Malloc_T::shared_free (void *ap) { for (; blockp <= currp - || blockp >= (MALLOC_HEADER *) currp->next_block_; + || blockp >= currp->next_block_; currp = currp->next_block_) { - if (currp >= (MALLOC_HEADER *) currp->next_block_ + if (currp >= currp->next_block_ && (blockp > currp - || blockp < (MALLOC_HEADER *) currp->next_block_)) + || blockp < currp->next_block_)) // Freed block at the start or the end of the memory pool. break; } // Join to upper neighbor. - if ((blockp + blockp->size_) == currp->next_block_) + typename ACE_CB::MALLOC_HEADER_PTR next = blockp; + next += static_cast (blockp->size_); // ACE_Based_Pointer has += but not + + if (next == currp->next_block_) { ACE_MALLOC_STATS (--this->cb_ptr_->malloc_stats_.nblocks_); blockp->size_ += currp->next_block_->size_; @@ -818,7 +820,9 @@ ACE_Malloc_T::shared_free (void *ap) blockp->next_block_ = currp->next_block_; // Join to lower neighbor. - if ((currp + currp->size_) == blockp) + next = currp; + next += static_cast (currp->size_); + if (next == blockp) { ACE_MALLOC_STATS (--this->cb_ptr_->malloc_stats_.nblocks_); currp->size_ += blockp->size_; -- cgit v1.2.1 From 58754472d3be09f540e6e3632a7175539aa25dba Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Sun, 31 Oct 2021 21:38:48 -0500 Subject: tao_idl updates for /std:c++20 resolved ambiguous call to operator<< by refactoring to avoid repetition of the same statement 300 times --- TAO/TAO_IDL/be/be_codegen.cpp | 82 +++++----------------- TAO/TAO_IDL/be/be_helper.cpp | 6 ++ TAO/TAO_IDL/be/be_interface.cpp | 6 +- TAO/TAO_IDL/be/be_type.cpp | 7 +- TAO/TAO_IDL/be/be_valuetype.cpp | 13 ++-- TAO/TAO_IDL/be/be_visitor_arg_traits.cpp | 36 +++------- TAO/TAO_IDL/be/be_visitor_array/any_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp | 4 +- TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_array/cdr_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp | 3 +- .../be/be_visitor_connector/facet_ami_exh.cpp | 7 +- TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_enum/any_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_enum/cdr_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_enum/cdr_op_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_exception/any_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp | 4 +- TAO/TAO_IDL/be/be_visitor_exception/cdr_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_exception/cdr_op_cs.cpp | 3 +- .../be/be_visitor_exception/exception_ch.cpp | 3 +- .../be/be_visitor_exception/exception_cs.cpp | 3 +- .../be/be_visitor_exception/exception_ctor.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_interface/amh_rh_sh.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_interface/amh_rh_ss.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp | 6 +- .../be_visitor_interface/ami4ccm_conn_ex_idl.cpp | 4 +- .../be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp | 4 +- .../be_visitor_interface/ami4ccm_sendc_ex_idl.cpp | 4 +- TAO/TAO_IDL/be/be_visitor_interface/any_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_interface/cdr_op_cs.cpp | 3 +- .../be_visitor_interface/direct_proxy_impl_sh.cpp | 4 +- .../be/be_visitor_interface/interface_ch.cpp | 6 +- .../be/be_visitor_interface/interface_ci.cpp | 3 +- .../be/be_visitor_interface/interface_cs.cpp | 3 +- .../be/be_visitor_interface/interface_ih.cpp | 3 +- .../be/be_visitor_interface/interface_is.cpp | 3 +- .../be/be_visitor_interface/interface_sh.cpp | 3 +- .../be/be_visitor_interface/interface_ss.cpp | 12 ++-- .../be/be_visitor_interface/smart_proxy_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_interface/tie_ss.cpp | 3 +- .../be/be_visitor_interface_fwd/any_op_ch.cpp | 3 +- .../be/be_visitor_interface_fwd/cdr_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp | 14 ++-- TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp | 7 +- TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp | 5 +- TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp | 3 +- .../be_visitor_operation/direct_proxy_impl_ss.cpp | 3 +- .../be/be_visitor_operation/operation_cs.cpp | 3 +- .../be/be_visitor_operation/operation_ih.cpp | 3 +- .../be/be_visitor_operation/operation_is.cpp | 3 +- .../be/be_visitor_operation/operation_sh.cpp | 3 +- .../be/be_visitor_operation/operation_ss.cpp | 3 +- .../be/be_visitor_operation/proxy_impl_xh.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_operation/tie_sh.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp | 3 +- .../be/be_visitor_operation/upcall_command_ss.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp | 13 +--- TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_sequence/any_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp | 4 +- TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_structure/any_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp | 4 +- TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp | 3 +- .../be/be_visitor_structure/structure_ch.cpp | 3 +- .../be/be_visitor_structure/structure_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_template_export.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_traits.cpp | 4 +- .../be/be_visitor_typecode/alias_typecode.cpp | 4 +- .../be/be_visitor_typecode/enum_typecode.cpp | 4 +- .../be/be_visitor_typecode/objref_typecode.cpp | 4 +- .../be/be_visitor_typecode/struct_typecode.cpp | 4 +- .../be/be_visitor_typecode/typecode_decl.cpp | 3 +- .../be/be_visitor_typecode/typecode_defn.cpp | 12 +--- .../be/be_visitor_typecode/union_typecode.cpp | 4 +- .../be/be_visitor_typecode/value_typecode.cpp | 4 +- TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp | 30 +++----- TAO/TAO_IDL/be/be_visitor_union/any_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp | 4 +- TAO/TAO_IDL/be/be_visitor_union/cdr_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp | 3 +- .../be/be_visitor_union/discriminant_ch.cpp | 6 +- .../be/be_visitor_union/discriminant_ci.cpp | 6 +- TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp | 3 +- .../be/be_visitor_union_branch/private_ch.cpp | 36 ++++------ .../be/be_visitor_union_branch/public_ch.cpp | 42 ++++------- .../be/be_visitor_union_branch/public_ci.cpp | 30 +++----- TAO/TAO_IDL/be/be_visitor_valuebox/any_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_ch.cpp | 4 +- TAO/TAO_IDL/be/be_visitor_valuebox/cdr_op_cs.cpp | 5 +- TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp | 27 +++---- TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp | 28 +++----- .../be/be_visitor_valuebox/union_member_ci.cpp | 28 +++----- TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp | 31 +++----- TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp | 21 ++---- TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp | 24 +++---- TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp | 4 +- TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp | 36 ++++------ TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp | 33 +++------ TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp | 3 +- .../be/be_visitor_valuetype/valuetype_ch.cpp | 9 +-- .../be/be_visitor_valuetype/valuetype_ci.cpp | 3 +- .../be/be_visitor_valuetype/valuetype_cs.cpp | 6 +- .../be/be_visitor_valuetype/valuetype_init_ch.cpp | 3 +- .../be/be_visitor_valuetype/valuetype_init_cs.cpp | 3 +- .../be/be_visitor_valuetype/valuetype_obv_ch.cpp | 6 +- .../be/be_visitor_valuetype/valuetype_obv_cs.cpp | 3 +- .../be/be_visitor_valuetype/valuetype_sh.cpp | 3 +- .../be/be_visitor_valuetype/valuetype_ss.cpp | 3 +- .../be/be_visitor_valuetype_fwd/any_op_ch.cpp | 3 +- .../be/be_visitor_valuetype_fwd/cdr_op_ch.cpp | 3 +- TAO/TAO_IDL/be_include/be_helper.h | 3 + 139 files changed, 310 insertions(+), 662 deletions(-) diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index b94578fc1a9..c886e5b6135 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -145,9 +145,7 @@ TAO_CodeGen::start_client_header (const char *fname) return -1; } - *this->client_header_ << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->client_header_); // Generate the #ident string, if any. this->gen_ident_string (this->client_header_); @@ -362,9 +360,7 @@ TAO_CodeGen::start_client_stubs (const char *fname) return -1; } - *this->client_stubs_ << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->client_stubs_); this->gen_stub_src_includes (); @@ -446,10 +442,7 @@ TAO_CodeGen::start_server_header (const char *fname) return -1; } - *this->server_header_ << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->server_header_); // Generate the ident string, if any. this->gen_ident_string (this->server_header_); @@ -575,12 +568,7 @@ TAO_CodeGen::start_server_template_header (const char *fname) return -1; } - *this->server_template_header_ << be_nl - << "// TAO_IDL - Generated from" - << be_nl - << "// " << __FILE__ - << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->server_template_header_); // Generate the ident string, if any. this->gen_ident_string (this->server_template_header_); @@ -631,9 +619,7 @@ TAO_CodeGen::start_server_skeletons (const char *fname) return -1; } - *this->server_skeletons_ << be_nl_2 << "// TAO_IDL - Generated from" - << be_nl << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->server_skeletons_); // Generate the ident string, if any. this->gen_ident_string (this->server_skeletons_); @@ -693,10 +679,7 @@ TAO_CodeGen::start_server_template_skeletons (const char *fname) return -1; } - *this->server_template_skeletons_ << be_nl << "// TAO_IDL - Generated from" - << be_nl << "// " - << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->server_template_skeletons_); // Generate the ident string, if any. this->gen_ident_string (this->server_template_skeletons_); @@ -772,10 +755,7 @@ TAO_CodeGen::start_anyop_header (const char *fname) return 0; } - *this->anyop_header_ << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->anyop_header_); // Generate the #ident string, if any. this->gen_ident_string (this->anyop_header_); @@ -1007,10 +987,7 @@ TAO_CodeGen::start_ciao_svnt_header (const char *fname) TAO_OutStream &os = *this->ciao_svnt_header_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_svnt_header_); @@ -1110,10 +1087,7 @@ TAO_CodeGen::start_ciao_svnt_source (const char *fname) TAO_OutStream &os = *this->ciao_svnt_source_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_svnt_source_); @@ -1153,10 +1127,7 @@ TAO_CodeGen::start_ciao_svnt_template_header (const char *fname) TAO_OutStream &os = *this->ciao_svnt_template_header_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_svnt_template_header_); @@ -1235,10 +1206,7 @@ TAO_CodeGen::start_ciao_svnt_template_source (const char *fname) TAO_OutStream &os = *this->ciao_svnt_template_source_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_svnt_template_source_); @@ -1442,10 +1410,7 @@ TAO_CodeGen::start_ciao_conn_header (const char *fname) TAO_OutStream &os = *this->ciao_conn_header_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_conn_header_); @@ -1514,10 +1479,7 @@ TAO_CodeGen::start_ciao_conn_source (const char *fname) TAO_OutStream &os = *this->ciao_conn_source_; - os << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl; + TAO_INSERT_COMMENT (&os); // Generate the #ident string, if any. this->gen_ident_string (this->ciao_conn_source_); @@ -1593,10 +1555,7 @@ TAO_CodeGen::start_implementation_header (const char *fname) return -1; } - *this->implementation_header_ << be_nl << "// TAO_IDL - Generated from" - << be_nl << "// " - << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->implementation_header_); // Generate the ident string, if any. this->gen_ident_string (this->implementation_header_); @@ -1650,10 +1609,7 @@ TAO_CodeGen::start_implementation_skeleton (const char *fname) return -1; } - *this->implementation_skeleton_ << be_nl << "// TAO_IDL - Generated from" - << be_nl << "// " - << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (this->implementation_skeleton_); // Generate the ident string, if any. this->gen_ident_string (this->implementation_skeleton_); @@ -1680,9 +1636,7 @@ TAO_CodeGen::end_client_header () { // Generate the <<= and >>= operators here. - *this->client_header_ << be_nl_2 << "// TAO_IDL - Generated from" - << be_nl << "// " << __FILE__ << ":" - << __LINE__ << be_nl; + TAO_INSERT_COMMENT (this->client_header_); // End versioned namespace support before remaining include // directives at end of file. @@ -1824,9 +1778,7 @@ TAO_CodeGen::end_implementation_header (const char *fname) int TAO_CodeGen::end_server_template_header () { - *this->server_template_header_ << be_nl_2 << "// TAO_IDL - Generated from" - << be_nl << "// " - << __FILE__ << ":" << __LINE__ << "\n"; + TAO_INSERT_COMMENT (this->server_template_header_); // End versioned namespace support. Do not place include directives // before this. diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp index 274da06bb2e..1bf90f25d7e 100644 --- a/TAO/TAO_IDL/be/be_helper.cpp +++ b/TAO/TAO_IDL/be/be_helper.cpp @@ -644,3 +644,9 @@ TAO_OutStream::print (AST_Expression *expr) return *this; } +void TAO_OutStream::insert_comment (const char *file, int line) +{ + *this << be_nl << "// TAO_IDL - Generated from" << be_nl + << "// " << file << ':' << static_cast (line) + << be_nl_2; +} diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index af681500bcf..7ea339d0be1 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -744,8 +744,7 @@ be_interface::gen_var_out_seq_decls () const char *lname = this->local_name (); TAO_OutStream *os = tao_cg->client_header (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the ifdefined macro for this interface. os->gen_ifdef_macro (this->flat_name (), @@ -1856,8 +1855,7 @@ be_interface::gen_gperf_things (const char *flat_name) TAO_OutStream *os = tao_cg->server_skeletons (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Generate the correct class definition for the operation lookup // strategy. Then, get the lookup method from GPERF. And then, diff --git a/TAO/TAO_IDL/be/be_type.cpp b/TAO/TAO_IDL/be/be_type.cpp index 6308a89c696..04e8801b112 100644 --- a/TAO/TAO_IDL/be/be_type.cpp +++ b/TAO/TAO_IDL/be/be_type.cpp @@ -254,8 +254,7 @@ be_type::gen_common_varout (TAO_OutStream *os) return; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); AST_Type::SIZE_TYPE st = this->size_type (); @@ -294,9 +293,7 @@ be_type::gen_stub_decls (TAO_OutStream *os) return; } - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); AST_Interface *i = dynamic_cast (this); AST_ValueType *v = dynamic_cast (this); diff --git a/TAO/TAO_IDL/be/be_valuetype.cpp b/TAO/TAO_IDL/be/be_valuetype.cpp index c5955d0024f..394d8af269e 100644 --- a/TAO/TAO_IDL/be/be_valuetype.cpp +++ b/TAO/TAO_IDL/be/be_valuetype.cpp @@ -451,9 +451,7 @@ be_valuetype::gen_helper_header (char *, char *) { TAO_OutStream *os = tao_cg->client_header (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; @@ -482,8 +480,7 @@ be_valuetype::gen_helper_inline (char *, char *) // is not getting generated... Actually this is a much bigger // problem. Just hacking it up for the timebeing.. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "#if defined (__ACE_INLINE__)" << be_nl_2 << be_global->core_versioning_begin () << be_nl @@ -508,8 +505,7 @@ be_valuetype::gen_helper_stubs (char *, char *) { TAO_OutStream *os = tao_cg->client_stubs (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void" << be_nl << "CORBA::add_ref (" << this->full_name () << " * vt)" << be_nl @@ -560,8 +556,7 @@ be_valuetype::gen_var_out_seq_decls () TAO_OutStream *os = tao_cg->client_header (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Generate the ifdefined macro for this interface. os->gen_ifdef_macro (this->flat_name (), diff --git a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp index e064a19a8f7..86a28c1b5c6 100644 --- a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp @@ -61,9 +61,7 @@ be_visitor_arg_traits::visit_root (be_root *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl << be_global->core_versioning_begin (); @@ -141,8 +139,7 @@ be_visitor_arg_traits::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); std::string guard_suffix = std::string (this->S_) + std::string ("arg_traits"); @@ -244,9 +241,7 @@ be_visitor_arg_traits::visit_valuebox (be_valuebox *node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os); os << be_nl_2 << "template<>" << be_nl @@ -300,9 +295,7 @@ be_visitor_arg_traits::visit_valuetype (be_valuetype *node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os); std::string guard_suffix = std::string (this->S_) + std::string ("arg_traits"); @@ -424,8 +417,7 @@ be_visitor_arg_traits::visit_operation (be_operation *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); std::string guard_suffix = std::string (this->S_) + std::string ("arg_traits"); @@ -504,8 +496,7 @@ be_visitor_arg_traits::visit_attribute (be_attribute *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); std::string guard_suffix = std::string (this->S_) + std::string ("arg_traits"); @@ -584,8 +575,7 @@ be_visitor_arg_traits::visit_argument (be_argument *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); std::string guard_suffix = std::string (this->S_) + std::string ("arg_traits"); @@ -678,8 +668,7 @@ be_visitor_arg_traits::visit_sequence (be_sequence *node) return 0; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); bool use_vec = (node->unbounded () && be_global->alt_mapping ()); UTL_ScopedName *sn = alias->name (); @@ -897,8 +886,7 @@ be_visitor_arg_traits::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "template<>" << be_nl @@ -940,8 +928,7 @@ be_visitor_arg_traits::visit_structure (be_structure *node) // multiple declarations. TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "template<>" << be_nl @@ -1051,8 +1038,7 @@ be_visitor_arg_traits::visit_union (be_union *node) // multiple declarations. TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "template<>" << be_nl 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 c705cd2d96f..7bbb9fc1cb0 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 @@ -29,8 +29,7 @@ be_visitor_array_any_op_ch::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 6d545808640..26da3f979fe 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 @@ -28,9 +28,7 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp index 396d0aba553..e2ff06ad28b 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp @@ -44,8 +44,7 @@ int be_visitor_array_ch::visit_array (be_array *node) AST_Decl::NodeType nt = bt->node_type (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // If we contain an anonymous sequence, // generate code for the sequence here. diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp index 28783028257..d1d176de341 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp @@ -139,8 +139,7 @@ int be_visitor_array_ci::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the array traits specialization definitions, // guarded by #ifdef on unaliased array element type and length. diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp index 86b8b8b371d..414abf50bbb 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp @@ -86,8 +86,7 @@ int be_visitor_array_cs::visit_array (be_array *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // dup method. *os << fname << "_slice *" << be_nl 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 b65ee3bf8c8..08b67645d47 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 @@ -95,8 +95,7 @@ be_visitor_array_cdr_op_ch::visit_array (be_array *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 aabe94ec294..95e43e16398 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 @@ -159,8 +159,7 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp b/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp index c8cd22615a1..b8a19f5ce7b 100644 --- a/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_connector/facet_ami_exh.cpp @@ -219,9 +219,7 @@ be_visitor_facet_ami_exh::init (bool for_impl) int be_visitor_facet_ami_exh::gen_reply_handler_class () { - os_ << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; - + TAO_INSERT_COMMENT (&os_); const char *suffix = "_reply_handler"; this->init (false); @@ -271,8 +269,7 @@ be_visitor_facet_ami_exh::gen_reply_handler_class () int be_visitor_facet_ami_exh::gen_facet_executor_class () { - os_ << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os_); const char *suffix = "_exec_i"; const char *scope_name = diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp index 89701c0a0de..d8d3d370aa2 100644 --- a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp @@ -31,8 +31,7 @@ be_visitor_constant_ch::visit_constant (be_constant *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // If we are defined in the outermost scope, then the value is assigned // to us here itself, else it will be in the *.cpp file. diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp index cefc77ce40c..3be50d11c83 100644 --- a/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp @@ -50,8 +50,7 @@ be_visitor_constant_cs::visit_constant (be_constant *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; *os << "const "; 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 af37f51e7c2..c504a5758dc 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 @@ -28,8 +28,7 @@ be_visitor_enum_any_op_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; 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 f6d8c7f5b35..4878bc7625e 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 @@ -31,8 +31,7 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 5c0e63d33ac..1c4dbbf1492 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 @@ -30,8 +30,7 @@ be_visitor_enum_cdr_op_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 f9a8a698c85..2b4804fa900 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 @@ -26,8 +26,7 @@ be_visitor_enum_cdr_op_cs::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp index 6340ce0039b..7708d5e3d5a 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp @@ -36,8 +36,7 @@ be_visitor_enum_ch::visit_enum (be_enum *node) // Comma to be generated by the scope visitor. this->ctx_->comma (true); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "enum " << node->local_name () << be_nl; *os << "{" << be_idt_nl; 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 8d19cc74442..3ddec37b246 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 @@ -33,8 +33,7 @@ be_visitor_exception_any_op_ch::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; if (node->is_nested ()) 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 c38649bd11a..cc56af49805 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 @@ -33,9 +33,7 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 d190c985d5e..fe0ac4e38e0 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 @@ -33,8 +33,7 @@ be_visitor_exception_cdr_op_ch::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 eb400f07815..3cb9545dc75 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 @@ -44,8 +44,7 @@ be_visitor_exception_cdr_op_cs::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp index ad0751a4dad..291e946b486 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ch.cpp @@ -37,8 +37,7 @@ int be_visitor_exception_ch::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "class " << be_global->stub_export_macro () << " " << node->local_name () diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp index a25dc7fb3da..88b75770072 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp @@ -94,8 +94,7 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) *os << be_uidt_nl << "}" << be_nl_2; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Default constructor. *os << node->name () << "::" << node->local_name () diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp index b4730800ba1..1d6042b98eb 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp @@ -47,8 +47,7 @@ be_visitor_exception_ctor::visit_exception (be_exception *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp index 46691909cae..64ae55b1dd0 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp @@ -346,8 +346,7 @@ be_visitor_field_ch::visit_sequence (be_sequence *node) // Generate the anonymous sequence member typedef. be_decl *bs = this->ctx_->scope ()->decl (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "typedef " << bt->nested_type_name (bs) << " _" << this->ctx_->node ()->local_name () diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_sh.cpp index 19f7bc40b52..bbbc1de88c0 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_sh.cpp @@ -46,8 +46,7 @@ be_visitor_amh_rh_interface_sh::visit_interface (be_interface *node) rh_skel_class_name = "POA_TAO_"; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); rh_skel_class_name += rh_base_class_name.c_str (); diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_ss.cpp index 40e5dc8b263..7624f41f3dc 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_rh_ss.cpp @@ -64,8 +64,7 @@ be_visitor_amh_rh_interface_ss::visit_interface (be_interface *node) ACE_CString rh_skel_class_name (rh_skel_class_name_prefix); rh_skel_class_name += node->local_name (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Generate code for elements in the scope (e.g., operations) // We'll rely on the base class (be_visitor_scope) to do the diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp index 3f784b98564..92808317280 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp @@ -42,8 +42,7 @@ be_visitor_amh_interface_sh::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); ACE_CString class_name; - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // We shall have a POA_ prefix only if we are at the topmost level. if (!node->is_nested ()) diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp index e792b18f3c4..eab1ed7d3c8 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp @@ -61,8 +61,7 @@ be_visitor_amh_interface_ss::this_method (be_interface *node) this->generate_full_skel_name (node); const char *full_skel_name = full_skel_name_holder.c_str (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << non_amh_name.c_str () << "*" << be_nl << full_skel_name @@ -112,8 +111,7 @@ be_visitor_amh_interface_ss::dispatch_method (be_interface *node) this->generate_full_skel_name (node); const char *full_skel_name = full_skel_name_holder.c_str (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void" << be_nl << full_skel_name << "::_dispatch (" << be_idt << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_conn_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_conn_ex_idl.cpp index ceee283915f..3b53dd70744 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_conn_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_conn_ex_idl.cpp @@ -27,9 +27,7 @@ be_visitor_ami4ccm_conn_ex_idl::visit_interface (be_interface *node) { Identifier *oln = node->original_local_name (); - os_ << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os_); os_ << be_nl_2 << "module CCM_AMI::Connector_T<" << oln << ", AMI4CCM_" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp index 4947b6291e4..76524dba839 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp @@ -26,9 +26,7 @@ be_visitor_ami4ccm_rh_ex_idl::~be_visitor_ami4ccm_rh_ex_idl () int be_visitor_ami4ccm_rh_ex_idl::visit_interface (be_interface *node) { - os_ << be_nl - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os_); os_ << be_nl_2 << "local interface AMI4CCM_" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp index c0bab2857f8..bdac09e87f4 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp @@ -28,9 +28,7 @@ be_visitor_ami4ccm_sendc_ex_idl::visit_interface (be_interface *node) { this->iface_ = node; - os_ << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (&os_); os_ << be_nl_2 << "local interface AMI4CCM_" 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 b95446f3f0d..015fd220dd6 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 @@ -37,8 +37,7 @@ be_visitor_interface_any_op_ch::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; 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 b65572712f8..b8bc1dc9b07 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 @@ -34,8 +34,7 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // All template specializations must be generated before the instantiations // in the operators. 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 2453440ca1f..a8e5b555ff7 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 @@ -37,8 +37,7 @@ be_visitor_interface_cdr_op_ch::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; 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 a9ac02c8953..0e4dd126a29 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 @@ -47,8 +47,7 @@ be_visitor_interface_cdr_op_cs::visit_interface (be_interface *node) "codegen for scope failed\n"), -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp index ea9855ced65..d1235e9f0fa 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp @@ -20,9 +20,7 @@ be_visitor_interface_direct_proxy_impl_sh::visit_interface ( { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "///////////////////////////////////////////////////////////////////////" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp index 888f12fd2fb..720356509f2 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp @@ -36,8 +36,7 @@ be_visitor_interface_ch::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); AST_Component *c = dynamic_cast (node); @@ -133,8 +132,7 @@ be_visitor_interface_ch::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp index 5129d1965d2..10db08a89e3 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ci.cpp @@ -55,8 +55,7 @@ be_visitor_interface_ci::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); if (node->is_abstract ()) { diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index 597b9ef62a8..4104945ae59 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -44,8 +44,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) if (node->is_defined () && be_global->gen_arg_traits ()) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin (); diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp index 448c1ebf838..5ec81099376 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp @@ -42,8 +42,7 @@ be_visitor_interface_ih::visit_interface (be_interface *node) if (be_global->gen_impl_debug_info ()) { - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); } // Now generate the class definition. diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp index 0d7589dbbd4..d786778da98 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp @@ -35,8 +35,7 @@ be_visitor_interface_is::visit_interface (be_interface *node) if (be_global->gen_impl_debug_info ()) { - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); } *os << "// Implementation skeleton constructor" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp index 2f7ba2b769b..9e9dcc95034 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp @@ -69,8 +69,7 @@ be_visitor_interface_sh::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the skeleton class name. *os << be_nl_2 diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp index 1594aa5db45..33c5ee3bdab 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -86,8 +86,7 @@ be_visitor_interface_ss::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; @@ -153,8 +152,7 @@ be_visitor_interface_ss::visit_interface (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; @@ -353,8 +351,7 @@ be_visitor_interface_ss::this_method (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; @@ -403,8 +400,7 @@ be_visitor_interface_ss::dispatch_method (be_interface *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp index d403ce016d2..157a6386b21 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/smart_proxy_ch.cpp @@ -35,8 +35,7 @@ int be_visitor_interface_smart_proxy_ch::visit_interface (be_interface *node) bt = node; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "class " << be_global->stub_export_macro ()<< " " << "TAO_" << node->flat_name () diff --git a/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp index bc9e3aaaac4..c45aa7f2909 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp @@ -67,8 +67,7 @@ be_visitor_interface_tie_sh::visit_interface (be_interface *node) } // Now generate the class definition. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// TIE class: Refer to CORBA v2.2, Section 20.34.4" << be_nl; *os << "template " << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/tie_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/tie_ss.cpp index 7f7569743ef..1e9b2ff8f13 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/tie_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/tie_ss.cpp @@ -75,8 +75,7 @@ be_visitor_interface_tie_ss::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "template " << be_nl << fulltiename << "::" << localtiename << " (T &t)" << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp index 7136b8cce2e..57bff448b2a 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp @@ -45,8 +45,7 @@ be_visitor_interface_fwd_any_op_ch::visit_interface_fwd ( TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp index 1af551c91c2..354c2ff8623 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp @@ -43,8 +43,7 @@ be_visitor_interface_fwd_cdr_op_ch::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp b/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp index 9f27e58ac96..681fb1f8cdb 100644 --- a/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_module/module_ch.cpp @@ -31,8 +31,7 @@ be_visitor_module_ch::visit_module (be_module *node) TAO_OutStream *os = this->ctx_->stream (); TAO_OutStream *aos = nullptr; - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "namespace " << node->local_name () << be_nl << "{" << be_idt; @@ -41,8 +40,7 @@ be_visitor_module_ch::visit_module (be_module *node) { aos = tao_cg->anyop_header (); - *aos << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (aos); *aos << "namespace " << node->local_name () << be_nl << "{" << be_idt; @@ -60,16 +58,16 @@ be_visitor_module_ch::visit_module (be_module *node) -1); } - *os << be_uidt_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + *os << be_uidt_nl << be_nl; + TAO_INSERT_COMMENT (os); *os << be_nl << "} // module " << node->name (); if (be_global->gen_anyop_files ()) { - *aos << be_uidt_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + *aos << be_uidt_nl << be_nl; + TAO_INSERT_COMMENT (aos); *aos << be_nl << "} // module " << node->name () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp b/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp index 53e787c0e30..9fdb5f2cd0c 100644 --- a/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp @@ -31,8 +31,7 @@ be_visitor_module_sh::visit_module (be_module *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Generate the skeleton class name. @@ -62,8 +61,8 @@ be_visitor_module_sh::visit_module (be_module *node) -1); } - *os << be_uidt_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + *os << be_uidt_nl << be_nl; + TAO_INSERT_COMMENT (os); *os << "} // module " << node->name (); diff --git a/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp b/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp index 0ff00c5ff9c..670f885ceaa 100644 --- a/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_native/native_ch.cpp @@ -35,10 +35,7 @@ be_visitor_native_ch::visit_native (be_native *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl_2; + TAO_INSERT_COMMENT (os); const char *node_name = node->full_name (); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp index d787bde8e24..55c754c1b2e 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_sh.cpp @@ -56,8 +56,7 @@ be_visitor_amh_rh_operation_sh::visit_operation (be_operation *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << "void "; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp index cb5790d5e41..ef1b11284fd 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_rh_ss.cpp @@ -73,8 +73,7 @@ be_visitor_amh_rh_operation_ss::visit_operation (be_operation *node) buf = nullptr; // Step 1 : Generate return type: always void - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void" << be_nl << response_handler_implementation_name.c_str () << "::"; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp index 401b33a299b..c877e53187d 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp @@ -123,8 +123,7 @@ be_visitor_amh_operation_sh::generate_shared_prologue ( TAO_OutStream *os, const char *skel_prefix) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << "static void " << skel_prefix << this->ctx_->port_prefix ().c_str () diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp index d188e056618..6c7bd3eb425 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp @@ -301,8 +301,7 @@ be_visitor_amh_operation_ss::generate_shared_prologue (be_decl *node, TAO_OutStream *os, const char *skel_prefix) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // We need the interface node in which this operation was defined. However, // if this operation node was an attribute node in disguise, we get this diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp index b073286e4d7..3e59a0dc416 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp @@ -51,8 +51,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the return type mapping. Return type is simply void. *os << be_nl_2 diff --git a/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp index aab0e909e4b..f1918f568b1 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp @@ -53,8 +53,7 @@ be_visitor_operation_direct_proxy_impl_ss::visit_operation ( } } - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << "void" << be_nl << intf->full_direct_proxy_impl_name () << "::"; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp index ec94769a15e..0a97ddb3e8d 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_cs.cpp @@ -84,8 +84,7 @@ be_visitor_operation_cs::visit_operation (be_operation *node) return 0; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Retrieve the operation return type. be_type *bt = dynamic_cast (node->return_type ()); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp index 26ab9dace41..f72f65c46d4 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ih.cpp @@ -36,8 +36,7 @@ be_visitor_operation_ih::visit_operation (be_operation *node) if (be_global->gen_impl_debug_info ()) { - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); } // every operation is declared virtual in the client code diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp index 2de4bd8c983..8ed90f466bb 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp @@ -48,8 +48,7 @@ be_visitor_operation_is::visit_operation (be_operation *node) if (be_global->gen_impl_debug_info ()) { - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); } be_visitor_context ctx (*this->ctx_); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp index d26e0eb61eb..4ebc3183199 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp @@ -32,8 +32,7 @@ be_visitor_operation_sh::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "virtual "; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp index a3256880c8e..3bccb12acba 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp @@ -164,8 +164,7 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, intf->full_skel_name (), upcall_command_name.c_str ()); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void " << intf->full_skel_name () << "::"; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/proxy_impl_xh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/proxy_impl_xh.cpp index 87bdd4dc2da..4ccd4afe626 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/proxy_impl_xh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/proxy_impl_xh.cpp @@ -22,8 +22,7 @@ int be_visitor_operation_proxy_impl_xh::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "static void" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/tie_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/tie_sh.cpp index fb24e5ed20d..39fb690509f 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/tie_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/tie_sh.cpp @@ -47,8 +47,7 @@ be_visitor_operation_tie_sh::visit_operation (be_operation *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_visitor_context ctx (*this->ctx_); be_visitor_operation_rettype oro_visitor (&ctx); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp index 6d68b3ec985..98b36380c26 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/tie_ss.cpp @@ -88,8 +88,7 @@ int be_visitor_operation_tie_ss::visit_operation (be_operation *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "template " << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp index 6cd6515a881..041af2c2dc1 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/upcall_command_ss.cpp @@ -76,8 +76,7 @@ be_visitor_operation_upcall_command_ss::visit ( // save the node. this->ctx_->node (node); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the operation-specific TAO::Upcall_Command concrete // class. 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 d2cfc9934c8..100195bb188 100644 --- a/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root/root_ch.cpp @@ -152,9 +152,7 @@ be_visitor_root_ch::gen_fwd_decls () { if (idl_global->non_local_iface_seen_) { - *o_ << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (o_); *o_ << be_global->core_versioning_begin () << be_nl; @@ -187,9 +185,7 @@ be_visitor_root_ch::gen_ref_counting_overrides () size_t index = 0; be_interface_fwd *ifwd = nullptr; - *o_ << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (o_); for (index = 0; index < size; ++index) { @@ -233,10 +229,7 @@ be_visitor_root_ch::gen_static_corba_overrides () size_t index = 0; AST_Interface *i = nullptr; - *o_ << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ - << be_nl; + TAO_INSERT_COMMENT (o_); *o_ << be_global->core_versioning_begin (); diff --git a/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp b/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp index 99b145d6462..2eed2e11736 100644 --- a/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp @@ -61,8 +61,7 @@ be_visitor_root_sth::visit_module (be_module *node) // Generate the skeleton class name. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Now generate the class definition. The prefix POA_ is prepended to our // name only if we are the outermost module. 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 5cc90dcf290..9dcc690abe3 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 @@ -43,8 +43,7 @@ be_visitor_sequence_any_op_ch::visit_sequence (be_sequence *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2; 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 a49fdcbeeb6..77fb2089457 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 @@ -40,9 +40,7 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 0dd0d3522b7..e13e3d03d0f 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 @@ -61,8 +61,7 @@ be_visitor_sequence_cdr_op_ch::visit_sequence (be_sequence *node) be_type *bt = dynamic_cast (node); be_typedef *tdef = dynamic_cast (bt); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // If we're an anonymous sequence, we must protect against // being declared more than once. 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 e54fa0d0c03..a0a8a3d7797 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 @@ -89,8 +89,7 @@ be_visitor_sequence_cdr_op_cs::visit_sequence (be_sequence *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << "#if !defined _TAO_CDR_OP_" << node->flat_name () << "_CPP_" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp index 6456054dfbe..350354c8fc2 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp @@ -95,8 +95,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); if (idl_global->dcps_sequence_type_defined (node->full_name ())) { diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp index c7c0fd437a2..13609f31b03 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp @@ -101,8 +101,7 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); os->gen_ifdef_macro (node->flat_name ()); 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 616e6662b03..d2d38a5d6f5 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 @@ -34,8 +34,7 @@ be_visitor_structure_any_op_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; if (node->is_nested ()) 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 1cf479aefdf..d5b58da6f56 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 @@ -34,9 +34,7 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Since we don't generate CDR stream operators for types that // explicitly contain a local interface (at some level), we 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 dec58f3f0b4..a3c6bffa5c6 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 @@ -34,8 +34,7 @@ be_visitor_structure_cdr_op_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 ed19672a653..2327f40ae93 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 @@ -45,8 +45,7 @@ be_visitor_structure_cdr_op_cs::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp index 24bbbdf3550..73ccf1f1a89 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp @@ -44,8 +44,7 @@ int be_visitor_structure_ch::visit_structure (be_structure *node) *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "struct " << be_global->stub_export_macro () << " " diff --git a/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp index 29028da44cb..f7652d69f8e 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp @@ -52,8 +52,7 @@ be_visitor_structure_cs::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); *os << be_nl_2; - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void" << be_nl << node->name () diff --git a/TAO/TAO_IDL/be/be_visitor_template_export.cpp b/TAO/TAO_IDL/be/be_visitor_template_export.cpp index 59dce19e81c..6e3a9d6a249 100644 --- a/TAO/TAO_IDL/be/be_visitor_template_export.cpp +++ b/TAO/TAO_IDL/be/be_visitor_template_export.cpp @@ -34,8 +34,7 @@ be_visitor_template_export::visit_root (be_root *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "#if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT"; diff --git a/TAO/TAO_IDL/be/be_visitor_traits.cpp b/TAO/TAO_IDL/be/be_visitor_traits.cpp index 976f1e16dc3..305be5d4107 100644 --- a/TAO/TAO_IDL/be/be_visitor_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_traits.cpp @@ -55,9 +55,7 @@ be_visitor_traits::visit_root (be_root *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl << be_global->core_versioning_begin (); diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp index 59636667018..17ab3682ae8 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp @@ -44,9 +44,7 @@ TAO::be_visitor_alias_typecode::common (be_type * node, { TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED); diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/enum_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/enum_typecode.cpp index 1e641558d78..394eebd109f 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/enum_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/enum_typecode.cpp @@ -24,9 +24,7 @@ TAO::be_visitor_enum_typecode::visit_enum (be_enum * node) { TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (&os); ACE_CString const tao_enumerators ("_tao_enumerators_"); ACE_CString const enumerators_name (tao_enumerators diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp index 74177b36dbc..fdaf252ac51 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/objref_typecode.cpp @@ -65,9 +65,7 @@ TAO::be_visitor_objref_typecode::visit_i (char const * kind, { TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); // Generate the TypeCode instantiation. os diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp index ff909252566..8bc43ce8117 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp @@ -81,9 +81,7 @@ TAO::be_visitor_struct_typecode::visit (AST_Structure * node, this->is_nested_ = true; TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); if (this->gen_member_typecodes (node) != 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp index 46b547a446b..ff485166b9e 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp @@ -30,8 +30,7 @@ be_visitor_typecode_decl::visit_type (be_type *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // If -GA is used but anyop macro isn't set, defaults to stub macro. const char *export_macro = (be_global->gen_anyop_files () 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 9696d002830..63944a3a422 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp @@ -293,9 +293,7 @@ be_visitor_typecode_defn::visit_array (be_array *node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); // generate typecode for the base type this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED); @@ -456,9 +454,7 @@ be_visitor_typecode_defn::visit_sequence (be_sequence * node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); // generate typecode for the base type this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED); @@ -551,9 +547,7 @@ be_visitor_typecode_defn::visit_string (be_string * node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); // Multiple definition guards. // @todo Can we automate duplicate detection within the IDL compiler diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp index 4ed2f4d340a..d32a9d21b71 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp @@ -60,9 +60,7 @@ TAO::be_visitor_union_typecode::visit_union (be_union * node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); be_type * const discriminant_type = dynamic_cast (node->disc_type ()); diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp index 0fce2fa7734..6b711d34a80 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp @@ -60,9 +60,7 @@ TAO::be_visitor_value_typecode::visit_valuetype (be_valuetype * node) TAO_OutStream & os = *this->ctx_->stream (); - os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); if (this->gen_member_typecodes (node) != 0) { diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp index 11ece6e78d2..888c585b085 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp @@ -175,8 +175,7 @@ be_visitor_typedef_ch::visit_array (be_array *node) } else { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Base type is simply an alias to an array node. Simply output the // required typedefs. @@ -286,8 +285,7 @@ be_visitor_typedef_ch::visit_enum (be_enum *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // typedef the type and the _slice type. *os << "typedef " << bt->nested_type_name (scope) @@ -317,8 +315,7 @@ be_visitor_typedef_ch::visit_interface (be_interface *node) bt = node; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the object. *os << "typedef " << bt->nested_type_name (scope) << " " @@ -366,8 +363,7 @@ be_visitor_typedef_ch::visit_predefined_type (be_predefined_type *node) bt = node; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the type. *os << "typedef " << bt->nested_type_name (scope) @@ -400,8 +396,7 @@ be_visitor_typedef_ch::visit_string (be_string *node) be_typedef *tdef = this->ctx_->tdef (); be_decl *scope = this->ctx_->scope ()->decl (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if (node->width () == (long) sizeof (char)) { @@ -459,8 +454,7 @@ be_visitor_typedef_ch::visit_sequence (be_sequence *node) } else { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the type. *os << "typedef " << bt->nested_type_name (scope) @@ -506,8 +500,7 @@ be_visitor_typedef_ch::visit_structure (be_structure *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the type. *os << "typedef " << bt->nested_type_name (scope) @@ -552,8 +545,7 @@ be_visitor_typedef_ch::visit_union (be_union *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the type. *os << "typedef " << bt->nested_type_name (scope) @@ -585,8 +577,7 @@ be_visitor_typedef_ch::visit_valuebox (be_valuebox *node) bt = node; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the object. *os << "typedef " << bt->nested_type_name (scope) << " " @@ -621,8 +612,7 @@ be_visitor_typedef_ch::visit_valuetype (be_valuetype *node) bt = node; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Typedef the object. *os << "typedef " << bt->nested_type_name (scope) << " " 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 b8b2a3eedc9..c1df6701ac6 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 @@ -33,8 +33,7 @@ be_visitor_union_any_op_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; 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 d0c95024982..67bcc498c21 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 @@ -32,9 +32,7 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 142279b0dbf..9457b43b1c5 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 @@ -34,8 +34,7 @@ be_visitor_union_cdr_op_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 9072ec9a74b..992f494d156 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 @@ -113,8 +113,7 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp index 9f4f09196be..94558197453 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ch.cpp @@ -63,8 +63,7 @@ be_visitor_union_discriminant_ch::visit_enum (be_enum *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // The set method. *os << be_nl_2 @@ -96,8 +95,7 @@ be_visitor_union_discriminant_ch::visit_predefined_type (be_predefined_type TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // The set method. *os << be_nl_2 diff --git a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp index 5fe1cfe59a2..b2e2c62a754 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/discriminant_ci.cpp @@ -51,8 +51,7 @@ be_visitor_union_discriminant_ci::visit_enum (be_enum *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if ((dv.computed_ != 0) && (bu->default_index () == -1)) { @@ -141,8 +140,7 @@ be_visitor_union_discriminant_ci::visit_predefined_type ( -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if ((dv.computed_ != 0) && (bu->default_index () == -1)) { diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp index 3943c07a55f..31cd1ffa4bf 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp @@ -117,8 +117,7 @@ int be_visitor_union_ch::visit_union (be_union *node) if ((dv.computed_ != 0) && (node->default_index () == -1)) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Only if all cases are not covered AND there is no explicit // default, we get the _default () method. diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp index 47bab908e32..09d5c0df80b 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union_ci.cpp @@ -32,8 +32,7 @@ int be_visitor_union_ci::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// *************************************************************" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp index 5cfcba36781..66b5843fc78 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp @@ -72,8 +72,7 @@ int be_visitor_union_cs::visit_union (be_union *node) // Now generate the operations on the union such as the copy constructor // and the assignment operator. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the copy constructor and the assignment operator here. *os << be_nl_2 diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp index a9aef5adc87..c3221ecb164 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp @@ -86,8 +86,7 @@ be_visitor_union_branch_private_ch::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -136,8 +135,7 @@ be_visitor_union_branch_private_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -175,8 +173,7 @@ be_visitor_union_branch_private_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -214,8 +211,7 @@ be_visitor_union_branch_private_ch::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -253,8 +249,7 @@ be_visitor_union_branch_private_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -292,8 +287,7 @@ be_visitor_union_branch_private_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -331,8 +325,7 @@ be_visitor_union_branch_private_ch::visit_valuetype_fwd (be_valuetype_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -373,8 +366,7 @@ be_visitor_union_branch_private_ch::visit_predefined_type ( TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -440,8 +432,7 @@ be_visitor_union_branch_private_ch::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -470,8 +461,7 @@ be_visitor_union_branch_private_ch::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -515,8 +505,7 @@ be_visitor_union_branch_private_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; @@ -595,8 +584,7 @@ be_visitor_union_branch_private_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp index 566027008ec..0bfe7299cb5 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp @@ -108,8 +108,7 @@ be_visitor_union_branch_public_ch::visit_array (be_array *node) ctx.state (TAO_CodeGen::TAO_ROOT_CH); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Now use this array as a "type" for the subsequent declarator // the set method. @@ -122,8 +121,7 @@ be_visitor_union_branch_public_ch::visit_array (be_array *node) } else { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Now use this array as a "type" for the subsequent declarator // the set method. @@ -185,8 +183,7 @@ be_visitor_union_branch_public_ch::visit_enum (be_enum *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Now use this enum as a "type" for the subsequent declarator // the set method. @@ -229,8 +226,7 @@ be_visitor_union_branch_public_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Set method. *os << be_nl_2 @@ -272,8 +268,7 @@ be_visitor_union_branch_public_ch::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Set method. *os << be_nl_2 @@ -315,8 +310,7 @@ be_visitor_union_branch_public_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Set method. *os << be_nl_2 @@ -358,8 +352,7 @@ be_visitor_union_branch_public_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Set method. *os << be_nl_2 @@ -401,8 +394,7 @@ be_visitor_union_branch_public_ch::visit_valuetype_fwd (be_valuetype_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Set method. *os << be_nl_2 @@ -445,8 +437,7 @@ be_visitor_union_branch_public_ch::visit_predefined_type (be_predefined_type *no TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); switch (node->pt ()) { @@ -533,8 +524,7 @@ be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the anonymous sequence member typedef. // This provides a consistent name to use instead of the @@ -544,8 +534,7 @@ be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node) << " _" << ub->local_name () << "_seq;"; } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "void " << ub->local_name () << " (const " @@ -576,8 +565,7 @@ be_visitor_union_branch_public_ch::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Three methods to set the string value if (node->width () == (long) sizeof (char)) @@ -652,8 +640,7 @@ be_visitor_union_branch_public_ch::visit_structure (be_structure *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "void " << ub->local_name () << " (const " @@ -745,8 +732,7 @@ be_visitor_union_branch_public_ch::visit_union (be_union *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "void " << ub->local_name () << " (const " diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp index add0becee4e..8f5706337c5 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp @@ -153,8 +153,7 @@ be_visitor_union_branch_public_ci::visit_array (be_array *node) } // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -225,8 +224,7 @@ be_visitor_union_branch_public_ci::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -296,8 +294,7 @@ be_visitor_union_branch_public_ci::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -386,8 +383,7 @@ be_visitor_union_branch_public_ci::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -494,8 +490,7 @@ be_visitor_union_branch_public_ci::emit_valuetype_common (be_type *node) TAO_OutStream *os = this->ctx_->stream (); // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -573,8 +568,7 @@ be_visitor_union_branch_public_ci::visit_predefined_type ( TAO_OutStream *os = this->ctx_->stream (); // Set method. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -784,8 +778,7 @@ be_visitor_union_branch_public_ci::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // (1) Set from a const. *os << "/// Accessor to set the member." << be_nl @@ -858,8 +851,7 @@ be_visitor_union_branch_public_ci::visit_string (be_string *node) // Three methods to set the string value. // (1) Set method from char* or wchar*. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << "ACE_INLINE" << be_nl @@ -1061,8 +1053,7 @@ be_visitor_union_branch_public_ci::visit_structure (be_structure *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // (1) Set from a const. *os << "/// Accessor to set the member." << be_nl @@ -1228,8 +1219,7 @@ be_visitor_union_branch_public_ci::visit_union (be_union *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // (1) Set from a const. *os << "// Accessor to set the member." << be_nl 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 7d17a24f206..4c2220eac59 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 @@ -39,8 +39,7 @@ be_visitor_valuebox_any_op_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; 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 082faf2daf5..ec440763a71 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 @@ -42,8 +42,7 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) // Generate the Any <<= and >>= operator declarations - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 30afffb23ee..5eba86429a6 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 @@ -34,9 +34,7 @@ be_visitor_valuebox_cdr_op_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; 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 b1dd90b58f9..06f1f396911 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 @@ -37,10 +37,9 @@ be_visitor_valuebox_cdr_op_cs::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); node->cli_stub_cdr_op_gen (true); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); -*os << be_global->core_versioning_begin () << 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); diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp index fa546645e9b..30516f8ea3d 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ch.cpp @@ -122,8 +122,7 @@ be_visitor_valuebox_field_ch::visit_array (be_array *node) } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "void " << field->local_name () << " (" << fname << ");" << be_nl; @@ -160,8 +159,7 @@ be_visitor_valuebox_field_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_get (field, bt, "", "", "const"); @@ -196,8 +194,7 @@ be_visitor_valuebox_field_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", "_ptr"); this->emit_member_get (field, bt, "", "_ptr", "const"); @@ -232,8 +229,7 @@ be_visitor_valuebox_field_ch::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", "_ptr"); this->emit_member_get (field, bt, "", "_ptr", "const"); @@ -282,8 +278,7 @@ be_visitor_valuebox_field_ch::visit_predefined_type (be_predefined_type *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); switch (node->pt ()) { @@ -335,8 +330,7 @@ be_visitor_valuebox_field_ch::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); @@ -373,8 +367,7 @@ be_visitor_valuebox_field_ch::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_set (field, bt, "const ", ""); @@ -424,8 +417,7 @@ be_visitor_valuebox_field_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); @@ -484,8 +476,7 @@ be_visitor_valuebox_field_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp index 31bbb25ea69..befadc961dc 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/field_ci.cpp @@ -120,8 +120,7 @@ be_visitor_valuebox_field_ci::visit_array (be_array *node) bt->full_name ()); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Modifier to set the member." << be_nl; @@ -174,9 +173,7 @@ be_visitor_valuebox_field_ci::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; - + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_get (field, bt, "", "", "const", ""); @@ -211,8 +208,7 @@ be_visitor_valuebox_field_ci::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Modifier to set the member." << be_nl; @@ -257,8 +253,7 @@ be_visitor_valuebox_field_ci::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Modifier to set the member." << be_nl; @@ -331,8 +326,7 @@ be_visitor_valuebox_field_ci::visit_predefined_type (be_predefined_type *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); switch (node->pt ()) { @@ -393,8 +387,7 @@ be_visitor_valuebox_field_ci::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const", ""); @@ -430,8 +423,7 @@ be_visitor_valuebox_field_ci::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_set (field, bt, "const ", ""); @@ -488,8 +480,7 @@ be_visitor_valuebox_field_ci::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const", ""); @@ -544,8 +535,7 @@ be_visitor_valuebox_field_ci::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const", ""); diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp index 562a4fa0dea..18c7a86cf41 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/union_member_ci.cpp @@ -118,8 +118,7 @@ be_visitor_valuebox_union_member_ci::visit_array (be_array *node) bt->full_name ()); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Modifier to set the member." << be_nl; @@ -171,9 +170,7 @@ be_visitor_valuebox_union_member_ci::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; - + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_get (field, bt, "", "", "const"); @@ -208,8 +205,7 @@ be_visitor_valuebox_union_member_ci::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", "_ptr"); this->emit_member_get (field, bt, "", "_ptr", "const"); @@ -244,8 +240,7 @@ be_visitor_valuebox_union_member_ci::visit_interface_fwd (be_interface_fwd *node TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", "_ptr"); this->emit_member_get (field, bt, "", "_ptr", "const"); @@ -294,8 +289,7 @@ be_visitor_valuebox_union_member_ci::visit_predefined_type (be_predefined_type * TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); switch (node->pt ()) { @@ -347,8 +341,7 @@ be_visitor_valuebox_union_member_ci::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); @@ -384,8 +377,7 @@ be_visitor_valuebox_union_member_ci::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "", ""); this->emit_member_set (field, bt, "const ", ""); @@ -442,8 +434,7 @@ be_visitor_valuebox_union_member_ci::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); @@ -498,8 +489,7 @@ be_visitor_valuebox_union_member_ci::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_member_set (field, bt, "const ", " &"); this->emit_member_get (field, bt, "const ", " &", "const"); diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp index 63fbc5addff..9fde836d8b6 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ch.cpp @@ -37,8 +37,7 @@ be_visitor_valuebox_ch::visit_valuebox (be_valuebox *node) this->ctx_->node (node); // save the node - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "class " << node->local_name () << ";" ; @@ -110,8 +109,7 @@ be_visitor_valuebox_ch::visit_valuebox (be_valuebox *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Generate the "protected" destructor @@ -163,8 +161,7 @@ be_visitor_valuebox_ch::visit_array (be_array *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); this->emit_default_constructor(); @@ -282,8 +279,7 @@ be_visitor_valuebox_ch::visit_sequence (be_sequence *node) // Indicate that this type has been used as a sequence element. bt->seen_in_sequence (true); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); this->emit_default_constructor(); @@ -402,8 +398,7 @@ be_visitor_valuebox_ch::visit_string (be_string *node) // Retrieve the node being visited by this be_visitor_valuebox_ch. be_decl * vb_node = this->ctx_->node (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); this->emit_default_constructor (); this->emit_constructor_one_arg (node, "", "", ""); @@ -474,8 +469,7 @@ be_visitor_valuebox_ch::visit_structure (be_structure *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); this->emit_default_constructor(); @@ -542,8 +536,7 @@ be_visitor_valuebox_ch::visit_structure (be_structure *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // Member variable of underlying type; this->emit_boxed_member_var (node, "_var"); @@ -576,8 +569,7 @@ be_visitor_valuebox_ch::visit_union (be_union *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); this->emit_default_constructor(); @@ -668,9 +660,7 @@ be_visitor_valuebox_ch::visit_union (be_union *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; - + TAO_INSERT_COMMENT (os); // Member variable of underlying type; this->emit_boxed_member_var (node, "_var"); @@ -686,8 +676,7 @@ be_visitor_valuebox_ch::emit_for_predef_enum (be_type *node, { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); this->emit_default_constructor (); diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp index 1e1f560c15c..429e571b166 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_ci.cpp @@ -45,8 +45,7 @@ be_visitor_valuebox_ci::visit_valuebox (be_valuebox *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); *os << "ACE_INLINE const char*" << be_nl << node->name () << "::_tao_obv_static_repository_id ()" << be_nl @@ -68,8 +67,7 @@ be_visitor_valuebox_ci::visit_array (be_array *node) // Retrieve the node being visited by this be_visitor_valuebox_ch. be_decl * vb_node = this->ctx_->node (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Public default constructor *os << "ACE_INLINE" << be_nl @@ -216,8 +214,7 @@ be_visitor_valuebox_ci::visit_sequence (be_sequence *node) // Retrieve the node being visited by this be_visitor_valuebox_ch. be_decl * vb_node = this->ctx_->node (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_default_constructor_alloc (node); this->emit_constructor_one_arg_alloc (node); @@ -278,8 +275,7 @@ be_visitor_valuebox_ci::visit_string (be_string *node) // Retrieve the node being visited by this be_visitor_valuebox_ch. be_decl * vb_node = this->ctx_->node (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_default_constructor (); this->emit_constructor_one_arg (node, ""); @@ -394,8 +390,7 @@ be_visitor_valuebox_ci::visit_structure (be_structure *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_default_constructor_alloc (node); this->emit_constructor_one_arg_alloc (node); @@ -475,8 +470,7 @@ be_visitor_valuebox_ci::visit_union (be_union *node) { TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); this->emit_default_constructor_alloc (node); this->emit_constructor_one_arg_alloc (node); @@ -575,8 +569,7 @@ be_visitor_valuebox_ci::emit_for_predef_enum (be_type *node, // Retrieve the node being visited by this be_visitor_valuebox_ci. be_decl * vb_node = this->ctx_->node (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if (is_any) { diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp index 91d897f3cd4..25c627a1d8f 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/valuebox_cs.cpp @@ -48,8 +48,7 @@ be_visitor_valuebox_cs::visit_valuebox (be_valuebox *node) this->ctx_->node (node); // save the node - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); if (node->is_defined ()) { @@ -334,8 +333,7 @@ be_visitor_valuebox_cs::visit_array (be_array * node) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); @@ -360,8 +358,7 @@ be_visitor_valuebox_cs::visit_enum (be_enum *) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); @@ -477,8 +474,7 @@ be_visitor_valuebox_cs::visit_sequence (be_sequence *node) ctx.state (TAO_CodeGen::TAO_SEQUENCE_BUFFER_TYPE_CH); be_visitor_sequence_buffer_type bt_visitor (&ctx); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if (node->unbounded ()) { @@ -631,8 +627,7 @@ be_visitor_valuebox_cs::visit_string (be_string *str) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); @@ -677,8 +672,7 @@ be_visitor_valuebox_cs::visit_structure (be_structure *) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); @@ -719,8 +713,7 @@ be_visitor_valuebox_cs::visit_union (be_union *) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); @@ -756,8 +749,7 @@ be_visitor_valuebox_cs::emit_for_predef_enum (char const * marshal_arg) // Retrieve the node being visited by this be_visitor_valuebox_cs. be_decl * const vb_node = this->ctx_->node (); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); this->emit_destructor (); diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp index e36744ab7c6..2860bc32c19 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_ch.cpp @@ -39,8 +39,7 @@ be_visitor_valuetype_any_op_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp index e12e0aea8cf..4c3d88d78c2 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp @@ -41,8 +41,7 @@ be_visitor_valuetype_any_op_cs::visit_valuetype (be_valuetype *node) // Generate the Any <<= and >>= operator declarations - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp index d25849117d9..b7bd2760bc7 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp @@ -44,9 +44,7 @@ be_visitor_valuetype_cdr_op_ch::visit_valuetype (be_valuetype *node) -1); } - *os << be_nl_2 - << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp index 2e5ba73463d..fd6ae6a782f 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp @@ -56,8 +56,7 @@ be_visitor_valuetype_cdr_op_cs::visit_valuetype (be_valuetype *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp index 772ff73a4b4..6da083d21e5 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp @@ -86,8 +86,7 @@ be_visitor_valuetype_field_ch::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if (bt->node_type () != AST_Decl::NT_typedef && bt->is_child (bu)) @@ -169,8 +168,7 @@ be_visitor_valuetype_field_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); if (bt->node_type () != AST_Decl::NT_typedef && bt->is_child (bu)) @@ -228,8 +226,7 @@ be_visitor_valuetype_field_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Set method. *os << pre_op () << "void " << ub->local_name () << " ( ::" @@ -271,8 +268,7 @@ be_visitor_valuetype_field_ch::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Set method. *os << pre_op () << "void " << ub->local_name () << " (" @@ -314,8 +310,7 @@ be_visitor_valuetype_field_ch::visit_valuebox (be_valuebox *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Set method. *os << pre_op () << "void " << ub->local_name () << " (" @@ -357,8 +352,7 @@ be_visitor_valuetype_field_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Set method. *os << pre_op () << "void " << ub->local_name () << " (" @@ -406,8 +400,7 @@ be_visitor_valuetype_field_ch::visit_valuetype_fwd (be_valuetype_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Set method. *os << pre_op () << "void " << ub->local_name () << " (" @@ -455,8 +448,7 @@ be_visitor_valuetype_field_ch::visit_predefined_type (be_predefined_type *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); switch (node->pt ()) { @@ -529,8 +521,7 @@ be_visitor_valuetype_field_ch::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Not a typedef and bt is defined here. if (bt->node_type () != AST_Decl::NT_typedef @@ -604,8 +595,7 @@ be_visitor_valuetype_field_ch::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2<< "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Three methods to set the string value. if (node->width () == (long) sizeof (char)) @@ -670,8 +660,7 @@ be_visitor_valuetype_field_ch::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2<< "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Not a typedef and bt is defined here. if (bt->node_type () != AST_Decl::NT_typedef @@ -755,8 +744,7 @@ be_visitor_valuetype_field_ch::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2<< "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Not a typedef and bt is defined here. if (bt->node_type () != AST_Decl::NT_typedef diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp index 1e591d5837d..4718e7dea8c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp @@ -138,8 +138,7 @@ be_visitor_valuetype_field_cs::visit_array (be_array *node) bt->full_name ()); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -214,8 +213,7 @@ be_visitor_valuetype_field_cs::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op() << "void" << be_nl; @@ -283,8 +281,7 @@ be_visitor_valuetype_field_cs::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -352,8 +349,7 @@ be_visitor_valuetype_field_cs::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -426,8 +422,7 @@ be_visitor_valuetype_field_cs::valuetype_common (be_type *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -507,8 +502,7 @@ be_visitor_valuetype_field_cs::visit_valuetype_fwd (be_valuetype_fwd *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -583,8 +577,7 @@ be_visitor_valuetype_field_cs::visit_predefined_type (be_predefined_type *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -758,8 +751,7 @@ be_visitor_valuetype_field_cs::visit_sequence (be_sequence *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // (1) set from a const *os << "/// Accessor to set the member." << be_nl @@ -830,8 +822,7 @@ be_visitor_valuetype_field_cs::visit_string (be_string *node) // Three methods to set the string value. - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member." << be_nl << this->pre_op () << "void" << be_nl; @@ -999,8 +990,7 @@ be_visitor_valuetype_field_cs::visit_structure (be_structure *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // (1) Set from a const. *os << "/// Accessor to set the member." << be_nl @@ -1116,8 +1106,7 @@ be_visitor_valuetype_field_cs::visit_union (be_union *node) } } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "/// Accessor to set the member" << be_nl << this->pre_op () << "void" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp index 201b7a51ac1..190b8307592 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_cs.cpp @@ -29,8 +29,7 @@ be_visitor_valuetype_marshal_cs::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->sub_state (TAO_CodeGen::TAO_CDR_OUTPUT); - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "::CORBA::Boolean" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp index 584916719f8..afc93201be3 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp @@ -40,8 +40,7 @@ be_visitor_obv_module::visit_module (be_module *node) if (this->ctx_->state () == TAO_CodeGen::TAO_MODULE_OBV_CH) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "namespace "; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp index 89ec6a82ac8..c03b411a649 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp @@ -832,8 +832,7 @@ be_visitor_valuetype::gen_init_defn (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "class " << be_global->stub_export_macro () << " " << node->local_name () diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp index 3694cf2e480..dff6922a75b 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp @@ -46,8 +46,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); int status = 0; - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); if (node->node_type () == AST_Decl::NT_eventtype) { @@ -234,8 +233,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) -1); } - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // If we inherit from CORBA::Object and/or CORBA::AbstractBase // (in addition to CORBA::ValueBase) we have to add these @@ -392,8 +390,7 @@ be_visitor_valuetype_ch::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); // save the node - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl; + TAO_INSERT_COMMENT (os); // Every operation is declared public and virtual in the client code. *os << be_uidt_nl << "public:" << be_idt_nl << "virtual "; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp index 1bdeee1b047..1280d802d42 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp @@ -40,8 +40,7 @@ be_visitor_valuetype_ci::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << "ACE_INLINE" << be_nl; *os << node->name () << "::" << node->local_name () << " ()" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp index aef3ecbd8c3..f655680091a 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp @@ -49,8 +49,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); if (node->is_defined ()) { @@ -411,8 +410,7 @@ be_visitor_valuetype_cs::visit_operation (be_operation *node) TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // STEP I: Generate the return type. be_type *bt = dynamic_cast (node->return_type ()); diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp index 99b203c0540..0059bc116e6 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp @@ -53,8 +53,7 @@ be_visitor_valuetype_init_ch::visit_valuetype (be_valuetype *node) TAO_OutStream& os = *(this->ctx_->stream ()); - os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (&os); //@@ If I'm generating concrete class I need a RefCounter. os << "class " << be_global->stub_export_macro () diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp index ed9631216f6..891d6e3c4f5 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp @@ -69,8 +69,7 @@ be_visitor_valuetype_init_cs::visit_valuetype (be_valuetype *node) "%s_init", node->local_name ()); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; + TAO_INSERT_COMMENT (os); // ctor *os << be_nl_2 diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp index 4f3c0688e53..b8992bb9885 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp @@ -40,8 +40,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ ; + TAO_INSERT_COMMENT (os); // OBV_ class maps only to a typedef if we are optimizing accessors. if (node->opt_accessor ()) @@ -142,8 +141,7 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) // to avoid ambiguity. if (node->n_supports () > 0) { - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ ; + TAO_INSERT_COMMENT (os); *os << be_nl_2 << "virtual void _add_ref ();" << be_nl; *os << "virtual void _remove_ref ();"; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp index ade6488acd2..7f5eefe75cd 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_cs.cpp @@ -40,8 +40,7 @@ be_visitor_valuetype_obv_cs::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Default constructor. *os << node->full_obv_skel_name () << "::"; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp index c7032dde502..af8ab1d339c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_sh.cpp @@ -58,8 +58,7 @@ be_visitor_valuetype_sh::visit_valuetype (be_valuetype *node) class_name += node->local_name (); } - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Generate the skeleton class name. *os << "class " << class_name.c_str () << ";" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp index 2b4f1096991..b529196273c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ss.cpp @@ -53,8 +53,7 @@ be_visitor_valuetype_ss::visit_valuetype (be_valuetype *node) const char *full_skel_name = full_skel_name_holder.c_str (); - *os << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); // Find if we are at the top scope or inside some module, // pre-compute the prefix that must be added to the local name in diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp index f2debe24349..8955dfffaac 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/any_op_ch.cpp @@ -51,8 +51,7 @@ be_visitor_valuetype_fwd_any_op_ch::visit_valuetype_fwd ( TAO_OutStream *os = this->ctx_->stream (); const char *macro = this->ctx_->export_macro (); - *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); be_module *module = nullptr; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp index 026f4bcd769..477ac4c7d37 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp @@ -62,8 +62,7 @@ be_visitor_valuetype_fwd_cdr_op_ch::visit_valuetype_fwd ( // generate the CDR << and >> operator declarations (prototypes) - *os << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl_2; + TAO_INSERT_COMMENT (os); *os << be_global->core_versioning_begin () << be_nl; diff --git a/TAO/TAO_IDL/be_include/be_helper.h b/TAO/TAO_IDL/be_include/be_helper.h index 1acdf87dbc5..5ba43cce6d6 100644 --- a/TAO/TAO_IDL/be_include/be_helper.h +++ b/TAO/TAO_IDL/be_include/be_helper.h @@ -218,6 +218,9 @@ public: TAO_OutStream &print (AST_Expression *idl); + void insert_comment (const char *file, int line); +#define TAO_INSERT_COMMENT(STRM) (STRM)->insert_comment (__FILE__, __LINE__) + protected: /// The underlying low-level I/O handle FILE *fp_; -- cgit v1.2.1 From 67e622e4639dbf478df2c009e10e5226e0eaaf45 Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Mon, 1 Nov 2021 12:03:17 -0500 Subject: TAO updates for /std:c++20 Note that the C++20 standard library disallows using wide (wchar_t) strings with narrow iostreams --- TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp | 2 ++ TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp | 4 ++-- TAO/tao/CORBA_String.cpp | 14 ++++++++++---- TAO/tao/CORBA_String.h | 3 +++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp index 520709eff1d..3befe5193ec 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp @@ -9,6 +9,8 @@ #include "orbsvcs/Notify/PropertySeq.h" +#include "orbsvcs/orbsvcs/NotifyExtC.h" + TAO_BEGIN_VERSIONED_NAMESPACE_DECL /*****************************************************************************/ diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp index 67941639ea2..6aa02a42676 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp @@ -205,7 +205,7 @@ lookup_one_type (const char* type, // @@ Would have used Offer_Database::offer_iterator for less // coupling between TAO_Lookup and Offer_Database, but g++ barfs on // that. -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined (ACE_HAS_CPP20) TAO_Offer_Database::offer_iterator offer_iter (type, offer_database); #else @@ -958,7 +958,7 @@ withdraw_using_constraint (const char *type, // Try to find the map of offers of desired service type. // @@ Again, should be Offer_Database::offer_iterator { -#if defined (_MSC_VER) +#if defined (_MSC_VER) && !defined (ACE_HAS_CPP20) TAO_Offer_Database::offer_iterator offer_iter (type, offer_database); #else diff --git a/TAO/tao/CORBA_String.cpp b/TAO/tao/CORBA_String.cpp index aaa20da44ec..a0fe07ad895 100644 --- a/TAO/tao/CORBA_String.cpp +++ b/TAO/tao/CORBA_String.cpp @@ -31,9 +31,10 @@ istream & operator>> (istream &is, CORBA::String_var &sv) { is.seekg (0, ios::end); - sv = CORBA::string_alloc (static_cast (is.tellg ())); + std::streamsize const n = is.tellg (); + sv = CORBA::string_alloc (static_cast (n)); is.seekg (0, ios::beg); - is >> sv.inout (); + is.read (sv.inout (), n); return is; } @@ -48,12 +49,15 @@ istream & operator>> (istream &is, CORBA::String_out &so) { is.seekg (0, ios::end); - so = CORBA::string_alloc (static_cast (is.tellg ())); + std::streamsize const n = is.tellg (); + so = CORBA::string_alloc (static_cast (n)); is.seekg (0, ios::beg); - is >> so.ptr (); + is.read (so.ptr (), n); return is; } +#ifndef ACE_HAS_CPP20 + // Until we implement WString support for platforms with a // 4-byte wchar_t, we just define the following to emit // the CORBA::WChars one by one. @@ -136,6 +140,8 @@ operator>> (istream &is, CORBA::WString_out &wso) return is; } +#endif /* ACE_HAS_CPP20 */ + #endif /* ACE_LACKS_IOSTREAM_TOTALLY */ TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/CORBA_String.h b/TAO/tao/CORBA_String.h index 5e308bc9ad2..2338c9a03a4 100644 --- a/TAO/tao/CORBA_String.h +++ b/TAO/tao/CORBA_String.h @@ -273,6 +273,8 @@ TAO_Export ostream & operator<< (ostream &, CORBA::String_out &); TAO_Export istream & operator>> (istream &, CORBA::String_out &); + +# ifndef ACE_HAS_CPP20 TAO_Export ostream & operator<< (ostream &, const CORBA::WString_var &); TAO_Export istream & @@ -281,6 +283,7 @@ TAO_Export ostream & operator<< (ostream &, CORBA::WString_out &); TAO_Export istream & operator>> (istream &, CORBA::WString_out &); +# endif /* ACE_HAS_CPP20 */ # endif /* ACE_LACKS_IOSTREAM_TOTALLY */ -- cgit v1.2.1 From c53ed6fa6a20b529b507379ebdf6efa8c26e7166 Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Mon, 1 Nov 2021 15:28:00 -0500 Subject: tao_idl updates for /std:c++20 std::ostream doesn't work with wchar_t --- TAO/TAO_IDL/ast/ast_expression.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp index 276f0f66cac..868c80b6190 100644 --- a/TAO/TAO_IDL/ast/ast_expression.cpp +++ b/TAO/TAO_IDL/ast/ast_expression.cpp @@ -2697,9 +2697,11 @@ dump_expr_val (ACE_OSTREAM_TYPE &o, AST_Expression::AST_ExprValue *ev) case AST_Expression::EV_char: o << ev->u.cval; break; +#ifndef ACE_HAS_CPP20 case AST_Expression::EV_wchar: o << ev->u.wcval; break; +#endif case AST_Expression::EV_octet: { std::ios saved (nullptr); -- cgit v1.2.1 From 257660f8cb9bb5e1cd989e82295d70a4296bc92f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 3 Nov 2021 09:49:53 +0100 Subject: Reduce amount of empty lines in union generation * TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp: * TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp: --- TAO/TAO_IDL/be/be_visitor_union/cdr_op_cs.cpp | 8 ++--- .../be/be_visitor_union_branch/cdr_op_cs.cpp | 42 +++++++++++----------- 2 files changed, 25 insertions(+), 25 deletions(-) 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 9072ec9a74b..96c6e7b2132 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 @@ -123,8 +123,8 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) *os << "::CORBA::Boolean operator<< (" << be_idt << be_idt_nl << "TAO_OutputCDR &strm," << be_nl - << "const " << node->name () << " &_tao_union" << be_uidt_nl - << ")" << be_uidt_nl + << "const " << node->name () << " &_tao_union)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl; serialize_disc (os, node->udisc_type (), true /* out */); @@ -169,8 +169,8 @@ be_visitor_union_cdr_op_cs::visit_union (be_union *node) this->ctx_->sub_state(TAO_CodeGen::TAO_CDR_INPUT); *os << "::CORBA::Boolean operator>> (" << be_idt << be_idt_nl << "TAO_InputCDR &strm," << be_nl - << node->name () << " &_tao_union" << be_uidt_nl - << ")" << be_uidt_nl + << node->name () << " &_tao_union)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl; be_type* disc_type = diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp index f02c02b38a8..869aadd95ce 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_cs.cpp @@ -145,7 +145,7 @@ be_visitor_union_branch_cdr_op_cs::visit_array (be_array *node) << be_idt << be_idt_nl << "_tao_union_tmp" << be_uidt_nl << ");" << be_uidt_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -203,7 +203,7 @@ be_visitor_union_branch_cdr_op_cs::visit_enum (be_enum *node) case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << " _tao_union_tmp =" << be_idt_nl << "static_cast<" << node->name () << "> (0UL);" << be_uidt_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -283,7 +283,7 @@ be_visitor_union_branch_cdr_op_cs::visit_interface (be_interface *node) else { *os << node->name () << "_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.inout ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.inout ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -363,7 +363,7 @@ be_visitor_union_branch_cdr_op_cs::visit_interface_fwd (be_interface_fwd *node) else { *os << node->name () << "_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.inout ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.inout ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -442,7 +442,7 @@ be_visitor_union_branch_cdr_op_cs::emit_valuetype_common (be_type *node) { case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << "_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.inout ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.inout ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -506,7 +506,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( { *os << "::CORBA::Object_var _tao_union_tmp;" << be_nl; - *os << "result = strm >> _tao_union_tmp.out ();" << be_nl_2 + *os << "result = strm >> _tao_union_tmp.out ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () << " (_tao_union_tmp.in ());"; @@ -515,7 +515,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( else if (pt == AST_PredefinedType::PT_pseudo) { *os << "::CORBA::TypeCode_var _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp.out ();" << be_nl_2 + << "result = strm >> _tao_union_tmp.out ();" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () << " (_tao_union_tmp.in ());"; @@ -524,7 +524,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( else if (pt == AST_PredefinedType::PT_value) { *os << "::CORBA::ValueBase * _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () << " (_tao_union_tmp);"; @@ -535,7 +535,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Char _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_char _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -546,7 +546,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::WChar _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_wchar _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -557,7 +557,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Octet _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_octet _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -568,7 +568,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Boolean _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_boolean _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -579,7 +579,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::UInt8 _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_uint8 _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -590,7 +590,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( *os << "::CORBA::Int8 _tao_union_tmp;" << be_nl << "::ACE_InputCDR::to_int8 _tao_union_helper " << "(_tao_union_tmp);" << be_nl - << "result = strm >> _tao_union_helper;" << be_nl_2 + << "result = strm >> _tao_union_helper;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -599,7 +599,7 @@ be_visitor_union_branch_cdr_op_cs::visit_predefined_type ( else { *os << node->name () << " _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -735,7 +735,7 @@ be_visitor_union_branch_cdr_op_cs::visit_sequence (be_sequence *node) } *os << " _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." @@ -805,19 +805,19 @@ be_visitor_union_branch_cdr_op_cs::visit_string (be_string *node) *os << "result = strm >> ACE_InputCDR::to_string (" << "_tao_union_tmp.out (), " << node->max_size ()->ev ()->u.ulval << ");" - << be_nl_2; + << be_nl; } else { *os << "result = strm >> ACE_InputCDR::to_wstring (" << "_tao_union_tmp.out (), " << node->max_size ()->ev ()->u.ulval << ");" - << be_nl_2; + << be_nl; } } else { - *os << "result = strm >> _tao_union_tmp.out ();" << be_nl_2; + *os << "result = strm >> _tao_union_tmp.out ();" << be_nl; } *os << "if (result)" << be_idt_nl @@ -913,7 +913,7 @@ be_visitor_union_branch_cdr_op_cs::visit_structure (be_structure *node) { case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << " _tao_union_tmp;" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () @@ -1011,7 +1011,7 @@ be_visitor_union_branch_cdr_op_cs::visit_union (be_union *node) case TAO_CodeGen::TAO_CDR_INPUT: *os << node->name () << " _tao_union_tmp" << ";" << be_nl - << "result = strm >> _tao_union_tmp;" << be_nl_2 + << "result = strm >> _tao_union_tmp;" << be_nl << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () -- cgit v1.2.1 From e891d97240963103798e3e78876447b171835e7e Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Wed, 3 Nov 2021 13:22:47 -0500 Subject: Use a using in place of a typedef Co-authored-by: Johnny Willemsen --- ACE/ace/Malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACE/ace/Malloc.h b/ACE/ace/Malloc.h index 5f8e2fed9bc..80cdcbf7421 100644 --- a/ACE/ace/Malloc.h +++ b/ACE/ace/Malloc.h @@ -287,7 +287,7 @@ public: void dump () const; }; - typedef ACE_Malloc_Header *MALLOC_HEADER_PTR; + using MALLOC_HEADER_PTR = ACE_Malloc_Header *; /** * @class ACE_Name_Node -- cgit v1.2.1