From af56cffb9e54af6abba3d59ebd19e2a2554f2acb Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 26 Mar 2024 09:53:06 +0100 Subject: [PATCH 01/94] Starter files --- tests/proxysource/client.cpp | 29 +++++++++++++++++++++++++++++ tests/proxysource/proxysource.mpc | 24 ++++++++++++++++++++++++ tests/proxysource/run_test.pl | 31 +++++++++++++++++++++++++++++++ tests/proxysource/test.idl | 22 ++++++++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 tests/proxysource/client.cpp create mode 100644 tests/proxysource/proxysource.mpc create mode 100644 tests/proxysource/run_test.pl create mode 100644 tests/proxysource/test.idl diff --git a/tests/proxysource/client.cpp b/tests/proxysource/client.cpp new file mode 100644 index 00000000..d79a5997 --- /dev/null +++ b/tests/proxysource/client.cpp @@ -0,0 +1,29 @@ +/** + * @file client.cpp + * @author Johnny Willemsen + * + * @brief C++11 client application which uses IDL defines types + * without the full TAOX11 support + * + * @copyright Copyright (c) Remedy IT Expertise BV + */ + +#include "testC.h" + +// Check for ACE define + +int +main(int, char* []) +{ + int result {}; + + try + { + } + catch (const std::exception& e) + { + std::cout << "exception caught: " << e.what() << std::endl; + return 1; + } + return result; +} diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc new file mode 100644 index 00000000..6ed4bb81 --- /dev/null +++ b/tests/proxysource/proxysource.mpc @@ -0,0 +1,24 @@ +// -*- MPC -*- + +project(*proxysource_gen_Idl): ridl_ostream_defaults { + //idlflags += -Scorba + //idlflags += -Scdr -SS -Scp -Sorb + //idlflags -= -Gos + idlflags += -Gps + IDL_Files { + test.idl + } + custom_only = 1 +} + +project(*proxysource_gen_Client) { + after += *proxysource_gen_Idl + Source_Files { + client.cpp + } + Source_Files { + testC.cpp + } + includes += $(TAOX11_ROOT) +} + diff --git a/tests/proxysource/run_test.pl b/tests/proxysource/run_test.pl new file mode 100644 index 00000000..82d03efe --- /dev/null +++ b/tests/proxysource/run_test.pl @@ -0,0 +1,31 @@ +#--------------------------------------------------------------------- +# @file run_test.pl +# @author Marcel Smit +# +# @copyright Copyright (c) Remedy IT Expertise BV +#--------------------------------------------------------------------- +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; + +my $target = PerlACE::TestTarget::create_target(2) || die "Create target 2 failed\n"; + +$status = 0; + +$SV = $target->CreateProcess ("client"); + +$server = $SV->SpawnWaitKill ($target->ProcessStartWaitInterval()); + +if ($server != 0) { + print STDERR "ERROR: const returned $server\n"; + $status = 1; +} + +$target->GetStderrLog(); + +exit $status; diff --git a/tests/proxysource/test.idl b/tests/proxysource/test.idl new file mode 100644 index 00000000..7273b032 --- /dev/null +++ b/tests/proxysource/test.idl @@ -0,0 +1,22 @@ +/** + * @file test.idl + * @author Johnny Willemsen + * + * Only use types that should be usable with the CORBA support in the proxy source + * - basic types + * - struct + * - union (be aware of the exception + * - (bounded) (w)string + * - (bounded) sequences + * + * @copyright Copyright (c) Remedy IT Expertise BV + */ + +module Test +{ + typedef short myshort; + struct Bar + { + short my1; + }; +}; From d540ca424199e07507f9b6f4c705880589f7ca79 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 26 Mar 2024 10:02:33 +0100 Subject: [PATCH 02/94] Clarify that we talk about proxy_hdr * ridlbe/c++11/config.rb: * ridlbe/c++11/templates/cli/hdr/post.erb: * ridlbe/c++11/visitorbase.rb: * ridlbe/c++11/writers/amistubheader.rb: * ridlbe/c++11/writers/stubproxy.rb: * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/config.rb | 14 +++++++------- ridlbe/c++11/templates/cli/hdr/post.erb | 4 ++-- ridlbe/c++11/visitorbase.rb | 8 ++++---- ridlbe/c++11/writers/amistubheader.rb | 2 +- ridlbe/c++11/writers/stubproxy.rb | 2 +- ridlbe/c++11/writers/stubsource.rb | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 41f7a871..c6cc2c91 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -168,7 +168,7 @@ def self.add_extended_options(ol, _idl_params) description: "-Scc\t\t\tSuppress generation of client source file (generated by default)" }, 'ch' => { option_name: :no_client_header, description: "-Sch\t\t\tSuppress generation of client header file (generated by default)" }, - 'cp' => { option_name: :no_client_proxy, + 'cp' => { option_name: :no_client_proxy_hdr, description: "-Scp\t\t\tSuppress generation of client proxy header file (generated by default)" }, 'cdr' => { option_name: :no_cdr_streaming, description: "-Scdr\t\t\tSuppress generation of CDR streaming operators (generated by default)" }, @@ -378,7 +378,7 @@ def self.setup_output(options) options[:output] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx]) options[:output_ami_incl] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:ami_pfx] + options[:stub_pfx] + options[:hdr_ext]) options[:output_src] = options[:output] + options[:src_ext] - options[:output_prx] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx] + options[:proxy_pfx] + options[:hdr_ext]) + options[:output_prx_hdr] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx] + options[:proxy_pfx] + options[:hdr_ext]) options[:output] << options[:hdr_ext] if options[:gen_typecodes] && options[:gen_anytypecode_source] options[:output_atc] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:anytypecode_pfx] + options[:src_ext]) @@ -458,10 +458,10 @@ def self.generate_client_stubs(options) IDL.push_production(:stub_source, ::IDL::Cxx11::StubSourceWriter.new(co_src, options)) end end - unless options[:no_client_proxy] - if options[:output_prx] - co_prx = GenFile.new(options[:output_prx]) - IDL.push_production(:stub_proxy, ::IDL::Cxx11::StubProxyHeaderWriter.new(co_prx, options)) + unless options[:no_client_proxy_hdr] + if options[:output_prx_hdr] + co_prx = GenFile.new(options[:output_prx_hdr]) + IDL.push_production(:stub_proxy_header, ::IDL::Cxx11::StubProxyHeaderWriter.new(co_prx, options)) end end if ((options[:gen_anytypecode_source] || false) && options[:gen_typecodes]) @@ -540,7 +540,7 @@ def self.generate_ami_support(options) end if options[:ami_stub_output_prx] co_prx = GenFile.new(options[:ami_stub_output_prx]) - IDL.push_production(:ami_stub_proxy, ::IDL::Cxx11::AmiStubProxyHeaderWriter.new(co_prx, options)) + IDL.push_production(:ami_stub_proxy_header, ::IDL::Cxx11::AmiStubProxyHeaderWriter.new(co_prx, options)) end end end diff --git a/ridlbe/c++11/templates/cli/hdr/post.erb b/ridlbe/c++11/templates/cli/hdr/post.erb index 6d508d35..6576740b 100644 --- a/ridlbe/c++11/templates/cli/hdr/post.erb +++ b/ridlbe/c++11/templates/cli/hdr/post.erb @@ -1,8 +1,8 @@ // generated from <%= ridl_template_path %> -% unless no_client_proxy? +% unless no_client_proxy_hdr? #if defined (__TAOX11_INCLUDE_STUB_PROXY__) -#include "<%= client_proxy %>" +#include "<%= client_proxy_hdr %>" #endif % end diff --git a/ridlbe/c++11/visitorbase.rb b/ridlbe/c++11/visitorbase.rb index 5519d8f3..bde1edc4 100644 --- a/ridlbe/c++11/visitorbase.rb +++ b/ridlbe/c++11/visitorbase.rb @@ -33,12 +33,12 @@ def no_client_inline? params[:no_client_inline] end - def client_proxy - File.basename(params[:output_prx] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.h')) + def client_proxy_hdr + File.basename(params[:output_prx_hdr] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.h')) end - def no_client_proxy? - params[:no_client_proxy] && params[:ami_stub_output_prx].nil? + def no_client_proxy_hdr? + params[:no_client_proxy_hdr] && params[:ami_stub_output_prx].nil? end def client_source diff --git a/ridlbe/c++11/writers/amistubheader.rb b/ridlbe/c++11/writers/amistubheader.rb index d86fda0c..77844d1d 100644 --- a/ridlbe/c++11/writers/amistubheader.rb +++ b/ridlbe/c++11/writers/amistubheader.rb @@ -89,7 +89,7 @@ def post_visit(parser) v.class_eval do ### # Overload standard #client_proxy for this visitor instance - def client_proxy + def client_proxy_hdr File.basename(params[:idlfile], params[:idlext]) + params[:ami_pfx] + params[:stub_pfx] + params[:proxy_pfx] + '.h' end end diff --git a/ridlbe/c++11/writers/stubproxy.rb b/ridlbe/c++11/writers/stubproxy.rb index 47119bcb..c73fc4bf 100644 --- a/ridlbe/c++11/writers/stubproxy.rb +++ b/ridlbe/c++11/writers/stubproxy.rb @@ -31,7 +31,7 @@ def initialize(output = STDOUT, opts = {}) end def visit_nodes(parser) - @include_guard = "__RIDL_#{File.basename(params[:output_prx] || '').to_random_include_guard}_INCLUDED__" + @include_guard = "__RIDL_#{File.basename(params[:output_prx_hdr] || '').to_random_include_guard}_INCLUDED__" super visitor(PostVisitor).visit end diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 5c9fe7df..47f2ae4d 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -53,7 +53,7 @@ def pre_visit(parser) def post_visit(parser) # stub proxy implementations - visit_proxy(parser) unless params[:no_client_proxy] + visit_proxy(parser) unless params[:no_client_proxy_hdr] visit_anyops(parser) if params[:gen_any_ops] && !params[:gen_anytypecode_source] @@ -62,7 +62,7 @@ def post_visit(parser) visit_object_traits_specializations(parser) # Object ref traits specializations - visit_proxy_object_ref_traits_specializations(parser) unless params[:no_client_proxy] + visit_proxy_object_ref_traits_specializations(parser) unless params[:no_client_proxy_hdr] end # CDR operators @@ -160,7 +160,7 @@ def visit_includes(parser) end def visit_proxy(parser) - writer(StubProxySourceWriter).visit_nodes(parser) unless params[:no_client_proxy] + writer(StubProxySourceWriter).visit_nodes(parser) unless params[:no_client_proxy_hdr] end def visit_anyops(parser) From 78cd4c817eab2979e80709946efd051c1e81de23 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 26 Mar 2024 10:13:53 +0100 Subject: [PATCH 03/94] Add files * ridlbe/c++11/config.rb: * ridlbe/c++11/visitorbase.rb: * tests/proxysource/proxysource.mpc: --- ridlbe/c++11/config.rb | 12 ++++++++++++ ridlbe/c++11/visitorbase.rb | 4 ++++ tests/proxysource/proxysource.mpc | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index c6cc2c91..b7f59732 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -136,6 +136,10 @@ def self.add_extended_options(ol, _idl_params) description: "-Gxhimpl\t\t\tGenerate export header file for implementation code (not generated by default)" }, 'isrv' => { option_name: :gen_impl_servant, description: "-Gisrv\t\t\tGenerate implementation classes for servants (not generated by default; ignored with -SS or --stubs-only)" }, + 'cps' => { option_name: :client_proxy_source, + description: "-Gcps\t\t\tGenerate implementation of client proxy is separate source file (not generated by default)" }, + 'xhcpr' => { option_name: :gen_export_client_proxy, + description: "-Gxhpr\t\t\tGenerate export header file for client proxy (not generated by default)" }, } end @@ -149,6 +153,8 @@ def self.add_extended_options(ol, _idl_params) description: "-Xsta\t\t\tExport ami stub code (not exported by default)" }, 'impl' => { option_name: :export_impl, description: "-Ximpl\t\t\tExport implementation code (not exported by default)" }, + 'cp' => { option_name: :export_client_proxy, + description: "-Xpr\t\t\tExport client proxy code (not exported by default)" }, } end @@ -464,6 +470,12 @@ def self.generate_client_stubs(options) IDL.push_production(:stub_proxy_header, ::IDL::Cxx11::StubProxyHeaderWriter.new(co_prx, options)) end end + if options[:client_proxy_src] + if options[:output_prx_src] + co_prx = GenFile.new(options[:output_prx_src]) + IDL.push_production(:stub_proxy_source, ::IDL::Cxx11::StubProxySourceWriter.new(co_prx, options)) + end + end if ((options[:gen_anytypecode_source] || false) && options[:gen_typecodes]) if options[:output_atc] co_atc = GenFile.new(options[:output_atc]) diff --git a/ridlbe/c++11/visitorbase.rb b/ridlbe/c++11/visitorbase.rb index bde1edc4..2e9425ef 100644 --- a/ridlbe/c++11/visitorbase.rb +++ b/ridlbe/c++11/visitorbase.rb @@ -37,6 +37,10 @@ def client_proxy_hdr File.basename(params[:output_prx_hdr] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.h')) end + def client_proxy_src + File.basename(params[:output_prx_src] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.cpp')) + end + def no_client_proxy_hdr? params[:no_client_proxy_hdr] && params[:ami_stub_output_prx].nil? end diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 6ed4bb81..50eb9591 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -4,7 +4,7 @@ project(*proxysource_gen_Idl): ridl_ostream_defaults { //idlflags += -Scorba //idlflags += -Scdr -SS -Scp -Sorb //idlflags -= -Gos - idlflags += -Gps + idlflags += -Gcps IDL_Files { test.idl } From 18e171a5a86f1123e1b079ebb708b253e33663c0 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 26 Mar 2024 10:41:51 +0100 Subject: [PATCH 04/94] Work on proxy source * ridlbe/c++11/writers/stubproxy.rb -> ridlbe/c++11/writers/stubproxyheader.rb: Moved. * ridlbe/c++11/config.rb: * ridlbe/c++11/visitorbase.rb: * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/config.rb | 13 +++++++------ ridlbe/c++11/visitorbase.rb | 6 +++--- .../writers/{stubproxy.rb => stubproxyheader.rb} | 6 +++--- ridlbe/c++11/writers/stubsource.rb | 4 ++-- 4 files changed, 15 insertions(+), 14 deletions(-) rename ridlbe/c++11/writers/{stubproxy.rb => stubproxyheader.rb} (99%) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index b7f59732..5a6bee7b 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -384,7 +384,8 @@ def self.setup_output(options) options[:output] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx]) options[:output_ami_incl] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:ami_pfx] + options[:stub_pfx] + options[:hdr_ext]) options[:output_src] = options[:output] + options[:src_ext] - options[:output_prx_hdr] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx] + options[:proxy_pfx] + options[:hdr_ext]) + options[:output_client_proxy_header] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx] + options[:proxy_pfx] + options[:hdr_ext]) + options[:output_client_proxy_source] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx] + options[:proxy_pfx] + options[:src_ext]) options[:output] << options[:hdr_ext] if options[:gen_typecodes] && options[:gen_anytypecode_source] options[:output_atc] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:anytypecode_pfx] + options[:src_ext]) @@ -465,14 +466,14 @@ def self.generate_client_stubs(options) end end unless options[:no_client_proxy_hdr] - if options[:output_prx_hdr] - co_prx = GenFile.new(options[:output_prx_hdr]) + if options[:output_client_proxy_header] + co_prx = GenFile.new(options[:output_client_proxy_header]) IDL.push_production(:stub_proxy_header, ::IDL::Cxx11::StubProxyHeaderWriter.new(co_prx, options)) end end - if options[:client_proxy_src] - if options[:output_prx_src] - co_prx = GenFile.new(options[:output_prx_src]) + if options[:client_proxy_source] + if options[:output_client_proxy_source] + co_prx = GenFile.new(options[:output_client_proxy_source]) IDL.push_production(:stub_proxy_source, ::IDL::Cxx11::StubProxySourceWriter.new(co_prx, options)) end end diff --git a/ridlbe/c++11/visitorbase.rb b/ridlbe/c++11/visitorbase.rb index 2e9425ef..a52d67f9 100644 --- a/ridlbe/c++11/visitorbase.rb +++ b/ridlbe/c++11/visitorbase.rb @@ -34,11 +34,11 @@ def no_client_inline? end def client_proxy_hdr - File.basename(params[:output_prx_hdr] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.h')) + File.basename(params[:output_client_proxy_header] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.h')) end - def client_proxy_src - File.basename(params[:output_prx_src] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.cpp')) + def client_proxy_source + File.basename(params[:output_client_proxy_source] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.cpp')) end def no_client_proxy_hdr? diff --git a/ridlbe/c++11/writers/stubproxy.rb b/ridlbe/c++11/writers/stubproxyheader.rb similarity index 99% rename from ridlbe/c++11/writers/stubproxy.rb rename to ridlbe/c++11/writers/stubproxyheader.rb index c73fc4bf..7178308b 100644 --- a/ridlbe/c++11/writers/stubproxy.rb +++ b/ridlbe/c++11/writers/stubproxyheader.rb @@ -1,8 +1,8 @@ #-------------------------------------------------------------------- -# @file stubproxy.rb +# @file stubproxyheader.rb # @author Martin Corino # -# @brief walker class for stub header +# @brief walker class for stub proxy header # # @copyright Copyright (c) Remedy IT Expertise BV #-------------------------------------------------------------------- @@ -31,7 +31,7 @@ def initialize(output = STDOUT, opts = {}) end def visit_nodes(parser) - @include_guard = "__RIDL_#{File.basename(params[:output_prx_hdr] || '').to_random_include_guard}_INCLUDED__" + @include_guard = "__RIDL_#{File.basename(params[:output_client_proxy_header] || '').to_random_include_guard}_INCLUDED__" super visitor(PostVisitor).visit end diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 47f2ae4d..60dc12d0 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -160,7 +160,7 @@ def visit_includes(parser) end def visit_proxy(parser) - writer(StubProxySourceWriter).visit_nodes(parser) unless params[:no_client_proxy_hdr] + writer(StubProxySourceWriter).visit_nodes(parser) unless params[:no_client_proxy_hdr] || params[:client_proxy_source] end def visit_anyops(parser) @@ -176,7 +176,7 @@ def visit_proxy_object_ref_traits_specializations(parser) end def visit_cdr(parser) - writer(StubSourceCDRWriter).visit_nodes(parser) unless params[:no_cdr_streaming] + writer(StubSourceCDRWriter).visit_nodes(parser) unless params[:no_cdr_streaming] || params[:client_proxy_source] end def visit_typecodes(parser) From 5ba57a3d4a2c4928bf9336bc068c4dfd5c09fed2 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 26 Mar 2024 10:57:23 +0100 Subject: [PATCH 05/94] More changes for stub proxy source * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/writers/stubsource.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 60dc12d0..3f3dde9d 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -26,7 +26,7 @@ def initialize(output = STDOUT, opts = {}) @object_traits_specializations = false @default_pre_includes = [] - unless params[:no_cdr_streaming] + unless params[:no_cdr_streaming] || params[:client_proxy_source] @default_pre_includes << 'tao/CDR.h' end if params[:gen_typecodes] && !params[:gen_anytypecode_source] From d0f2b1237d6ba25e74090ca2e6bcc4210a009036 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 26 Mar 2024 11:08:13 +0100 Subject: [PATCH 06/94] Separate file * ridlbe/c++11/writers/stubsource.rb: * tests/proxysource/proxysource.mpc: --- ridlbe/c++11/writers/stubsource.rb | 15 +++++++-------- tests/proxysource/proxysource.mpc | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 3f3dde9d..430d7055 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -36,9 +36,8 @@ def initialize(output = STDOUT, opts = {}) if params[:gen_any_ops] && !params[:gen_anytypecode_source] @default_pre_includes << 'tao/AnyTypeCode/Any_Impl_T.h' end - @default_post_includes = [ - 'tao/x11/tao_corba.h' - ] + @default_post_includes = [] + @default_post_includes << 'tao/x11/tao_corba.h' unless params[:client_proxy_source] @default_post_includes << 'tao/x11/anytypecode/typecode.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source] @default_post_includes << 'tao/x11/anytypecode/typecode_impl.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source] end @@ -370,21 +369,21 @@ def check_idl_type(idl_type) IDL::Type::Boolean, IDL::Type::WChar, IDL::Type::Octet - add_include('tao/x11/special_basic_arguments.h') unless params[:no_cdr_streaming] + add_include('tao/x11/special_basic_arguments.h') unless params[:no_cdr_streaming] || params[:client_proxy_source] when IDL::Type::LongDouble - add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:client_proxy_source] when IDL::Type::Integer, IDL::Type::Double, IDL::Type::Float, IDL::Type::Void - add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:client_proxy_source] when IDL::Type::String, IDL::Type::WString - add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:client_proxy_source] when IDL::Type::Object, IDL::Type::Interface, IDL::Type::Component - add_include('tao/x11/stub_arg_traits.h') unless params[:no_cdr_streaming] + add_include('tao/x11/stub_arg_traits.h') unless params[:no_cdr_streaming] || params[:client_proxy_source] when IDL::Type::Sequence # arg template included in P.h check_idl_type(idl_type.basetype) diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 50eb9591..2cf21595 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -4,7 +4,7 @@ project(*proxysource_gen_Idl): ridl_ostream_defaults { //idlflags += -Scorba //idlflags += -Scdr -SS -Scp -Sorb //idlflags -= -Gos - idlflags += -Gcps + idlflags += -Gcps -Sorb IDL_Files { test.idl } From db59a32113c080d907f7588840bc90e21e4cac26 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 26 Mar 2024 11:12:24 +0100 Subject: [PATCH 07/94] New file --- ridlbe/c++11/writers/stubproxysource.rb | 337 ++++++++++++++++++++++++ 1 file changed, 337 insertions(+) create mode 100644 ridlbe/c++11/writers/stubproxysource.rb diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb new file mode 100644 index 00000000..1cbb2486 --- /dev/null +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -0,0 +1,337 @@ +#-------------------------------------------------------------------- +# @file stubproxysource.rb +# @author Johnny Willemsen +# +# @brief walker class for stub proxy source +# +# @copyright Copyright (c) Remedy IT Expertise BV +#-------------------------------------------------------------------- +require 'ridlbe/c++11/writerbase' + +module IDL + module Cxx11 + class StubProxySourceBaseWriter < CxxCodeWriterBase + def initialize(output = STDOUT, opts = {}) + super + self.template_root = File.join('cli', 'src') + end + end + + class StubProxySourceWriter < StubSourceBaseWriter + def initialize(output = STDOUT, opts = {}) + super + + @default_pre_includes = [] + @default_post_includes = [] + @default_pre_includes << 'tao/CDR.h' unless params[:no_cdr_streaming] + @default_post_includes << 'tao/x11/tao_corba.h' + end + + # Object traits are only required for interfaces and valuetypes + @object_traits_specializations = false + + def enter_module(node) + super + println + printiln('// generated from StubProxySourceWriter#enter_module') + printiln('namespace ' + node.cxxname) + printiln('{') + inc_nest + end + + def leave_module(node) + dec_nest + printiln("} // namespace #{node.cxxname}") + println + super + end + + def enter_interface(node) + super + return if node.is_local? || node.is_pseudo? || node.is_abstract? + + @object_traits_specializations = true + visitor(InterfaceVisitor).visit_proxy(node) + println + end + + def enter_valuetype(node) + @object_traits_specializations = true + super + end + + def pre_visit(parser) + properties[:pre_includes] = @default_pre_includes + properties[:post_includes] = [] + properties[:includes] = [] + visitor(PreVisitor).visit + super + end + + def post_visit(parser) + # stub proxy implementations + #visit_proxy(parser) + + if @object_traits_specializations + # Object traits specializations + visit_object_traits_specializations(parser) + + # Object ref traits specializations + visit_proxy_object_ref_traits_specializations(parser) unless params[:no_client_proxy_hdr] + end + + # CDR operators + visit_cdr(parser) unless params[:no_cdr_streaming] + + super + visitor(PostVisitor).visit + end + + def visit_cdr(parser) + writer(StubSourceCDRWriter).visit_nodes(parser) unless params[:no_cdr_streaming] + end + + def visit_includes(parser) + writer(StubProxySourceIncludeWriter, + { default_pre_includes: @default_pre_includes, + default_post_includes: @default_post_includes }).visit_nodes(parser) + end + end # StubProxySourceWriter + + class StubProxySourceIncludeWriter < StubSourceBaseWriter + def initialize(output = STDOUT, opts = {}) + super + @default_pre_includes = params[:default_pre_includes] + @default_post_includes = params[:default_post_includes] + @includes = [] + end + + def generate_typecodes? + params[:gen_typecodes] && !params[:gen_anytypecode_source] + end + + def generate_anyops? + params[:gen_any_ops] && !params[:gen_anytypecode_source] + end + + attr_reader :includes + + def post_visit(_parser) + properties[:pre_includes] = @default_pre_includes + properties[:post_includes] = @default_post_includes + properties[:includes] = @includes + visitor(PreVisitor).visit + end + + def enter_interface(node) + add_pre_include('tao/Object_T.h') unless node.is_local? + add_pre_include('tao/Invocation_Adapter.h') unless node.is_local? + if generate_typecodes? + add_pre_include('tao/AnyTypeCode/Objref_TypeCode_Static.h') + end + add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if generate_anyops? + add_post_include('tao/x11/exception_macros.h') unless node.is_local? + return if node.is_local? || node.is_pseudo? || node.is_abstract? + + add_post_include('tao/x11/objproxy.h') + check_idl_type(node.idltype) + end + + def visit_operation(node) + return if node.enclosure.is_local? || (node.enclosure.respond_to?(:is_pseudo?) && node.enclosure.is_pseudo?) || (node.enclosure.respond_to?(:is_abstract?) && node.enclosure.is_abstract?) + + check_idl_type(node.idltype) + node.params.each { |parm| check_idl_type(parm.idltype) } + unless node.raises.empty? + add_include('tao/x11/user_exception_proxy_in_t.h') + add_include('tao/x11/user_exception_proxy_out.h') + add_include('tao/Exception_Data.h') + end + end + + def visit_attribute(node) + return if node.enclosure.is_local? || (node.enclosure.respond_to?(:is_pseudo?) && node.enclosure.is_pseudo?) || (node.enclosure.respond_to?(:is_abstract?) && node.enclosure.is_abstract?) + + check_idl_type(node.idltype) + add_include('tao/x11/basic_arguments.h') unless node.readonly ## for void return of setter + unless node.get_raises.empty? && node.set_raises.empty? + add_include('tao/x11/user_exception_proxy_in_t.h') + add_include('tao/x11/user_exception_proxy_out.h') + add_include('tao/Exception_Data.h') + end + end + + def enter_valuetype(node) + if generate_typecodes? + add_pre_include('tao/AnyTypeCode/Value_TypeCode_Static.h') + add_pre_include('tao/AnyTypeCode/TypeCode_Value_Field.h') + add_pre_include('tao/AnyTypeCode/Recursive_Type_TypeCode.h') if node.is_recursive? + end + add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if generate_anyops? + add_post_include('tao/x11/anytypecode/typecode.h') # in case not added yet + add_post_include('tao/x11/valuetype/valuetype_proxies.h') # after typecode includes + return if node.is_abstract? || node.is_local? + + node.state_members.each { |m| check_idl_type(m.idltype) } + end + + def visit_valuebox(node) + if generate_typecodes? + add_pre_include('tao/AnyTypeCode/Alias_TypeCode_Static.h') + end + add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if generate_anyops? + add_post_include('tao/x11/anytypecode/typecode.h') # in case not added yet + add_post_include('tao/x11/valuetype/valuetype_proxies.h') # after typecode includes + return if node.is_local? + + check_idl_type(node.boxed_type) + end + + def enter_struct(node) + if generate_typecodes? + add_pre_include('tao/AnyTypeCode/Struct_TypeCode_Static.h') + add_pre_include('tao/AnyTypeCode/TypeCode_Struct_Field.h') + add_pre_include('tao/AnyTypeCode/Recursive_Type_TypeCode.h') if node.is_recursive? + end + add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if generate_anyops? + return if node.is_local? + + # arg template included in P.h + node.members.each { |m| check_idl_type(m.idltype) } + end + + def enter_union(node) + if generate_typecodes? + add_pre_include('tao/AnyTypeCode/Union_TypeCode_Static.h') + add_post_include('tao/x11/anytypecode/typecode_case_t.h') + add_pre_include('tao/AnyTypeCode/Recursive_Type_TypeCode.h') if node.is_recursive? + end + add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if generate_anyops? + return if node.is_local? + + # arg template included in P.h + node.members.each { |m| check_idl_type(m.idltype) } + end + + def enter_exception(node) + if generate_typecodes? + add_pre_include('tao/AnyTypeCode/Struct_TypeCode_Static.h') + add_pre_include('tao/AnyTypeCode/TypeCode_Struct_Field.h') + end + add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if generate_anyops? + # arg template included in P.h + node.members.each { |m| check_idl_type(m.idltype) } + end + + def visit_enum(_node) + if generate_typecodes? + add_pre_include('tao/AnyTypeCode/Enum_TypeCode_Static.h') + end + add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if generate_anyops? + end + + def visit_bitmask(_node) + if generate_typecodes? + add_pre_include('tao/AnyTypeCode/Enum_TypeCode_Static.h') + end + add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if generate_anyops? + end + + def visit_bitset(_node) + if generate_typecodes? + add_pre_include('tao/AnyTypeCode/Enum_TypeCode_Static.h') + end + add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if generate_anyops? + end + + def visit_typedef(node) + return if node.idltype.resolved_type.is_a?(IDL::Type::Native) + + add_pre_include('tao/AnyTypeCode/Alias_TypeCode_Static.h') if generate_typecodes? + # just an alias or a sequence, array or fixed? + unless node.idltype.is_a?(IDL::Type::ScopedName) + add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if generate_anyops? + if generate_typecodes? + idl_type = node.idltype.resolved_type + case idl_type + when IDL::Type::String, + IDL::Type::WString + add_pre_include('tao/AnyTypeCode/String_TypeCode_Static.h') + when IDL::Type::Sequence, + IDL::Type::Array + add_pre_include('tao/AnyTypeCode/Sequence_TypeCode_Static.h') + unless node.is_local? + check_idl_type(idl_type) + check_idl_type(idl_type.basetype) + end + when IDL::Type::Map + add_pre_include('tao/AnyTypeCode/Sequence_TypeCode_Static.h') + unless node.is_local? + check_idl_type(idl_type) + check_idl_type(idl_type.basetype) + end + end + end + end + end + + private + + def check_idl_type(idl_type) + idl_type = idl_type.resolved_type + case idl_type + when IDL::Type::Char, + IDL::Type::Boolean, + IDL::Type::WChar, + IDL::Type::Octet + add_include('tao/x11/special_basic_arguments.h') unless params[:no_cdr_streaming] + when IDL::Type::LongDouble + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] + when IDL::Type::Integer, + IDL::Type::Double, + IDL::Type::Float, + IDL::Type::Void + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] + when IDL::Type::String, + IDL::Type::WString + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] + when IDL::Type::Object, + IDL::Type::Interface, + IDL::Type::Component + add_include('tao/x11/stub_arg_traits.h') unless params[:no_cdr_streaming] + when IDL::Type::Sequence + # arg template included in P.h + check_idl_type(idl_type.basetype) + when IDL::Type::Map + # arg template included in P.h + check_idl_type(idl_type.keytype) + check_idl_type(idl_type.valuetype) + when IDL::Type::Array + # arg template included in P.h + check_idl_type(idl_type.basetype) + when IDL::Type::Servant + add_include('tao/x11/portable_server/servantbase.h') + end + end + + def add_include(inc_file) + @includes << inc_file unless @includes.include?(inc_file) || + @default_pre_includes.include?(inc_file) || + @default_post_includes.include?(inc_file) + end + + def add_pre_include(inc_file) + @default_pre_includes << inc_file unless @includes.include?(inc_file) || + @default_pre_includes.include?(inc_file) || + @default_post_includes.include?(inc_file) + end + + def add_post_include(inc_file) + @default_post_includes << inc_file unless @includes.include?(inc_file) || + @default_pre_includes.include?(inc_file) || + @default_post_includes.include?(inc_file) + end + end + + end +end From 9ae429963956daeeb1ac37a7c1e4f10336bb4952 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 27 Mar 2024 16:15:20 +0100 Subject: [PATCH 08/94] Additional args * tests/proxysource/proxysource.mpc: --- tests/proxysource/proxysource.mpc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 2cf21595..64c093ae 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -4,7 +4,8 @@ project(*proxysource_gen_Idl): ridl_ostream_defaults { //idlflags += -Scorba //idlflags += -Scdr -SS -Scp -Sorb //idlflags -= -Gos - idlflags += -Gcps -Sorb + idlflags += -Gcps -Sorb -Gatc + idlflags -= -Sa -St IDL_Files { test.idl } From 10f1511d4ec48f913b178225d0230b32862e0a08 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 2 Apr 2024 11:36:48 +0200 Subject: [PATCH 09/94] Separate A.h file * ridlbe/c++11/writers/anytypecodehdr.rb: Added. * ridlbe/c++11/config.rb: * ridlbe/c++11/writers/anytypecodesrc.rb: * ridlbe/c++11/writers/stubheader.rb: * tests/proxysource/proxysource.mpc: --- ridlbe/c++11/config.rb | 21 +- ridlbe/c++11/writers/anytypecodehdr.rb | 255 +++++++++++++++++++++++++ ridlbe/c++11/writers/anytypecodesrc.rb | 8 +- ridlbe/c++11/writers/stubheader.rb | 4 +- tests/proxysource/proxysource.mpc | 2 +- 5 files changed, 278 insertions(+), 12 deletions(-) create mode 100644 ridlbe/c++11/writers/anytypecodehdr.rb diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 5a6bee7b..7271609d 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -113,7 +113,9 @@ def self.add_extended_options(ol, _idl_params) 'd' => { option_name: :gen_direct_collocation, description: "-Gd\t\t\tGenerate the code for direct collocation (default is thru-POA collocation)" }, 'atc' => { option_name: :gen_anytypecode_source, - description: "-Gatc\t\t\tGenerate Any and TypeCode support implementation in separate *A.cpp file (not generated by default)" }, + description: "-Gatc\t\t\tGenerate Any and TypeCode support in separate *A.cpp file (not generated by default)" }, + 'ath' => { option_name: :gen_anytypecode_header, + description: "-Gatc\t\t\tGenerate Any and TypeCode support in separate *A.h file (not generated by default)" }, 'aia' => { option_name: :gen_anyinsert_adapter_policy, description: "-Gaia\t\t\tGenerate AnyInsert_Adapter version of the Any insert policy (not generated by default)" }, 'ce' => { option_name: :gen_corba_e, @@ -388,7 +390,10 @@ def self.setup_output(options) options[:output_client_proxy_source] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx] + options[:proxy_pfx] + options[:src_ext]) options[:output] << options[:hdr_ext] if options[:gen_typecodes] && options[:gen_anytypecode_source] - options[:output_atc] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:anytypecode_pfx] + options[:src_ext]) + options[:output_anytypecode_source] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:anytypecode_pfx] + options[:src_ext]) + end + if options[:gen_typecodes] && options[:gen_anytypecode_header] + options[:output_anytypecode_header] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:anytypecode_pfx] + options[:hdr_ext]) end end end @@ -478,9 +483,15 @@ def self.generate_client_stubs(options) end end if ((options[:gen_anytypecode_source] || false) && options[:gen_typecodes]) - if options[:output_atc] - co_atc = GenFile.new(options[:output_atc]) - IDL.push_production(:any_typecode, ::IDL::Cxx11::AnyTypeCodeWriter.new(co_atc, options)) + if options[:output_anytypecode_source] + co_atc = GenFile.new(options[:output_anytypecode_source]) + IDL.push_production(:any_typecode_source, ::IDL::Cxx11::AnyTypeCodeWriter.new(co_atc, options)) + end + end + if ((options[:gen_anytypecode_header] || false) && options[:gen_typecodes]) + if options[:output_anytypecode_header] + co_ath = GenFile.new(options[:output_anytypecode_header]) + IDL.push_production(:any_typecode_header, ::IDL::Cxx11::AnyTypeCodeHeaderWriter.new(co_ath, options)) end end end diff --git a/ridlbe/c++11/writers/anytypecodehdr.rb b/ridlbe/c++11/writers/anytypecodehdr.rb new file mode 100644 index 00000000..0fae0ce3 --- /dev/null +++ b/ridlbe/c++11/writers/anytypecodehdr.rb @@ -0,0 +1,255 @@ +#-------------------------------------------------------------------- +# @file anytypecodehdr.rb +# @author Johnny Willemsen +# +# @brief walker class for Any and TypeCode support +# +# @copyright Copyright (c) Remedy IT Expertise BV +#-------------------------------------------------------------------- +require 'ridlbe/c++11/writers/stubheader' + +module IDL + module Cxx11 + class AnyTypeCodeHeaderBaseWriter < CxxCodeWriterBase + def initialize(output = STDOUT, opts = {}) + super + self.template_root = File.join('cli', 'hdr') + end + + attr_accessor :include_guard + end + + class AnyTypeCodeHeaderWriter < AnyTypeCodeHeaderBaseWriter + helper Cxx11::IncludeGuardHelper + + def initialize(output = STDOUT, opts = {}) + super + @default_pre_includes = [ + 'tao/CDR.h', + 'tao/Invocation_Adapter.h', + 'tao/Object_T.h' + ] + if params[:gen_typecodes] + @default_pre_includes << 'tao/AnyTypeCode/TypeCode.h' + @default_pre_includes << 'tao/AnyTypeCode/TypeCode_Constants.h' + end + if params[:gen_any_ops] + @default_pre_includes << 'tao/AnyTypeCode/Any_Impl_T.h' + end + @default_post_includes = [ + 'tao/x11/tao_corba.h', + 'tao/x11/objproxy.h', + 'tao/x11/system_exception_x11.h', + 'tao/x11/exception_macros.h', + 'tao/x11/anytypecode/typecode_impl.h', + 'tao/x11/anytypecode/typecode.h' + ] + end + + def pre_visit(parser) + visit_includes(parser) + + visit_typecodes(parser) + + super + end + + def post_visit(parser) + visit_anyops(parser) + + super + visitor(PostVisitor).visit + end + + def visit_includes(parser) + # writer(AnyTypeCodeHeaderIncludeWriter, + # { default_pre_includes: @default_pre_includes, + # default_post_includes: @default_post_includes }).visit_nodes(parser) + end + + def visit_anyops(parser) + writer(StubHeaderAnyOpWriter).visit_nodes(parser) + end + + def visit_typecodes(parser) + writer(StubHeaderTypecodeWriter).visit_nodes(parser) + end + end # AnyTypeCodeWriter + + # class AnyTypeCodeHeaderIncludeWriter < AnyTypeCodeHeaderBaseWriter + # helper Cxx11::IncludeGuardHelper + # + # def initialize(output = STDOUT, opts = {}) + # super + # @default_pre_includes = params[:default_pre_includes] + # @default_post_includes = params[:default_post_includes] + # @includes = [] + # end + # + # attr_reader :includes + # + # def post_visit(_parser) + # properties[:pre_includes] = @default_pre_includes + # properties[:post_includes] = @default_post_includes + # properties[:includes] = @includes + # visitor(PreVisitor).visit + # end + # + # def enter_interface(node) + # add_pre_include('tao/AnyTypeCode/Objref_TypeCode_Static.h') if params[:gen_typecodes] + # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] + # return if node.is_local? || node.is_pseudo? || node.is_abstract? + # + # check_idl_type(node.idltype) + # end + # + # def enter_valuetype(node) + # add_pre_include('tao/AnyTypeCode/Value_TypeCode_Static.h') if params[:gen_typecodes] + # add_pre_include('tao/AnyTypeCode/TypeCode_Value_Field.h') if params[:gen_typecodes] + # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] + # return if node.is_abstract? || node.is_local? + # + # node.state_members.each { |m| check_idl_type(m.idltype) } + # end + # + # def visit_valuebox(node) + # add_pre_include('tao/AnyTypeCode/Alias_TypeCode_Static.h') if params[:gen_typecodes] + # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] + # return if node.is_local? + # + # check_idl_type(node.boxed_type) + # end + # + # def enter_struct(node) + # add_pre_include('tao/AnyTypeCode/Struct_TypeCode_Static.h') if params[:gen_typecodes] + # add_pre_include('tao/AnyTypeCode/TypeCode_Struct_Field.h') if params[:gen_typecodes] + # add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if params[:gen_any_ops] + # return if node.is_local? + # + # # arg template included in P.h + # node.members.each { |m| check_idl_type(m.idltype) } + # end + # + # def enter_union(node) + # add_pre_include('tao/AnyTypeCode/Union_TypeCode_Static.h') if params[:gen_typecodes] + # add_pre_include('tao/AnyTypeCode/TypeCode_Case_T.h') if params[:gen_typecodes] + # add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if params[:gen_any_ops] + # add_post_include('tao/x11/anytypecode/typecode_case_t.h') if params[:gen_any_ops] + # return if node.is_local? + # + # # arg template included in P.h + # node.members.each { |m| check_idl_type(m.idltype) } + # end + # + # def enter_exception(node) + # add_pre_include('tao/AnyTypeCode/Struct_TypeCode_Static.h') if params[:gen_typecodes] + # add_pre_include('tao/AnyTypeCode/TypeCode_Struct_Field.h') if params[:gen_typecodes] + # add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if params[:gen_any_ops] + # # arg template included in P.h + # node.members.each { |m| check_idl_type(m.idltype) } + # end + # + # def visit_enum(_node) + # add_pre_include('tao/AnyTypeCode/Enum_TypeCode_Static.h') if params[:gen_typecodes] + # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] + # end + # + # def visit_bitmask(_node) + # add_pre_include('tao/AnyTypeCode/Enum_TypeCode_Static.h') if params[:gen_typecodes] + # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] + # end + # + # def visit_bitset(_node) + # add_pre_include('tao/AnyTypeCode/Enum_TypeCode_Static.h') if params[:gen_typecodes] + # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] + # end + # + # def visit_typedef(node) + # return if node.idltype.resolved_type.is_a?(IDL::Type::Native) + # + # add_pre_include('tao/AnyTypeCode/Alias_TypeCode_Static.h') if params[:gen_typecodes] + # # just an alias or a sequence, array or fixed? + # unless node.idltype.is_a?(IDL::Type::ScopedName) + # add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if params[:gen_typecodes] + # idl_type = node.idltype.resolved_type + # case idl_type + # when IDL::Type::String, + # IDL::Type::WString + # add_pre_include('tao/AnyTypeCode/String_TypeCode_Static.h') if params[:gen_typecodes] + # when IDL::Type::Sequence, + # IDL::Type::Array + # add_pre_include('tao/AnyTypeCode/Sequence_TypeCode_Static.h') if params[:gen_typecodes] + # unless node.is_local? + # check_idl_type(idl_type) + # check_idl_type(idl_type.basetype) + # end + # when IDL::Type::Map + # add_pre_include('tao/AnyTypeCode/Sequence_TypeCode_Static.h') if params[:gen_typecodes] + # unless node.is_local? + # check_idl_type(idl_type) + # check_idl_type(idl_type.basetype) + # end + # end + # end + # end + # + # private + # + # def check_idl_type(idl_type) + # idl_type = idl_type.resolved_type + # case idl_type + # when IDL::Type::Char, + # IDL::Type::Boolean, + # IDL::Type::WChar, + # IDL::Type::Octet + # when IDL::Type::LongDouble + # when IDL::Type::Integer, + # IDL::Type::Double, + # IDL::Type::Float, + # IDL::Type::Void + # when IDL::Type::Enum, + # IDL::Type::BitMask, + # IDL::Type::BitSet + # when IDL::Type::String + # when IDL::Type::WString + # when IDL::Type::Object, + # IDL::Type::Interface + # when IDL::Type::Any + # when IDL::Type::Valuebox, + # IDL::Type::Valuetype + # # arg template included in P.h + # when IDL::Type::Struct, + # IDL::Type::Union + # # arg template included in P.h + # when IDL::Type::Sequence + # # arg template included in P.h + # check_idl_type(idl_type.basetype) + # when IDL::Type::Map + # # arg template included in P.h + # check_idl_type(idl_type.basetype) + # when IDL::Type::Array + # # arg template included in P.h + # check_idl_type(idl_type.basetype) + # end + # end + # + # def add_include(inc_file) + # @includes << inc_file unless @includes.include?(inc_file) || + # @default_pre_includes.include?(inc_file) || + # @default_post_includes.include?(inc_file) + # end + # + # def add_pre_include(inc_file) + # @default_pre_includes << inc_file unless @includes.include?(inc_file) || + # @default_pre_includes.include?(inc_file) || + # @default_post_includes.include?(inc_file) + # end + # + # def add_post_include(inc_file) + # @default_post_includes << inc_file unless @includes.include?(inc_file) || + # @default_pre_includes.include?(inc_file) || + # @default_post_includes.include?(inc_file) + # end + # end + end # Cxx11 +end # IDL diff --git a/ridlbe/c++11/writers/anytypecodesrc.rb b/ridlbe/c++11/writers/anytypecodesrc.rb index 6e6a2583..c7629ed3 100644 --- a/ridlbe/c++11/writers/anytypecodesrc.rb +++ b/ridlbe/c++11/writers/anytypecodesrc.rb @@ -10,14 +10,14 @@ module IDL module Cxx11 - class AnyTypeCodeBaseWriter < CxxCodeWriterBase + class AnyTypeCodeSourceBaseWriter < CxxCodeWriterBase def initialize(output = STDOUT, opts = {}) super self.template_root = File.join('cli', 'src', 'anytc') end end - class AnyTypeCodeWriter < AnyTypeCodeBaseWriter + class AnyTypeCodeWriter < AnyTypeCodeSourceBaseWriter def initialize(output = STDOUT, opts = {}) super @default_pre_includes = [ @@ -58,7 +58,7 @@ def post_visit(parser) end def visit_includes(parser) - writer(AnyTypeCodeIncludeWriter, + writer(AnyTypeCodeSourceIncludeWriter, { default_pre_includes: @default_pre_includes, default_post_includes: @default_post_includes }).visit_nodes(parser) end @@ -72,7 +72,7 @@ def visit_typecodes(parser) end end # AnyTypeCodeWriter - class AnyTypeCodeIncludeWriter < AnyTypeCodeBaseWriter + class AnyTypeCodeSourceIncludeWriter < AnyTypeCodeSourceBaseWriter def initialize(output = STDOUT, opts = {}) super @default_pre_includes = params[:default_pre_includes] diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index aaf822b9..ab33d77d 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -334,11 +334,11 @@ def visit_includes(parser) end def visit_anyops(parser) - writer(StubHeaderAnyOpWriter).visit_nodes(parser) + writer(StubHeaderAnyOpWriter).visit_nodes(parser) unless params[:gen_anytypecode_header] end def visit_typecodes(parser) - writer(StubHeaderTypecodeWriter).visit_nodes(parser) + writer(StubHeaderTypecodeWriter).visit_nodes(parser) unless params[:gen_anytypecode_header] end def visit_idl_traits(parser) diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 64c093ae..ad6638d4 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -4,7 +4,7 @@ project(*proxysource_gen_Idl): ridl_ostream_defaults { //idlflags += -Scorba //idlflags += -Scdr -SS -Scp -Sorb //idlflags -= -Gos - idlflags += -Gcps -Sorb -Gatc + idlflags += -Gcps -Sorb -Gatc -Gath idlflags -= -Sa -St IDL_Files { test.idl From 6b0eef846d961892f033f696bd3f9acf4a986e33 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 2 Apr 2024 11:53:29 +0200 Subject: [PATCH 10/94] More changes for core types * ridlbe/c++11/templates/cli/src/pre.erb: * ridlbe/c++11/visitorbase.rb: * ridlbe/c++11/writers/anytypecodehdr.rb: * ridlbe/c++11/writers/stubheader.rb: * tao/x11/stddef.h: --- ridlbe/c++11/templates/cli/src/pre.erb | 2 + ridlbe/c++11/visitorbase.rb | 4 + ridlbe/c++11/writers/anytypecodehdr.rb | 277 +++++++++---------------- ridlbe/c++11/writers/stubheader.rb | 16 +- tao/x11/stddef.h | 4 +- 5 files changed, 112 insertions(+), 191 deletions(-) diff --git a/ridlbe/c++11/templates/cli/src/pre.erb b/ridlbe/c++11/templates/cli/src/pre.erb index 50b056e2..0747a477 100644 --- a/ridlbe/c++11/templates/cli/src/pre.erb +++ b/ridlbe/c++11/templates/cli/src/pre.erb @@ -6,7 +6,9 @@ * https://www.remedy.nl */ +% unless client_proxy_src? #define __TAOX11_INCLUDE_STUB_PROXY__ +% end % pre_includes.each do |incfile| #include "<%= incfile %>" diff --git a/ridlbe/c++11/visitorbase.rb b/ridlbe/c++11/visitorbase.rb index a52d67f9..b626769b 100644 --- a/ridlbe/c++11/visitorbase.rb +++ b/ridlbe/c++11/visitorbase.rb @@ -45,6 +45,10 @@ def no_client_proxy_hdr? params[:no_client_proxy_hdr] && params[:ami_stub_output_prx].nil? end + def client_proxy_src? + params[:client_proxy_source] + end + def client_source File.basename(params[:output_src] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + '.cpp')) end diff --git a/ridlbe/c++11/writers/anytypecodehdr.rb b/ridlbe/c++11/writers/anytypecodehdr.rb index 0fae0ce3..6f023069 100644 --- a/ridlbe/c++11/writers/anytypecodehdr.rb +++ b/ridlbe/c++11/writers/anytypecodehdr.rb @@ -62,9 +62,9 @@ def post_visit(parser) end def visit_includes(parser) - # writer(AnyTypeCodeHeaderIncludeWriter, - # { default_pre_includes: @default_pre_includes, - # default_post_includes: @default_post_includes }).visit_nodes(parser) + writer(AnyTypeCodeHeaderIncludeWriter, + { default_pre_includes: @default_pre_includes, + default_post_includes: @default_post_includes }).visit_nodes(parser) end def visit_anyops(parser) @@ -74,182 +74,99 @@ def visit_anyops(parser) def visit_typecodes(parser) writer(StubHeaderTypecodeWriter).visit_nodes(parser) end - end # AnyTypeCodeWriter - - # class AnyTypeCodeHeaderIncludeWriter < AnyTypeCodeHeaderBaseWriter - # helper Cxx11::IncludeGuardHelper - # - # def initialize(output = STDOUT, opts = {}) - # super - # @default_pre_includes = params[:default_pre_includes] - # @default_post_includes = params[:default_post_includes] - # @includes = [] - # end - # - # attr_reader :includes - # - # def post_visit(_parser) - # properties[:pre_includes] = @default_pre_includes - # properties[:post_includes] = @default_post_includes - # properties[:includes] = @includes - # visitor(PreVisitor).visit - # end - # - # def enter_interface(node) - # add_pre_include('tao/AnyTypeCode/Objref_TypeCode_Static.h') if params[:gen_typecodes] - # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] - # return if node.is_local? || node.is_pseudo? || node.is_abstract? - # - # check_idl_type(node.idltype) - # end - # - # def enter_valuetype(node) - # add_pre_include('tao/AnyTypeCode/Value_TypeCode_Static.h') if params[:gen_typecodes] - # add_pre_include('tao/AnyTypeCode/TypeCode_Value_Field.h') if params[:gen_typecodes] - # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] - # return if node.is_abstract? || node.is_local? - # - # node.state_members.each { |m| check_idl_type(m.idltype) } - # end - # - # def visit_valuebox(node) - # add_pre_include('tao/AnyTypeCode/Alias_TypeCode_Static.h') if params[:gen_typecodes] - # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] - # return if node.is_local? - # - # check_idl_type(node.boxed_type) - # end - # - # def enter_struct(node) - # add_pre_include('tao/AnyTypeCode/Struct_TypeCode_Static.h') if params[:gen_typecodes] - # add_pre_include('tao/AnyTypeCode/TypeCode_Struct_Field.h') if params[:gen_typecodes] - # add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if params[:gen_any_ops] - # return if node.is_local? - # - # # arg template included in P.h - # node.members.each { |m| check_idl_type(m.idltype) } - # end - # - # def enter_union(node) - # add_pre_include('tao/AnyTypeCode/Union_TypeCode_Static.h') if params[:gen_typecodes] - # add_pre_include('tao/AnyTypeCode/TypeCode_Case_T.h') if params[:gen_typecodes] - # add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if params[:gen_any_ops] - # add_post_include('tao/x11/anytypecode/typecode_case_t.h') if params[:gen_any_ops] - # return if node.is_local? - # - # # arg template included in P.h - # node.members.each { |m| check_idl_type(m.idltype) } - # end - # - # def enter_exception(node) - # add_pre_include('tao/AnyTypeCode/Struct_TypeCode_Static.h') if params[:gen_typecodes] - # add_pre_include('tao/AnyTypeCode/TypeCode_Struct_Field.h') if params[:gen_typecodes] - # add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if params[:gen_any_ops] - # # arg template included in P.h - # node.members.each { |m| check_idl_type(m.idltype) } - # end - # - # def visit_enum(_node) - # add_pre_include('tao/AnyTypeCode/Enum_TypeCode_Static.h') if params[:gen_typecodes] - # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] - # end - # - # def visit_bitmask(_node) - # add_pre_include('tao/AnyTypeCode/Enum_TypeCode_Static.h') if params[:gen_typecodes] - # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] - # end - # - # def visit_bitset(_node) - # add_pre_include('tao/AnyTypeCode/Enum_TypeCode_Static.h') if params[:gen_typecodes] - # add_post_include('tao/x11/anytypecode/any_basic_impl_t.h') if params[:gen_any_ops] - # end - # - # def visit_typedef(node) - # return if node.idltype.resolved_type.is_a?(IDL::Type::Native) - # - # add_pre_include('tao/AnyTypeCode/Alias_TypeCode_Static.h') if params[:gen_typecodes] - # # just an alias or a sequence, array or fixed? - # unless node.idltype.is_a?(IDL::Type::ScopedName) - # add_post_include('tao/x11/anytypecode/any_dual_impl_t.h') if params[:gen_typecodes] - # idl_type = node.idltype.resolved_type - # case idl_type - # when IDL::Type::String, - # IDL::Type::WString - # add_pre_include('tao/AnyTypeCode/String_TypeCode_Static.h') if params[:gen_typecodes] - # when IDL::Type::Sequence, - # IDL::Type::Array - # add_pre_include('tao/AnyTypeCode/Sequence_TypeCode_Static.h') if params[:gen_typecodes] - # unless node.is_local? - # check_idl_type(idl_type) - # check_idl_type(idl_type.basetype) - # end - # when IDL::Type::Map - # add_pre_include('tao/AnyTypeCode/Sequence_TypeCode_Static.h') if params[:gen_typecodes] - # unless node.is_local? - # check_idl_type(idl_type) - # check_idl_type(idl_type.basetype) - # end - # end - # end - # end - # - # private - # - # def check_idl_type(idl_type) - # idl_type = idl_type.resolved_type - # case idl_type - # when IDL::Type::Char, - # IDL::Type::Boolean, - # IDL::Type::WChar, - # IDL::Type::Octet - # when IDL::Type::LongDouble - # when IDL::Type::Integer, - # IDL::Type::Double, - # IDL::Type::Float, - # IDL::Type::Void - # when IDL::Type::Enum, - # IDL::Type::BitMask, - # IDL::Type::BitSet - # when IDL::Type::String - # when IDL::Type::WString - # when IDL::Type::Object, - # IDL::Type::Interface - # when IDL::Type::Any - # when IDL::Type::Valuebox, - # IDL::Type::Valuetype - # # arg template included in P.h - # when IDL::Type::Struct, - # IDL::Type::Union - # # arg template included in P.h - # when IDL::Type::Sequence - # # arg template included in P.h - # check_idl_type(idl_type.basetype) - # when IDL::Type::Map - # # arg template included in P.h - # check_idl_type(idl_type.basetype) - # when IDL::Type::Array - # # arg template included in P.h - # check_idl_type(idl_type.basetype) - # end - # end - # - # def add_include(inc_file) - # @includes << inc_file unless @includes.include?(inc_file) || - # @default_pre_includes.include?(inc_file) || - # @default_post_includes.include?(inc_file) - # end - # - # def add_pre_include(inc_file) - # @default_pre_includes << inc_file unless @includes.include?(inc_file) || - # @default_pre_includes.include?(inc_file) || - # @default_post_includes.include?(inc_file) - # end - # - # def add_post_include(inc_file) - # @default_post_includes << inc_file unless @includes.include?(inc_file) || - # @default_pre_includes.include?(inc_file) || - # @default_post_includes.include?(inc_file) - # end - # end + end # AnyTypeCodeHeaderWriter + + class AnyTypeCodeHeaderIncludeWriter < AnyTypeCodeHeaderBaseWriter + helper Cxx11::VersionHelper + helper Cxx11::IncludeGuardHelper + + def initialize(output = STDOUT, opts = {}) + super + @includes = [] + @default_pre_includes = params[:default_pre_includes] + @default_post_includes = params[:default_post_includes] + @default_post_includes << 'tao/x11/anytypecode/any.h' + + if params[:gen_typecodes] + if params[:gen_anytypecode_source] + @default_post_includes << 'tao/x11/anytypecode/typecode_ref.h' + else + @default_post_includes << 'tao/x11/anytypecode/typecode.h' + end + end + @default_post_includes << 'tao/x11/anytypecode/typecode_constants.h' if params[:gen_typecodes] + end + + attr_reader :includes + + def post_visit(_parser) + properties[:includes] = @includes + properties[:pre_includes] = @default_pre_includes + properties[:post_includes] = @default_post_includes + visitor(PreVisitor).visit + end + + def declare_interface(node) + return if node.is_pseudo? + end + + def enter_interface(node) + end + + def visit_exception(_node) + end + + def visit_operation(node) + end + + def visit_attribute(node) + end + + def declare_valuetype(_node) + end + + def enter_valuetype(node) + end + + def visit_valuebox(node) + end + + def enter_struct(node) + end + + def enter_union(node) + end + + def enter_exception(node) + end + + def visit_typedef(node) + end + + private + + def check_idl_type(idl_type) + idl_type = idl_type.resolved_type + case idl_type + when IDL::Type::Any + add_include('tao/x11/anytypecode/any.h') unless params[:gen_any_ops] + when IDL::Type::Servant + add_include('tao/x11/portable_server/servant_forward.h') + when IDL::Type::AbstractBase + add_post_include('tao/x11/valuetype/abstract_base.h') + when IDL::Type::WString, + IDL::Type::WChar + add_post_include('tao/x11/wstringwchar_ostream.h') if params[:gen_ostream_operators] + end + end + + def add_include(inc_file) + @includes << inc_file unless @includes.include?(inc_file) + end + + def add_post_include(inc_file) + @default_post_includes << inc_file unless @default_post_includes.include?(inc_file) + end + end end # Cxx11 end # IDL diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index ab33d77d..1d1b848d 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -29,20 +29,11 @@ def initialize(output = STDOUT, opts = {}) @default_pre_includes = [ 'tao/x11/stddef.h', 'tao/x11/basic_traits.h', - 'tao/x11/corba.h' +# 'tao/x11/corba.h' ] @default_pre_includes << 'tao/x11/orb.h' unless params[:no_orb_include] @default_post_includes = [] - @default_post_includes << 'tao/x11/anytypecode/any.h' if params[:gen_any_ops] - if params[:gen_typecodes] - if params[:gen_anytypecode_source] - @default_post_includes << 'tao/x11/anytypecode/typecode_ref.h' - else - @default_post_includes << 'tao/x11/anytypecode/typecode.h' - end - end - @default_post_includes << 'tao/x11/anytypecode/typecode_constants.h' if params[:gen_typecodes] @include_guard = "__RIDL_#{File.basename(params[:output] || '').to_random_include_guard}_INCLUDED__" @@ -331,6 +322,11 @@ def visit_includes(parser) w.include_guard = @include_guard w.visit_nodes(parser) end + unless params[:gen_anytypecode_header] + writer(AnyTypeCodeHeaderIncludeWriter, + { default_pre_includes: @default_pre_includes, + default_post_includes: @default_post_includes }).visit_nodes(parser) + end end def visit_anyops(parser) diff --git a/tao/x11/stddef.h b/tao/x11/stddef.h index 6ece859b..9dc72b37 100644 --- a/tao/x11/stddef.h +++ b/tao/x11/stddef.h @@ -53,7 +53,9 @@ * as well as user code get build according to the * macros that get tested and defined inside this file. */ -#include "tao/orbconf.h" +#if __has_include("tao/orbconf.h") +# include "tao/orbconf.h" +#endif #include "tao/x11/taox11_export.h" #include "tao/x11/versioned_x11_namespace.h" From 358fcef1c07ebf5a8978d55c0730f62add60b9c1 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 2 Apr 2024 15:09:14 +0200 Subject: [PATCH 11/94] When corba in a separate file don't include corba.h * ridlbe/c++11/writers/stubheader.rb: * ridlbe/c++11/writers/stubproxysource.rb: --- ridlbe/c++11/writers/stubheader.rb | 4 ++-- ridlbe/c++11/writers/stubproxysource.rb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index 1d1b848d..de7bcdd7 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -28,10 +28,10 @@ def initialize(output = STDOUT, opts = {}) super @default_pre_includes = [ 'tao/x11/stddef.h', - 'tao/x11/basic_traits.h', -# 'tao/x11/corba.h' + 'tao/x11/basic_traits.h' ] + @default_pre_includes << 'tao/x11/corba.h' unless params[:client_proxy_source] @default_pre_includes << 'tao/x11/orb.h' unless params[:no_orb_include] @default_post_includes = [] diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 1cbb2486..7f51cd4e 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -22,6 +22,7 @@ def initialize(output = STDOUT, opts = {}) super @default_pre_includes = [] + @default_pre_includes << 'tao/x11/corba.h' @default_post_includes = [] @default_pre_includes << 'tao/CDR.h' unless params[:no_cdr_streaming] @default_post_includes << 'tao/x11/tao_corba.h' From 47c90c0763aa651453a9177a9da8828de0f5c0ad Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 3 Apr 2024 10:22:57 +0200 Subject: [PATCH 12/94] WiP * tao/x11/stddef.h: --- tao/x11/stddef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tao/x11/stddef.h b/tao/x11/stddef.h index 9dc72b37..794d69c6 100644 --- a/tao/x11/stddef.h +++ b/tao/x11/stddef.h @@ -12,7 +12,7 @@ #pragma once -#include "ace/config-macros.h" +//#include "ace/config-macros.h" #include #include From 943e5e34356c667865a7e13fe40b4e96c96c033b Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 13:01:54 +0200 Subject: [PATCH 13/94] Pull in header for anytypecode * ridlbe/c++11/templates/cli/hdr/post.erb: * ridlbe/c++11/visitorbase.rb: --- ridlbe/c++11/templates/cli/hdr/post.erb | 11 ++++++++--- ridlbe/c++11/visitorbase.rb | 8 ++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ridlbe/c++11/templates/cli/hdr/post.erb b/ridlbe/c++11/templates/cli/hdr/post.erb index 6576740b..d1403546 100644 --- a/ridlbe/c++11/templates/cli/hdr/post.erb +++ b/ridlbe/c++11/templates/cli/hdr/post.erb @@ -1,10 +1,15 @@ // generated from <%= ridl_template_path %> -% unless no_client_proxy_hdr? +%unless no_client_proxy_hdr? #if defined (__TAOX11_INCLUDE_STUB_PROXY__) -#include "<%= client_proxy_hdr %>" +# include "<%= client_proxy_hdr %>" #endif -% end +%end +%if anytypecode_hdr? +#if __has_include("<%= anytypecode_hdr %>") +# include "<%= anytypecode_hdr %>" +#endif +%end % if additional_post_includes? % additional_post_includes.each do |inc| diff --git a/ridlbe/c++11/visitorbase.rb b/ridlbe/c++11/visitorbase.rb index b626769b..04465075 100644 --- a/ridlbe/c++11/visitorbase.rb +++ b/ridlbe/c++11/visitorbase.rb @@ -33,6 +33,10 @@ def no_client_inline? params[:no_client_inline] end + def anytypecode_hdr + File.basename(params[:output_anytypecode_header] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:anytypecode_pfx] + '.h')) + end + def client_proxy_hdr File.basename(params[:output_client_proxy_header] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.h')) end @@ -49,6 +53,10 @@ def client_proxy_src? params[:client_proxy_source] end + def anytypecode_hdr? + params[:gen_anytypecode_header] + end + def client_source File.basename(params[:output_src] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + '.cpp')) end From 989e99ec9a77d6726abe83fb4733ea4150f712a1 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 13:06:07 +0200 Subject: [PATCH 14/94] Fixed include guard * ridlbe/c++11/writers/anytypecodehdr.rb: --- ridlbe/c++11/writers/anytypecodehdr.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ridlbe/c++11/writers/anytypecodehdr.rb b/ridlbe/c++11/writers/anytypecodehdr.rb index 6f023069..44cfa9c5 100644 --- a/ridlbe/c++11/writers/anytypecodehdr.rb +++ b/ridlbe/c++11/writers/anytypecodehdr.rb @@ -7,6 +7,8 @@ # @copyright Copyright (c) Remedy IT Expertise BV #-------------------------------------------------------------------- require 'ridlbe/c++11/writers/stubheader' +require 'ridlbe/c++11/writers/helpers/version_helper' +require 'ridlbe/c++11/writers/helpers/include_guard_helper' module IDL module Cxx11 @@ -44,6 +46,8 @@ def initialize(output = STDOUT, opts = {}) 'tao/x11/anytypecode/typecode_impl.h', 'tao/x11/anytypecode/typecode.h' ] + + @include_guard = "__RIDL_#{File.basename(params[:output] || '').to_random_include_guard}_INCLUDED__" end def pre_visit(parser) @@ -64,7 +68,10 @@ def post_visit(parser) def visit_includes(parser) writer(AnyTypeCodeHeaderIncludeWriter, { default_pre_includes: @default_pre_includes, - default_post_includes: @default_post_includes }).visit_nodes(parser) + default_post_includes: @default_post_includes }) do |w| + w.include_guard = @include_guard + w.visit_nodes(parser) + end end def visit_anyops(parser) From 1c75373dacec26ab59f2f0ad5a9a87bb1a80445e Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 13:16:19 +0200 Subject: [PATCH 15/94] Correct include guard * ridlbe/c++11/writers/anytypecodehdr.rb: --- ridlbe/c++11/writers/anytypecodehdr.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ridlbe/c++11/writers/anytypecodehdr.rb b/ridlbe/c++11/writers/anytypecodehdr.rb index 44cfa9c5..48b9681b 100644 --- a/ridlbe/c++11/writers/anytypecodehdr.rb +++ b/ridlbe/c++11/writers/anytypecodehdr.rb @@ -47,7 +47,7 @@ def initialize(output = STDOUT, opts = {}) 'tao/x11/anytypecode/typecode.h' ] - @include_guard = "__RIDL_#{File.basename(params[:output] || '').to_random_include_guard}_INCLUDED__" + @include_guard = "__RIDL_#{File.basename(params[:output_anytypecode_header] || '').to_random_include_guard}_INCLUDED__" end def pre_visit(parser) From 616d91ac957f8afe48fece66f4d24a6f1fd0a5f7 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 13:27:59 +0200 Subject: [PATCH 16/94] Temporary define to get test to work * ridlbe/c++11/templates/cli/hdr/post.erb: * tests/proxysource/proxysource.mpc: --- ridlbe/c++11/templates/cli/hdr/post.erb | 2 +- tests/proxysource/proxysource.mpc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ridlbe/c++11/templates/cli/hdr/post.erb b/ridlbe/c++11/templates/cli/hdr/post.erb index d1403546..6eedad84 100644 --- a/ridlbe/c++11/templates/cli/hdr/post.erb +++ b/ridlbe/c++11/templates/cli/hdr/post.erb @@ -6,7 +6,7 @@ #endif %end %if anytypecode_hdr? -#if __has_include("<%= anytypecode_hdr %>") +#if !defined (TAOX11_DISABLE_INCLUDE_ANYTYPECODE) && __has_include("<%= anytypecode_hdr %>") # include "<%= anytypecode_hdr %>" #endif %end diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index ad6638d4..3c67dbdf 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -21,5 +21,6 @@ project(*proxysource_gen_Client) { testC.cpp } includes += $(TAOX11_ROOT) + macros += TAOX11_DISABLE_INCLUDE_ANYTYPECODE } From 0a8b1ce10dfd6ee0ac469d616af47fdac2349cf0 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 13:30:35 +0200 Subject: [PATCH 17/94] Add taox11 client * tests/proxysource/taox11client.cpp: Added. * tests/proxysource/proxysource.mpc: --- tests/proxysource/proxysource.mpc | 12 ++++++++++++ tests/proxysource/taox11client.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 tests/proxysource/taox11client.cpp diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 3c67dbdf..03738af4 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -24,3 +24,15 @@ project(*proxysource_gen_Client) { macros += TAOX11_DISABLE_INCLUDE_ANYTYPECODE } +project(*proxysource_taox11_Client): taox11_client { + after += *proxysource_gen_Idl + Source_Files { + taox11client.cpp + } + Source_Files { + testC.cpp + } + includes += $(TAOX11_ROOT) +} + + diff --git a/tests/proxysource/taox11client.cpp b/tests/proxysource/taox11client.cpp new file mode 100644 index 00000000..0939fbe2 --- /dev/null +++ b/tests/proxysource/taox11client.cpp @@ -0,0 +1,29 @@ +/** + * @file client.cpp + * @author Johnny Willemsen + * + * @brief C++11 client application which uses IDL defines types + * and TAOX11 + * + * @copyright Copyright (c) Remedy IT Expertise BV + */ + +#include "testC.h" + +// Check for ACE define + +int +main(int, char* []) +{ + int result {}; + + try + { + } + catch (const std::exception& e) + { + std::cout << "exception caught: " << e.what() << std::endl; + return 1; + } + return result; +} From d7a9f552c6cf7832392d0fa70efca42f6aecee62 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 13:36:43 +0200 Subject: [PATCH 18/94] Include changes * ridlbe/c++11/writers/anytypecodehdr.rb: --- ridlbe/c++11/writers/anytypecodehdr.rb | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/ridlbe/c++11/writers/anytypecodehdr.rb b/ridlbe/c++11/writers/anytypecodehdr.rb index 48b9681b..52de55c8 100644 --- a/ridlbe/c++11/writers/anytypecodehdr.rb +++ b/ridlbe/c++11/writers/anytypecodehdr.rb @@ -26,26 +26,18 @@ class AnyTypeCodeHeaderWriter < AnyTypeCodeHeaderBaseWriter def initialize(output = STDOUT, opts = {}) super - @default_pre_includes = [ - 'tao/CDR.h', - 'tao/Invocation_Adapter.h', - 'tao/Object_T.h' - ] - if params[:gen_typecodes] - @default_pre_includes << 'tao/AnyTypeCode/TypeCode.h' - @default_pre_includes << 'tao/AnyTypeCode/TypeCode_Constants.h' - end - if params[:gen_any_ops] - @default_pre_includes << 'tao/AnyTypeCode/Any_Impl_T.h' - end + @default_pre_includes = [] @default_post_includes = [ - 'tao/x11/tao_corba.h', - 'tao/x11/objproxy.h', 'tao/x11/system_exception_x11.h', - 'tao/x11/exception_macros.h', - 'tao/x11/anytypecode/typecode_impl.h', - 'tao/x11/anytypecode/typecode.h' + 'tao/x11/exception_macros.h' ] + if params[:gen_any_ops] + @default_post_includes << 'tao/x11/anytypecode/any.h' + end + if params[:gen_typecodes] + @default_post_includes << 'tao/x11/anytypecode/typecode.h' + @default_post_includes << 'tao/x11/anytypecode/typecode_constants.h' + end @include_guard = "__RIDL_#{File.basename(params[:output_anytypecode_header] || '').to_random_include_guard}_INCLUDED__" end From e64d028502e735f98240ce0cf2312b12da5fcedf Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 13:43:26 +0200 Subject: [PATCH 19/94] Include order, fixed base * ridlbe/c++11/writers/stubproxysource.rb: * tests/proxysource/proxysource.mpc: --- ridlbe/c++11/writers/stubproxysource.rb | 4 ++-- tests/proxysource/proxysource.mpc | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 7f51cd4e..356bb5dc 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -22,10 +22,10 @@ def initialize(output = STDOUT, opts = {}) super @default_pre_includes = [] + @default_pre_includes << 'tao/x11/tao_corba.h' @default_pre_includes << 'tao/x11/corba.h' @default_post_includes = [] @default_pre_includes << 'tao/CDR.h' unless params[:no_cdr_streaming] - @default_post_includes << 'tao/x11/tao_corba.h' end # Object traits are only required for interfaces and valuetypes @@ -63,7 +63,7 @@ def enter_valuetype(node) def pre_visit(parser) properties[:pre_includes] = @default_pre_includes - properties[:post_includes] = [] + properties[:post_includes] = @default_post_includes properties[:includes] = [] visitor(PreVisitor).visit super diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 03738af4..20e74345 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -24,13 +24,15 @@ project(*proxysource_gen_Client) { macros += TAOX11_DISABLE_INCLUDE_ANYTYPECODE } -project(*proxysource_taox11_Client): taox11_client { +project(*proxysource_taox11_Client): taox11_client, taox11_anytypecode { after += *proxysource_gen_Idl Source_Files { taox11client.cpp } Source_Files { testC.cpp + testA.cpp + testCP.cpp } includes += $(TAOX11_ROOT) } From cadcfcc29bcf393963a6c9dd911d9a7aded9dddc Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 14:01:38 +0200 Subject: [PATCH 20/94] Add union * tests/proxysource/test.idl: --- tests/proxysource/test.idl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/proxysource/test.idl b/tests/proxysource/test.idl index 7273b032..cc9a405e 100644 --- a/tests/proxysource/test.idl +++ b/tests/proxysource/test.idl @@ -19,4 +19,16 @@ module Test { short my1; }; + + enum Color { + COLOR_RED, + COLOR_BLUE + }; + union TestUnion_U3 switch(Color) + { + case COLOR_BLUE: + short myshort; + case COLOR_RED: + long mylong; + }; }; From 0b2dc27c35d03ab892e782088f2a5e38bf287a5c Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 14:24:38 +0200 Subject: [PATCH 21/94] Add union support * ridlbe/c++11/templates/cli/inl/union_inl.erb: * ridlbe/c++11/visitors/union.rb: * ridlbe/c++11/writers/stubheader.rb: --- ridlbe/c++11/templates/cli/inl/union_inl.erb | 30 ++++++++++---------- ridlbe/c++11/visitors/union.rb | 8 ++++++ ridlbe/c++11/writers/stubheader.rb | 7 ++++- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ridlbe/c++11/templates/cli/inl/union_inl.erb b/ridlbe/c++11/templates/cli/inl/union_inl.erb index 35927d44..5907902c 100644 --- a/ridlbe/c++11/templates/cli/inl/union_inl.erb +++ b/ridlbe/c++11/templates/cli/inl/union_inl.erb @@ -108,7 +108,7 @@ inline void <%= scoped_cxxname %>::_d (<%= switch_in_cxxtype %> discval) % # single member % _ndefmem = non_default_members % if all_labels_single? || (switchtype_boolean? && (!_ndefmem.empty? && _ndefmem.first.labels.size==1)) - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; % # with any other boolean switch (single member for all labels) all label changes are valid % elsif switchtype_boolean? this->disc_ = discval; @@ -128,7 +128,7 @@ inline void <%= scoped_cxxname %>::_d (<%= switch_in_cxxtype %> discval) % end break; default: - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; } } break; @@ -144,7 +144,7 @@ inline void <%= scoped_cxxname %>::_d (<%= switch_in_cxxtype %> discval) case <%= _lbl %>: % end unless _m.is_default? % end - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; default: break; } @@ -172,7 +172,7 @@ inline void <%= scoped_cxxname %>::<%= _m.cxxname %> (<%= _m.cxx_in_type %> _x11 % _lbl = _m.labels.first if (<%= _lbl == 'true' ? '!' : '' %>_x11_disc) { - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; } % end % else @@ -184,7 +184,7 @@ inline void <%= scoped_cxxname %>::<%= _m.cxxname %> (<%= _m.cxx_in_type %> _x11 case <%= _lbl %>: % end unless _m2.is_default? % end - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; default: break; % else @@ -193,7 +193,7 @@ inline void <%= scoped_cxxname %>::<%= _m.cxxname %> (<%= _m.cxx_in_type %> _x11 % end break; default: - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; % end } % end @@ -234,7 +234,7 @@ inline void <%= scoped_cxxname %>::<%= _m.cxxname %> (<%= _m.cxx_move_type %> _x % _lbl = _m.labels.first if (<%= _lbl == 'true' ? '!' : '' %>_x11_disc) { - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; } % end % else @@ -246,7 +246,7 @@ inline void <%= scoped_cxxname %>::<%= _m.cxxname %> (<%= _m.cxx_move_type %> _x case <%= _lbl %>: % end unless _m2.is_default? % end - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; default: break; % else @@ -255,7 +255,7 @@ inline void <%= scoped_cxxname %>::<%= _m.cxxname %> (<%= _m.cxx_move_type %> _x % end break; default: - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; % end } % end @@ -293,7 +293,7 @@ inline <%= _m.scoped_cxx_in_type %> <%= scoped_cxxname %>::<%= _m.cxxname %> () % _lbl = _m.labels.first if (<%= _lbl == 'true' ? '!' : '' %>this->disc_) { - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; } % end % else @@ -305,7 +305,7 @@ inline <%= _m.scoped_cxx_in_type %> <%= scoped_cxxname %>::<%= _m.cxxname %> () case <%= _lbl %>: % end unless _m2.is_default? % end - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; default: break; % else @@ -314,7 +314,7 @@ inline <%= _m.scoped_cxx_in_type %> <%= scoped_cxxname %>::<%= _m.cxxname %> () % end break; default: - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; % end } % end @@ -328,7 +328,7 @@ inline <%= _m.scoped_cxx_out_type %> <%= scoped_cxxname %>::<%= _m.cxxname %> () % _lbl = _m.labels.first if (<%= _lbl == 'true' ? '!' : '' %>this->disc_) { - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; } % end % else @@ -340,7 +340,7 @@ inline <%= _m.scoped_cxx_out_type %> <%= scoped_cxxname %>::<%= _m.cxxname %> () case <%= _lbl %>: % end unless _m2.is_default? % end - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; default: break; % else @@ -349,7 +349,7 @@ inline <%= _m.scoped_cxx_out_type %> <%= scoped_cxxname %>::<%= _m.cxxname %> () % end break; default: - throw TAOX11_NAMESPACE::CORBA::BAD_PARAM (); + throw <%= invalid_argument_exception %>; % end } % end diff --git a/ridlbe/c++11/visitors/union.rb b/ridlbe/c++11/visitors/union.rb index 2c77b0f4..48ca59c3 100644 --- a/ridlbe/c++11/visitors/union.rb +++ b/ridlbe/c++11/visitors/union.rb @@ -122,6 +122,14 @@ def switchtype node.switchtype end + def invalid_argument_exception + if params[:client_proxy_source] + 'std::invalid_argument ("")' + else + 'TAOX11_NAMESPACE::CORBA::BAD_PARAM ()' + end + end + # template mapping map_template :typecode, :typecode diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index de7bcdd7..af21b3b1 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -432,7 +432,8 @@ def enter_struct(node) end def enter_union(node) - add_include('tao/x11/system_exception.h') + add_include('tao/x11/system_exception.h') unless params[:client_proxy_source] + add_pre_include('stdexcept') if params[:client_proxy_source] node.members.each { |m| check_idl_type(m.idltype) } end @@ -499,6 +500,10 @@ def add_include(inc_file) def add_post_include(inc_file) @default_post_includes << inc_file unless @default_post_includes.include?(inc_file) end + + def add_pre_include(inc_file) + @default_pre_includes << inc_file unless @default_pre_includes.include?(inc_file) + end end class StubHeaderIDLTraitsWriter < StubHeaderBaseWriter From 3043780e7388a602e3d46a311c7e6b22bc01085f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 14:38:57 +0200 Subject: [PATCH 22/94] Update * tests/proxysource/proxysource.mpc: --- tests/proxysource/proxysource.mpc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 20e74345..1c413475 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -1,9 +1,6 @@ // -*- MPC -*- project(*proxysource_gen_Idl): ridl_ostream_defaults { - //idlflags += -Scorba - //idlflags += -Scdr -SS -Scp -Sorb - //idlflags -= -Gos idlflags += -Gcps -Sorb -Gatc -Gath idlflags -= -Sa -St IDL_Files { @@ -25,6 +22,7 @@ project(*proxysource_gen_Client) { } project(*proxysource_taox11_Client): taox11_client, taox11_anytypecode { + exename = taox11client after += *proxysource_gen_Idl Source_Files { taox11client.cpp @@ -34,7 +32,6 @@ project(*proxysource_taox11_Client): taox11_client, taox11_anytypecode { testA.cpp testCP.cpp } - includes += $(TAOX11_ROOT) } From 109e345469fd1a7586d3f5a6276a7833b161bd7d Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 14:39:59 +0200 Subject: [PATCH 23/94] Add exe * tests/proxysource/run_test.pl: --- tests/proxysource/run_test.pl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/proxysource/run_test.pl b/tests/proxysource/run_test.pl index 82d03efe..67b34c9d 100644 --- a/tests/proxysource/run_test.pl +++ b/tests/proxysource/run_test.pl @@ -22,7 +22,18 @@ $server = $SV->SpawnWaitKill ($target->ProcessStartWaitInterval()); if ($server != 0) { - print STDERR "ERROR: const returned $server\n"; + print STDERR "ERROR: client returned $server\n"; + $status = 1; +} + +$target->GetStderrLog(); + +$SV = $target->CreateProcess ("taox11client"); + +$server = $SV->SpawnWaitKill ($target->ProcessStartWaitInterval()); + +if ($server != 0) { + print STDERR "ERROR: taox11 returned $server\n"; $status = 1; } From e6b683f89ecb2d70733cacce12c0c850c97a4276 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 14:40:26 +0200 Subject: [PATCH 24/94] Add file * bin/taox11_tests.lst: --- bin/taox11_tests.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/taox11_tests.lst b/bin/taox11_tests.lst index eef0bb8f..fe8f4e74 100644 --- a/bin/taox11_tests.lst +++ b/bin/taox11_tests.lst @@ -161,6 +161,7 @@ tests/policies/manipulation/run_test.pl: !CORBA_E_MICRO tests/policies/oneway_timeouts/run_test.pl: !CORBA_E_MICRO tests/policies/mt_timeout/run_test.pl: !CORBA_E_MICRO tests/policies/reliable_oneways/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO +tests/proxysource: tests/pt_throughput/run_test.pl: tests/reactor/run_test.pl: tests/sequence/run_test.pl: From e97afb52450e1419941f41e5dfe47463c9f52bc3 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 15:29:43 +0200 Subject: [PATCH 25/94] Fixed errors * ridlbe/c++11/writers/stubproxysource.rb: --- ridlbe/c++11/writers/stubproxysource.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 356bb5dc..629670d9 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -74,9 +74,6 @@ def post_visit(parser) #visit_proxy(parser) if @object_traits_specializations - # Object traits specializations - visit_object_traits_specializations(parser) - # Object ref traits specializations visit_proxy_object_ref_traits_specializations(parser) unless params[:no_client_proxy_hdr] end @@ -97,6 +94,10 @@ def visit_includes(parser) { default_pre_includes: @default_pre_includes, default_post_includes: @default_post_includes }).visit_nodes(parser) end + + def visit_proxy_object_ref_traits_specializations(parser) + writer(StubSourceProxyObjRefTraitsWriter).visit_nodes(parser) + end end # StubProxySourceWriter class StubProxySourceIncludeWriter < StubSourceBaseWriter From 2b49a307ad9bda41c68172a5c72e537c9a3a3034 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 15:51:01 +0200 Subject: [PATCH 26/94] Work in progress for normal case * ridlbe/c++11/writers/anytypecodehdr.rb: * ridlbe/c++11/writers/stubheader.rb: --- ridlbe/c++11/writers/anytypecodehdr.rb | 12 ++++++++---- ridlbe/c++11/writers/stubheader.rb | 14 +++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ridlbe/c++11/writers/anytypecodehdr.rb b/ridlbe/c++11/writers/anytypecodehdr.rb index 52de55c8..fa9daece 100644 --- a/ridlbe/c++11/writers/anytypecodehdr.rb +++ b/ridlbe/c++11/writers/anytypecodehdr.rb @@ -61,7 +61,6 @@ def visit_includes(parser) writer(AnyTypeCodeHeaderIncludeWriter, { default_pre_includes: @default_pre_includes, default_post_includes: @default_post_includes }) do |w| - w.include_guard = @include_guard w.visit_nodes(parser) end end @@ -76,8 +75,6 @@ def visit_typecodes(parser) end # AnyTypeCodeHeaderWriter class AnyTypeCodeHeaderIncludeWriter < AnyTypeCodeHeaderBaseWriter - helper Cxx11::VersionHelper - helper Cxx11::IncludeGuardHelper def initialize(output = STDOUT, opts = {}) super @@ -102,7 +99,14 @@ def post_visit(_parser) properties[:includes] = @includes properties[:pre_includes] = @default_pre_includes properties[:post_includes] = @default_post_includes - visitor(PreVisitor).visit + end + + def default_pre_includes + @default_pre_includes + end + + def default_post_includes + @default_post_includes end def declare_interface(node) diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index af21b3b1..beabe5fa 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -316,17 +316,21 @@ def visit_typedef(node) end def visit_includes(parser) + unless params[:gen_anytypecode_header] + writer(AnyTypeCodeHeaderIncludeWriter, + { default_pre_includes: @default_pre_includes, + default_post_includes: @default_post_includes }) do |w| + w.visit_nodes(parser) + @default_pre_includes = w.default_pre_includes + @default_post_includes = w.default_post_includes + end + end writer(StubHeaderIncludeWriter, { default_pre_includes: @default_pre_includes, default_post_includes: @default_post_includes }) do |w| w.include_guard = @include_guard w.visit_nodes(parser) end - unless params[:gen_anytypecode_header] - writer(AnyTypeCodeHeaderIncludeWriter, - { default_pre_includes: @default_pre_includes, - default_post_includes: @default_post_includes }).visit_nodes(parser) - end end def visit_anyops(parser) From c547e7e6bde9d19dd460f579e05041150e42d349 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 16:05:47 +0200 Subject: [PATCH 27/94] WiP * ridlbe/c++11/writers/stubproxysource.rb: * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/writers/stubproxysource.rb | 1 - ridlbe/c++11/writers/stubsource.rb | 60 ++++++++++++------------- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 629670d9..2f40438b 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -122,7 +122,6 @@ def post_visit(_parser) properties[:pre_includes] = @default_pre_includes properties[:post_includes] = @default_post_includes properties[:includes] = @includes - visitor(PreVisitor).visit end def enter_interface(node) diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 430d7055..977261c6 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -175,7 +175,7 @@ def visit_proxy_object_ref_traits_specializations(parser) end def visit_cdr(parser) - writer(StubSourceCDRWriter).visit_nodes(parser) unless params[:no_cdr_streaming] || params[:client_proxy_source] + #writer(StubSourceCDRWriter).visit_nodes(parser) unless params[:no_cdr_streaming] || params[:client_proxy_source] end def visit_typecodes(parser) @@ -418,35 +418,35 @@ def add_post_include(inc_file) end end - class StubProxySourceWriter < StubSourceBaseWriter - def initialize(output = STDOUT, opts = {}) - super - end - - def enter_module(node) - super - println - printiln('// generated from StubProxySourceWriter#enter_module') - printiln('namespace ' + node.cxxname) - printiln('{') - inc_nest - end - - def leave_module(node) - dec_nest - printiln("} // namespace #{node.cxxname}") - println - super - end - - def enter_interface(node) - super - return if node.is_local? || node.is_pseudo? || node.is_abstract? - - visitor(InterfaceVisitor).visit_proxy(node) - println - end - end # StubProxySourceWriter + # class StubProxySourceWriter1 < StubSourceBaseWriter + # def initialize(output = STDOUT, opts = {}) + # super + # end + # + # def enter_module(node) + # super + # println + # printiln('// generated from StubProxySourceWriter1#enter_module') + # printiln('namespace ' + node.cxxname) + # printiln('{') + # inc_nest + # end + # + # def leave_module(node) + # dec_nest + # printiln("} // namespace #{node.cxxname}") + # println + # super + # end + # + # def enter_interface(node) + # super + # return if node.is_local? || node.is_pseudo? || node.is_abstract? + # + # visitor(InterfaceVisitor).visit_proxy(node) + # println + # end + # end # StubProxySourceWriter class StubSourceObjTraitsWriter < StubSourceBaseWriter def initialize(output = STDOUT, opts = {}) From 5123fb7e2d7383e63e3a4a03339d14cd69fa1a88 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 4 Apr 2024 16:20:13 +0200 Subject: [PATCH 28/94] Need some more work * ridlbe/c++11/writers/anytypecodehdr.rb: --- ridlbe/c++11/writers/anytypecodehdr.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ridlbe/c++11/writers/anytypecodehdr.rb b/ridlbe/c++11/writers/anytypecodehdr.rb index fa9daece..5d42a1da 100644 --- a/ridlbe/c++11/writers/anytypecodehdr.rb +++ b/ridlbe/c++11/writers/anytypecodehdr.rb @@ -61,6 +61,7 @@ def visit_includes(parser) writer(AnyTypeCodeHeaderIncludeWriter, { default_pre_includes: @default_pre_includes, default_post_includes: @default_post_includes }) do |w| + w.include_guard = @include_guard w.visit_nodes(parser) end end @@ -75,6 +76,8 @@ def visit_typecodes(parser) end # AnyTypeCodeHeaderWriter class AnyTypeCodeHeaderIncludeWriter < AnyTypeCodeHeaderBaseWriter + helper Cxx11::VersionHelper + helper Cxx11::IncludeGuardHelper def initialize(output = STDOUT, opts = {}) super @@ -99,6 +102,7 @@ def post_visit(_parser) properties[:includes] = @includes properties[:pre_includes] = @default_pre_includes properties[:post_includes] = @default_post_includes + visitor(PreVisitor).visit end def default_pre_includes From f683630cf54c2526b6687e0bf51f067cf5c97d7b Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 09:36:22 +0200 Subject: [PATCH 29/94] Generation fixes * ridlbe/c++11/writers/stubheader.rb: * ridlbe/c++11/writers/stubproxysource.rb: * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/writers/stubheader.rb | 30 ++++++++++----- ridlbe/c++11/writers/stubproxysource.rb | 19 +++++++++ ridlbe/c++11/writers/stubsource.rb | 51 +------------------------ 3 files changed, 41 insertions(+), 59 deletions(-) diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index beabe5fa..25868849 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -35,6 +35,18 @@ def initialize(output = STDOUT, opts = {}) @default_pre_includes << 'tao/x11/orb.h' unless params[:no_orb_include] @default_post_includes = [] + unless params[:output_anytypecode_header] + @default_post_includes << 'tao/x11/anytypecode/any.h' if params[:gen_any_ops] + if params[:gen_typecodes] + if params[:gen_anytypecode_source] + @default_post_includes << 'tao/x11/anytypecode/typecode_ref.h' + else + @default_post_includes << 'tao/x11/anytypecode/typecode.h' + end + end + @default_post_includes << 'tao/x11/anytypecode/typecode_constants.h' if params[:gen_typecodes] + end + @include_guard = "__RIDL_#{File.basename(params[:output] || '').to_random_include_guard}_INCLUDED__" @fwd_decl_cache = {} @@ -316,15 +328,15 @@ def visit_typedef(node) end def visit_includes(parser) - unless params[:gen_anytypecode_header] - writer(AnyTypeCodeHeaderIncludeWriter, - { default_pre_includes: @default_pre_includes, - default_post_includes: @default_post_includes }) do |w| - w.visit_nodes(parser) - @default_pre_includes = w.default_pre_includes - @default_post_includes = w.default_post_includes - end - end + # unless params[:gen_anytypecode_header] + # writer(AnyTypeCodeHeaderIncludeWriter, + # { default_pre_includes: @default_pre_includes, + # default_post_includes: @default_post_includes }) do |w| + # w.visit_nodes(parser) + # @default_pre_includes = w.default_pre_includes + # @default_post_includes = w.default_post_includes + # end + # end writer(StubHeaderIncludeWriter, { default_pre_includes: @default_pre_includes, default_post_includes: @default_post_includes }) do |w| diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 2f40438b..7f578160 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -100,6 +100,25 @@ def visit_proxy_object_ref_traits_specializations(parser) end end # StubProxySourceWriter + class StubSourceProxyObjRefTraitsWriter < StubSourceBaseWriter + def initialize(output = STDOUT, opts = {}) + super + end + + def pre_visit(_parser) + println + printiln('// generated from StubSourceProxyObjRefTraitsWriter#pre_visit') + end + + def post_visit(parser); end + + def enter_interface(node) + return if node.is_local? || node.is_pseudo? || node.is_abstract? + + visitor(InterfaceVisitor).visit_object_ref_traits(node) + end + end + class StubProxySourceIncludeWriter < StubSourceBaseWriter def initialize(output = STDOUT, opts = {}) super diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 977261c6..b2a7e582 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -171,7 +171,7 @@ def visit_object_traits_specializations(parser) end def visit_proxy_object_ref_traits_specializations(parser) - writer(StubSourceProxyObjRefTraitsWriter).visit_nodes(parser) + #writer(StubSourceProxyObjRefTraitsWriter).visit_nodes(parser) end def visit_cdr(parser) @@ -418,36 +418,6 @@ def add_post_include(inc_file) end end - # class StubProxySourceWriter1 < StubSourceBaseWriter - # def initialize(output = STDOUT, opts = {}) - # super - # end - # - # def enter_module(node) - # super - # println - # printiln('// generated from StubProxySourceWriter1#enter_module') - # printiln('namespace ' + node.cxxname) - # printiln('{') - # inc_nest - # end - # - # def leave_module(node) - # dec_nest - # printiln("} // namespace #{node.cxxname}") - # println - # super - # end - # - # def enter_interface(node) - # super - # return if node.is_local? || node.is_pseudo? || node.is_abstract? - # - # visitor(InterfaceVisitor).visit_proxy(node) - # println - # end - # end # StubProxySourceWriter - class StubSourceObjTraitsWriter < StubSourceBaseWriter def initialize(output = STDOUT, opts = {}) super @@ -481,25 +451,6 @@ def enter_valuetype(node) end end - class StubSourceProxyObjRefTraitsWriter < StubSourceBaseWriter - def initialize(output = STDOUT, opts = {}) - super - end - - def pre_visit(_parser) - println - printiln('// generated from StubSourceProxyObjRefTraitsWriter#pre_visit') - end - - def post_visit(parser); end - - def enter_interface(node) - return if node.is_local? || node.is_pseudo? || node.is_abstract? - - visitor(InterfaceVisitor).visit_object_ref_traits(node) - end - end - class StubSourceCDRWriter < StubSourceBaseWriter def initialize(output = STDOUT, opts = {}) super From d9f352d40afb67ab673d45c47992bfdabe8d77a1 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 10:40:00 +0200 Subject: [PATCH 30/94] Add todo * ridlbe/c++11/visitors/union.rb: --- ridlbe/c++11/visitors/union.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/ridlbe/c++11/visitors/union.rb b/ridlbe/c++11/visitors/union.rb index 48ca59c3..da502417 100644 --- a/ridlbe/c++11/visitors/union.rb +++ b/ridlbe/c++11/visitors/union.rb @@ -123,6 +123,7 @@ def switchtype end def invalid_argument_exception + # todo, add ridlc argument, also make a distinction which include to add if params[:client_proxy_source] 'std::invalid_argument ("")' else From 911d749a4d31ac43615c78c8ecbafe2c8c1f6efd Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 10:55:51 +0200 Subject: [PATCH 31/94] Fixed cdr generation for some tests * ridlbe/c++11/writers/stubproxysource.rb: * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/writers/stubproxysource.rb | 2 +- ridlbe/c++11/writers/stubsource.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 7f578160..9591b63b 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -79,7 +79,7 @@ def post_visit(parser) end # CDR operators - visit_cdr(parser) unless params[:no_cdr_streaming] + visit_cdr(parser) super visitor(PostVisitor).visit diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index b2a7e582..4d36f528 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -52,7 +52,7 @@ def pre_visit(parser) def post_visit(parser) # stub proxy implementations - visit_proxy(parser) unless params[:no_client_proxy_hdr] + visit_proxy(parser) visit_anyops(parser) if params[:gen_any_ops] && !params[:gen_anytypecode_source] @@ -159,7 +159,7 @@ def visit_includes(parser) end def visit_proxy(parser) - writer(StubProxySourceWriter).visit_nodes(parser) unless params[:no_client_proxy_hdr] || params[:client_proxy_source] + writer(StubProxySourceWriter).visit_nodes(parser) unless params[:client_proxy_source] end def visit_anyops(parser) From 22a6807fdac2e05c845b6b1568dc5c693f4ced48 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 11:05:14 +0200 Subject: [PATCH 32/94] Move cdr generation to proxysource * ridlbe/c++11/writers/stubproxysource.rb: * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/writers/stubproxysource.rb | 90 ++++++++++++++++++++++- ridlbe/c++11/writers/stubsource.rb | 94 ------------------------- 2 files changed, 89 insertions(+), 95 deletions(-) diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 9591b63b..327dc6d2 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -86,7 +86,7 @@ def post_visit(parser) end def visit_cdr(parser) - writer(StubSourceCDRWriter).visit_nodes(parser) unless params[:no_cdr_streaming] + writer(StubProxySourceCDRWriter).visit_nodes(parser) unless params[:no_cdr_streaming] end def visit_includes(parser) @@ -100,6 +100,94 @@ def visit_proxy_object_ref_traits_specializations(parser) end end # StubProxySourceWriter + class StubProxySourceCDRWriter < StubProxySourceBaseWriter + def initialize(output = STDOUT, opts = {}) + super + # CDR operators are generated outside the scopes of the IDL defined types + # in a common naming scope so do not track scopes such that all typenames + # will always be generated fully scoped. + self.disable_scope_tracking = true + end + + def pre_visit(parser) + super + printiln('// generated from StubProxySourceCDRWriter#pre_visit') + println('TAO_BEGIN_VERSIONED_NAMESPACE_DECL') + end + + def post_visit(parser) + println + println('TAO_END_VERSIONED_NAMESPACE_DECL') + super + end + + def enter_interface(node) + return if node.is_local? || node.is_pseudo? || params[:no_cdr_streaming] + + visitor(InterfaceVisitor).visit_cdr(node) + end + + def enter_valuetype(node) + return if node.is_local? || params[:no_cdr_streaming] + + visitor(ValuetypeVisitor).visit_cdr(node) + end + + def visit_valuebox(node) + return if node.is_local? || params[:no_cdr_streaming] + + visitor(ValueboxVisitor).visit_cdr(node) + end + + def enter_struct(node) + return if node.is_local? || params[:no_cdr_streaming] + + visitor(StructVisitor).visit_cdr(node) + end + + def enter_union(node) + return if node.is_local? || params[:no_cdr_streaming] + + visitor(UnionVisitor).visit_cdr(node) + end + + def enter_exception(node) + return if params[:no_cdr_streaming] + + visitor(ExceptionVisitor).visit_cdr(node) + end + + def visit_enum(node) + return if params[:no_cdr_streaming] + + visitor(EnumVisitor).visit_cdr(node) + end + + def visit_bitmask(node) + return if params[:no_cdr_streaming] + + visitor(BitmaskVisitor).visit_cdr(node) + end + + def visit_bitset(node) + return if params[:no_cdr_streaming] + + visitor(BitsetVisitor).visit_cdr(node) + end + + def visit_typedef(node) + return if node.is_local? || params[:no_cdr_streaming] + # nothing to do if this is just an alias for another defined type + return if node.idltype.is_a?(IDL::Type::ScopedName) || node.idltype.resolved_type.is_standard_type? + + idl_type = node.idltype.resolved_type + case idl_type + when IDL::Type::String, IDL::Type::WString + visitor(StringVisitor).visit_cdr(node) # only bounded, unbounded is standard_type + end + end + end # StubProxySourceCDRWriter + class StubSourceProxyObjRefTraitsWriter < StubSourceBaseWriter def initialize(output = STDOUT, opts = {}) super diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 4d36f528..5504f5f8 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -64,9 +64,6 @@ def post_visit(parser) visit_proxy_object_ref_traits_specializations(parser) unless params[:no_client_proxy_hdr] end - # CDR operators - visit_cdr(parser) unless params[:no_cdr_streaming] - super visitor(PostVisitor).visit end @@ -174,10 +171,6 @@ def visit_proxy_object_ref_traits_specializations(parser) #writer(StubSourceProxyObjRefTraitsWriter).visit_nodes(parser) end - def visit_cdr(parser) - #writer(StubSourceCDRWriter).visit_nodes(parser) unless params[:no_cdr_streaming] || params[:client_proxy_source] - end - def visit_typecodes(parser) writer(StubSourceTypecodeWriter).visit_nodes(parser) end @@ -451,93 +444,6 @@ def enter_valuetype(node) end end - class StubSourceCDRWriter < StubSourceBaseWriter - def initialize(output = STDOUT, opts = {}) - super - # CDR operators are generated outside the scopes of the IDL defined types - # in a common naming scope so do not track scopes such that all typenames - # will always be generated fully scoped. - self.disable_scope_tracking = true - end - - def pre_visit(parser) - super - printiln('// generated from StubSourceCDRWriter#pre_visit') - println('TAO_BEGIN_VERSIONED_NAMESPACE_DECL') - end - - def post_visit(parser) - println - println('TAO_END_VERSIONED_NAMESPACE_DECL') - super - end - - def enter_interface(node) - return if node.is_local? || node.is_pseudo? || params[:no_cdr_streaming] - - visitor(InterfaceVisitor).visit_cdr(node) - end - - def enter_valuetype(node) - return if node.is_local? || params[:no_cdr_streaming] - - visitor(ValuetypeVisitor).visit_cdr(node) - end - - def visit_valuebox(node) - return if node.is_local? || params[:no_cdr_streaming] - - visitor(ValueboxVisitor).visit_cdr(node) - end - - def enter_struct(node) - return if node.is_local? || params[:no_cdr_streaming] - - visitor(StructVisitor).visit_cdr(node) - end - - def enter_union(node) - return if node.is_local? || params[:no_cdr_streaming] - - visitor(UnionVisitor).visit_cdr(node) - end - - def enter_exception(node) - return if params[:no_cdr_streaming] - - visitor(ExceptionVisitor).visit_cdr(node) - end - - def visit_enum(node) - return if params[:no_cdr_streaming] - - visitor(EnumVisitor).visit_cdr(node) - end - - def visit_bitmask(node) - return if params[:no_cdr_streaming] - - visitor(BitmaskVisitor).visit_cdr(node) - end - - def visit_bitset(node) - return if params[:no_cdr_streaming] - - visitor(BitsetVisitor).visit_cdr(node) - end - - def visit_typedef(node) - return if node.is_local? || params[:no_cdr_streaming] - # nothing to do if this is just an alias for another defined type - return if node.idltype.is_a?(IDL::Type::ScopedName) || node.idltype.resolved_type.is_standard_type? - - idl_type = node.idltype.resolved_type - case idl_type - when IDL::Type::String, IDL::Type::WString - visitor(StringVisitor).visit_cdr(node) # only bounded, unbounded is standard_type - end - end - end # StubProxySourceCDRWriter class StubSourceAnyOpWriter < StubSourceBaseWriter def initialize(output = STDOUT, opts = {}) From 7bc26b0bf176ac4201c672b9a5541102f2d7f7aa Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 11:24:28 +0200 Subject: [PATCH 33/94] Add test script * bin/taox11_tests.lst: --- bin/taox11_tests.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/taox11_tests.lst b/bin/taox11_tests.lst index fe8f4e74..c4865f6e 100644 --- a/bin/taox11_tests.lst +++ b/bin/taox11_tests.lst @@ -161,7 +161,7 @@ tests/policies/manipulation/run_test.pl: !CORBA_E_MICRO tests/policies/oneway_timeouts/run_test.pl: !CORBA_E_MICRO tests/policies/mt_timeout/run_test.pl: !CORBA_E_MICRO tests/policies/reliable_oneways/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO -tests/proxysource: +tests/proxysource/run_test.pl: tests/pt_throughput/run_test.pl: tests/reactor/run_test.pl: tests/sequence/run_test.pl: From 08b43910260c1ffc46aad953ed478e131e4b4927 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 13:10:38 +0200 Subject: [PATCH 34/94] Add executable bits * tests/proxysource/run_test.pl: --- tests/proxysource/run_test.pl | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/proxysource/run_test.pl diff --git a/tests/proxysource/run_test.pl b/tests/proxysource/run_test.pl old mode 100644 new mode 100755 From 64c892ec052bd3ed0cc2c551d8bf4bb1afc149c9 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 13:17:53 +0200 Subject: [PATCH 35/94] Fixed error * ridlbe/c++11/writers/stubproxysource.rb: --- ridlbe/c++11/writers/stubproxysource.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 327dc6d2..125cfb71 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -17,7 +17,7 @@ def initialize(output = STDOUT, opts = {}) end end - class StubProxySourceWriter < StubSourceBaseWriter + class StubProxySourceWriter < StubProxySourceBaseWriter def initialize(output = STDOUT, opts = {}) super From 156b4bc013f741f4891c76b8d0f144f6a7fdabf4 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 13:34:08 +0200 Subject: [PATCH 36/94] Fixed problem with older ruby versions * ridlbe/c++11/writers/stubproxysource.rb: --- ridlbe/c++11/writers/stubproxysource.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 125cfb71..4e00ae36 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -188,7 +188,7 @@ def visit_typedef(node) end end # StubProxySourceCDRWriter - class StubSourceProxyObjRefTraitsWriter < StubSourceBaseWriter + class StubSourceProxyObjRefTraitsWriter < StubProxySourceBaseWriter def initialize(output = STDOUT, opts = {}) super end @@ -207,7 +207,7 @@ def enter_interface(node) end end - class StubProxySourceIncludeWriter < StubSourceBaseWriter + class StubProxySourceIncludeWriter < StubProxySourceBaseWriter def initialize(output = STDOUT, opts = {}) super @default_pre_includes = params[:default_pre_includes] From defe2b7cd4a72335e558b34bc9b0294ae7c2e928 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 14:01:40 +0200 Subject: [PATCH 37/94] Rename beta to micro * tao/x11/stddef.h: * tao/x11/versioned_x11_namespace.h: --- tao/x11/stddef.h | 2 -- tao/x11/versioned_x11_namespace.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tao/x11/stddef.h b/tao/x11/stddef.h index b2e963f6..6518d8b0 100644 --- a/tao/x11/stddef.h +++ b/tao/x11/stddef.h @@ -12,8 +12,6 @@ #pragma once -//#include "ace/config-macros.h" - #include #include #include diff --git a/tao/x11/versioned_x11_namespace.h b/tao/x11/versioned_x11_namespace.h index 47190e09..7095b70e 100644 --- a/tao/x11/versioned_x11_namespace.h +++ b/tao/x11/versioned_x11_namespace.h @@ -23,8 +23,8 @@ // concatenated. Force the preprocessor to expand them during the // argument prescan by calling a macro that itself calls another that // performs the actual concatenation. -# define TAOX11_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,BETA) taox11_ ## MAJOR ## _ ## MINOR ## _ ## BETA -# define TAOX11_MAKE_VERSIONED_NAMESPACE_NAME(MAJOR,MINOR,BETA) TAOX11_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,BETA) +# define TAOX11_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,MICRO) taox11_ ## MAJOR ## _ ## MINOR ## _ ## MICRO +# define TAOX11_MAKE_VERSIONED_NAMESPACE_NAME(MAJOR,MINOR,MICRO) TAOX11_MAKE_VERSIONED_NAMESPACE_NAME_IMPL(MAJOR,MINOR,MICRO) # define TAOX11_VERSIONED_NAMESPACE_NAME TAOX11_MAKE_VERSIONED_NAMESPACE_NAME(TAOX11_MAJOR_VERSION,TAOX11_MINOR_VERSION,TAOX11_MICRO_VERSION) # endif /* !TAO_VERSIONED_NAMESPACE_NAME */ From ef1e71a97eb3b7fdb602b7bbda50b30582847ea6 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 14:20:27 +0200 Subject: [PATCH 38/94] Commandline changes * ridlbe/c++11/config.rb: --- ridlbe/c++11/config.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 7271609d..adb81e8c 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -139,7 +139,7 @@ def self.add_extended_options(ol, _idl_params) 'isrv' => { option_name: :gen_impl_servant, description: "-Gisrv\t\t\tGenerate implementation classes for servants (not generated by default; ignored with -SS or --stubs-only)" }, 'cps' => { option_name: :client_proxy_source, - description: "-Gcps\t\t\tGenerate implementation of client proxy is separate source file (not generated by default)" }, + description: "-Gcps\t\t\tGenerate implementation of client proxy is separate *CP.cpp file (not generated by default)" }, 'xhcpr' => { option_name: :gen_export_client_proxy, description: "-Gxhpr\t\t\tGenerate export header file for client proxy (not generated by default)" }, } @@ -157,6 +157,8 @@ def self.add_extended_options(ol, _idl_params) description: "-Ximpl\t\t\tExport implementation code (not exported by default)" }, 'cp' => { option_name: :export_client_proxy, description: "-Xpr\t\t\tExport client proxy code (not exported by default)" }, + 'at' => { option_name: :export_anytypecode, + description: "-Xpr\t\t\tExport Any and Typecode code (not exported by default)" }, } end From bdc661bcfe5dc59102bec0812c90cbffd2f4fb58 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 14:33:15 +0200 Subject: [PATCH 39/94] Add commandline * ridlbe/c++11/config.rb: --- ridlbe/c++11/config.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index adb81e8c..e79354ec 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -133,15 +133,17 @@ def self.add_extended_options(ol, _idl_params) 'xhsk' => { option_name: :gen_export_sk, description: "-Gxhsk\t\t\tGenerate export header file for skeleton (not generated by default)" }, 'xhsta' => { option_name: :gen_export_sta, - description: "-Gxhsta\t\t\tGenerate export header file for ami stub (not generated by default)" }, + description: "-Gxhsta\t\t\tGenerate export header file for AMI stub (not generated by default)" }, 'xhimpl' => { option_name: :gen_export_impl, description: "-Gxhimpl\t\t\tGenerate export header file for implementation code (not generated by default)" }, + 'xhcpr' => { option_name: :gen_export_client_proxy, + description: "-Gxhpr\t\t\tGenerate export header file for client proxy (not generated by default)" }, + 'xhat' => { option_name: :gen_export_anytypecode, + description: "-Gxhpr\t\t\tGenerate export header file for Any and TypeCode support (not generated by default)" }, 'isrv' => { option_name: :gen_impl_servant, description: "-Gisrv\t\t\tGenerate implementation classes for servants (not generated by default; ignored with -SS or --stubs-only)" }, 'cps' => { option_name: :client_proxy_source, description: "-Gcps\t\t\tGenerate implementation of client proxy is separate *CP.cpp file (not generated by default)" }, - 'xhcpr' => { option_name: :gen_export_client_proxy, - description: "-Gxhpr\t\t\tGenerate export header file for client proxy (not generated by default)" }, } end From c6c894b7557a1c0a26813421f64ca13d5a00e952 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 14:51:46 +0200 Subject: [PATCH 40/94] More export code * ridlbe/c++11/config.rb: --- ridlbe/c++11/config.rb | 70 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index e79354ec..b4fa5f63 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -80,6 +80,8 @@ def self.add_extended_options(ol, _idl_params) 'impl_export_file' => { description: "-Wb,impl_export_file=FILE\t\tSet implementation export file to generate for -Gxhimpl" }, 'anytypecode_export_macro' => { description: "-Wb,anytypecode_export_macro=MACRO\tSet export macro for Any ops and TypeCode" }, 'anytypecode_export_include' => { description: "-Wb,anytypecode_export_include=FILE\tSet export include file for Any ops and TypeCode" }, + 'stub_proxy_export_macro' => { description: "-Wb,stub_proxy_export_macro=MACRO\tSet export macro for stub proxy files" }, + 'stub_proxy_export_include' => { description: "-Wb,stub_proxy_export_include=FILE\tSet export include file for stub proxy files" }, 'include_guard' => { description: "-Wb,include_guard=MACRO\t\tguard to prevent the generated client header file to be included" }, 'safe_include' => { description: "-Wb,safe_include=FILE\t\tinclude that should be used instead of the own generated client header file" }, 'unique_include' => { description: "-Wb,unique_include=FILE\t\tinclude that should be generated as only contents of the generated client header file" } @@ -340,6 +342,10 @@ def taox11_version IDL::Cxx11.check_impl_export_params(options) + IDL::Cxx11.check_anytypecode_export_params(options) + + IDL::Cxx11.check_client_proxy_export_params(options) + # generate client stubs if requested if options[:client_stubs] IDL::Cxx11.generate_client_stubs(options) @@ -380,6 +386,14 @@ def taox11_version if options[:gen_export_impl] IDL::Cxx11.gen_impl_export(options) end + + if options[:gen_export_anytypecode] + IDL::Cxx11.gen_anytypecode_export(options) + end + + if options[:gen_export_client_proxy] + IDL::Cxx11.gen_client_proxy_export(options) + end end # becfg.on_process_input end # Backend.configure @@ -459,6 +473,32 @@ def self.check_impl_export_params(options) end end + def self.check_client_proxy_export_params(options) + if options.gen_export_client_proxy || options.export_client_proxy + unless options.client_proxy_export_macro || options.base_export_macro + IDL.fatal("ERROR: it isn't allowed to use -Gxhcpr or -Xcpr without specifying the macro with -Wb,client_proxy_export_macro=MACRO " + + 'or with -Wb,base_export_macro=MACRO_PREFIX') + end + # only in case export header generation has been explicitly enabled will + # we derive missing export parameters from base parameters + options.client_proxy_export_macro = options.base_export_macro + '_STUB' + options.export_macro_pfx unless options.client_proxy_export_macro || options.base_export_macro.nil? + options.client_proxy_export_include = options.base_export_include + '_stub' + options.export_header_pfx unless options.client_proxy_export_include || options.base_export_include.nil? + end + end + + def self.check_anytypecode_export_params(options) + if options.gen_export_anytypecode || options.export_anytypecode + unless options.anytypecode_export_macro || options.base_export_macro + IDL.fatal("ERROR: it isn't allowed to use -Gxhat or -Xat without specifying the macro with -Wb,anytypecode_export_macro=MACRO " + + 'or with -Wb,base_export_macro=MACRO_PREFIX') + end + # only in case export header generation has been explicitly enabled will + # we derive missing export parameters from base parameters + options.anytypecode_export_macro = options.base_export_macro + '_STUB' + options.export_macro_pfx unless options.anytypecode_export_macro || options.base_export_macro.nil? + options.anytypecode_export_include = options.base_export_include + '_stub' + options.export_header_pfx unless options.anytypecode_export_include || options.base_export_include.nil? + end + end + def self.generate_client_stubs(options) options[:ami] = false # schedule productions @@ -652,6 +692,36 @@ def self.gen_impl_export(options) '-Wb,impl_export_include=FILE or -Wb,base_export_include=FILE_PREFIX') end end + + def self.gen_anytypecode_export(options) + return if IDL.has_production?(:anytypecode_export_header) + + export_file = options.anytypecode_export_file || options.anytypecode_export_include + if export_file + so = GenFile.new(File.join(options.outputdir, export_file)) + IDL.push_production( + :anytypecode_export_header, + ::IDL::Cxx11::ExportHeaderWriter.new(options.anytypecode_export_macro, export_file, so, options)) + else + IDL.fatal('ERROR: it is not allowed to use -Gxhimpl without specifying the file with -Wb,impl_export_file=FILE, ' + + '-Wb,impl_export_include=FILE or -Wb,base_export_include=FILE_PREFIX') + end + end + + def self.gen_client_proxy_export(options) + return if IDL.has_production?(:client_proxy_export_header) + + export_file = options.client_proxy_export_file || options.client_proxy_export_include + if export_file + so = GenFile.new(File.join(options.outputdir, export_file)) + IDL.push_production( + :client_proxy_export_header, + ::IDL::Cxx11::ExportHeaderWriter.new(options.client_proxy_export_macro, export_file, so, options)) + else + IDL.fatal('ERROR: it is not allowed to use -Gxhimpl without specifying the file with -Wb,impl_export_file=FILE, ' + + '-Wb,impl_export_include=FILE or -Wb,base_export_include=FILE_PREFIX') + end + end end # Cxx11 end # IDL From c35ed094f5d3b618ff369f98b7ba8bd94286b201 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 15:02:37 +0200 Subject: [PATCH 41/94] Export stuff * bin/MPC/config/ridl_base_defaults.mpb: * bin/MPC/modules/IDLHelper.pm: * ridlbe/c++11/config.rb: --- bin/MPC/config/ridl_base_defaults.mpb | 3 +++ bin/MPC/modules/IDLHelper.pm | 14 ++++++++++++++ ridlbe/c++11/config.rb | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/bin/MPC/config/ridl_base_defaults.mpb b/bin/MPC/config/ridl_base_defaults.mpb index 36cc95f8..df9b5f5e 100644 --- a/bin/MPC/config/ridl_base_defaults.mpb +++ b/bin/MPC/config/ridl_base_defaults.mpb @@ -24,6 +24,8 @@ project: taox11_basedefaults, taobaseidldefaults { optional(source_pre_extension) { commandflags(-GC) += AmiC commandflags(-GCa) += AmiC + commandflags(-Gcps) += CP + commandflags(-Gath) += A } optional(header_pre_extension) { @@ -31,6 +33,7 @@ project: taox11_basedefaults, taobaseidldefaults { commandflags(!-Ssh) += SP commandflags(-GC) += AmiC, AmiCP commandflags(-GCa) += AmiC, AmiCP + commandflags(-Gatc) += A } } diff --git a/bin/MPC/modules/IDLHelper.pm b/bin/MPC/modules/IDLHelper.pm index cc4cd233..8fe05a4e 100644 --- a/bin/MPC/modules/IDLHelper.pm +++ b/bin/MPC/modules/IDLHelper.pm @@ -81,6 +81,20 @@ sub get_output { push(@out, $1); } } + if ($flags =~ /--Gxhcpr/) { + if ($flags =~ /-Wb,client_proxy_export_file=(\S*)/) { + push(@out, $1); + } elsif ($flags =~ /-Wb,client_proxy_export_include=(\S*)/) { + push(@out, $1); + } + } + if ($flags =~ /--Gxhat/) { + if ($flags =~ /-Wb,anytypecode_export_file=(\S*)/) { + push(@out, $1); + } elsif ($flags =~ /-Wb,anytypecode_export_include=(\S*)/) { + push(@out, $1); + } + } if ($flags =~ /-Gxhsv/ && $flags =~ /-Wb,svnt_export_include=(\S*)/) { push(@out, $1); } diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index b4fa5f63..b61164b4 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -138,7 +138,7 @@ def self.add_extended_options(ol, _idl_params) description: "-Gxhsta\t\t\tGenerate export header file for AMI stub (not generated by default)" }, 'xhimpl' => { option_name: :gen_export_impl, description: "-Gxhimpl\t\t\tGenerate export header file for implementation code (not generated by default)" }, - 'xhcpr' => { option_name: :gen_export_client_proxy, + 'xhcp' => { option_name: :gen_export_client_proxy, description: "-Gxhpr\t\t\tGenerate export header file for client proxy (not generated by default)" }, 'xhat' => { option_name: :gen_export_anytypecode, description: "-Gxhpr\t\t\tGenerate export header file for Any and TypeCode support (not generated by default)" }, @@ -476,7 +476,7 @@ def self.check_impl_export_params(options) def self.check_client_proxy_export_params(options) if options.gen_export_client_proxy || options.export_client_proxy unless options.client_proxy_export_macro || options.base_export_macro - IDL.fatal("ERROR: it isn't allowed to use -Gxhcpr or -Xcpr without specifying the macro with -Wb,client_proxy_export_macro=MACRO " + + IDL.fatal("ERROR: it isn't allowed to use -Gxhcp or -Xcp without specifying the macro with -Wb,client_proxy_export_macro=MACRO " + 'or with -Wb,base_export_macro=MACRO_PREFIX') end # only in case export header generation has been explicitly enabled will From fd72b652275117ad6d843f62da9baa3fb9a6b790 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 15:20:16 +0200 Subject: [PATCH 42/94] Doc extensions * docs/src/ridlc.adoc: * ridlbe/c++11/config.rb: --- docs/src/ridlc.adoc | 40 ++++++++++++++++++++++++++++++++++++++-- ridlbe/c++11/config.rb | 4 ++-- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/docs/src/ridlc.adoc b/docs/src/ridlc.adoc index 166a0f9d..499bc591 100644 --- a/docs/src/ridlc.adoc +++ b/docs/src/ridlc.adoc @@ -250,11 +250,19 @@ Sets implementation export file to generate for -Gxhimpl| ||-Wb,anytypecode_export_macro=MACRO| -Sets export macro for Any ops and TypeCode| +Sets export macro for Any and TypeCode| ||-Wb,anytypecode_export_include=FILE| -Sets export include file for Any ops and TypeCode| +Sets export include file for Any and TypeCode| + +||-Wb,client_proxy_export_macro=MACRO| + +Sets export macro for client proxy| + +||-Wb,client_proxy_export_include=FILE| + +Sets export include file for client proxy| ||-Wb,include_guard=MACRO| @@ -314,6 +322,20 @@ Generate Any and TypeCode support implementation in separate *A.cpp file off +||-Gath| + +Generate Any and TypeCode support declarations in separate *A.h file + (not generated by default)| + +off + +||-Gcp| + +Generate client proxy implementation in separate *CP.cpp file + (not generated by default)| + +off + ||-Gaia| Generate AnyInsert_Adapter version of the Any insert policy (not generated by default). + @@ -377,6 +399,20 @@ default).| off +||-Gxhcp| + +Generate export header file for client proxy code (not generated by +default).| + +off + +||-Gxhat| + +Generate export header file for any and typecode code (not generated by +default).| + +off + ||-Gisrv| Generate implementation classes for servants (not generated by default; diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index b61164b4..0f5a9d58 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -144,8 +144,8 @@ def self.add_extended_options(ol, _idl_params) description: "-Gxhpr\t\t\tGenerate export header file for Any and TypeCode support (not generated by default)" }, 'isrv' => { option_name: :gen_impl_servant, description: "-Gisrv\t\t\tGenerate implementation classes for servants (not generated by default; ignored with -SS or --stubs-only)" }, - 'cps' => { option_name: :client_proxy_source, - description: "-Gcps\t\t\tGenerate implementation of client proxy is separate *CP.cpp file (not generated by default)" }, + 'cp' => { option_name: :client_proxy_source, + description: "-Gcp\t\t\tGenerate implementation of client proxy is separate *CP.cpp file (not generated by default)" }, } end From 5331832ae6ec7a9ed8c8d78cb429fcb812aae11f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 5 Apr 2024 15:57:58 +0200 Subject: [PATCH 43/94] Correct flags * bin/MPC/config/ridl_base_defaults.mpb: * tests/proxysource/proxysource.mpc: --- bin/MPC/config/ridl_base_defaults.mpb | 2 +- tests/proxysource/proxysource.mpc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/MPC/config/ridl_base_defaults.mpb b/bin/MPC/config/ridl_base_defaults.mpb index df9b5f5e..3d99f6fb 100644 --- a/bin/MPC/config/ridl_base_defaults.mpb +++ b/bin/MPC/config/ridl_base_defaults.mpb @@ -24,7 +24,7 @@ project: taox11_basedefaults, taobaseidldefaults { optional(source_pre_extension) { commandflags(-GC) += AmiC commandflags(-GCa) += AmiC - commandflags(-Gcps) += CP + commandflags(-Gcp) += CP commandflags(-Gath) += A } diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 1c413475..8640d6df 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -1,7 +1,7 @@ // -*- MPC -*- project(*proxysource_gen_Idl): ridl_ostream_defaults { - idlflags += -Gcps -Sorb -Gatc -Gath + idlflags += -Gcp -Sorb -Gatc -Gath idlflags -= -Sa -St IDL_Files { test.idl From 6dea5956baed9e8d199a2993a564baaae529b765 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 8 Apr 2024 09:06:16 +0200 Subject: [PATCH 44/94] Only include orb.h when we have an interface * ridlbe/c++11/writers/stubheader.rb: * tests/proxysource/proxysource.mpc: --- ridlbe/c++11/writers/stubheader.rb | 3 ++- tests/proxysource/proxysource.mpc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index 25868849..6ced1c9c 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -32,7 +32,6 @@ def initialize(output = STDOUT, opts = {}) ] @default_pre_includes << 'tao/x11/corba.h' unless params[:client_proxy_source] - @default_pre_includes << 'tao/x11/orb.h' unless params[:no_orb_include] @default_post_includes = [] unless params[:output_anytypecode_header] @@ -399,6 +398,8 @@ def declare_interface(node) def enter_interface(node) return if node.is_pseudo? + add_pre_include('tao/x11/orb.h') unless params[:no_orb_include] + add_post_include('tao/x11/object_ostream.h') unless node.is_abstract? diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 8640d6df..7497ce10 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -1,7 +1,7 @@ // -*- MPC -*- project(*proxysource_gen_Idl): ridl_ostream_defaults { - idlflags += -Gcp -Sorb -Gatc -Gath + idlflags += -Gcp -Gatc -Gath idlflags -= -Sa -St IDL_Files { test.idl From e20cf707b444cde924497343dda7cb6e9317fe37 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 8 Apr 2024 09:08:33 +0200 Subject: [PATCH 45/94] Correct filename * tests/proxysource/taox11client.cpp: --- tests/proxysource/taox11client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/proxysource/taox11client.cpp b/tests/proxysource/taox11client.cpp index 0939fbe2..3f711a4c 100644 --- a/tests/proxysource/taox11client.cpp +++ b/tests/proxysource/taox11client.cpp @@ -1,5 +1,5 @@ /** - * @file client.cpp + * @file taox11client.cpp * @author Johnny Willemsen * * @brief C++11 client application which uses IDL defines types From 8e89e0ac0ee698966296a2c4a37da6f02dc6fdf5 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 8 Apr 2024 09:28:13 +0200 Subject: [PATCH 46/94] Removed std::cout usage * tests/proxysource/client.cpp: * tests/proxysource/taox11client.cpp: --- tests/proxysource/client.cpp | 1 - tests/proxysource/taox11client.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/proxysource/client.cpp b/tests/proxysource/client.cpp index d79a5997..dc458bf9 100644 --- a/tests/proxysource/client.cpp +++ b/tests/proxysource/client.cpp @@ -22,7 +22,6 @@ main(int, char* []) } catch (const std::exception& e) { - std::cout << "exception caught: " << e.what() << std::endl; return 1; } return result; diff --git a/tests/proxysource/taox11client.cpp b/tests/proxysource/taox11client.cpp index 3f711a4c..66392b89 100644 --- a/tests/proxysource/taox11client.cpp +++ b/tests/proxysource/taox11client.cpp @@ -22,7 +22,6 @@ main(int, char* []) } catch (const std::exception& e) { - std::cout << "exception caught: " << e.what() << std::endl; return 1; } return result; From 7f86e3abe7454d13494e55efd75e42d8b9ac7d46 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 8 Apr 2024 10:32:52 +0200 Subject: [PATCH 47/94] Correct flags * bin/MPC/config/ridl_base_defaults.mpb: * ridlbe/c++11/config.rb: --- bin/MPC/config/ridl_base_defaults.mpb | 4 ++-- ridlbe/c++11/config.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/MPC/config/ridl_base_defaults.mpb b/bin/MPC/config/ridl_base_defaults.mpb index 3d99f6fb..0298a08a 100644 --- a/bin/MPC/config/ridl_base_defaults.mpb +++ b/bin/MPC/config/ridl_base_defaults.mpb @@ -25,7 +25,7 @@ project: taox11_basedefaults, taobaseidldefaults { commandflags(-GC) += AmiC commandflags(-GCa) += AmiC commandflags(-Gcp) += CP - commandflags(-Gath) += A + commandflags(-Gatc) += A } optional(header_pre_extension) { @@ -33,7 +33,7 @@ project: taox11_basedefaults, taobaseidldefaults { commandflags(!-Ssh) += SP commandflags(-GC) += AmiC, AmiCP commandflags(-GCa) += AmiC, AmiCP - commandflags(-Gatc) += A + commandflags(-Gath) += A } } diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 0f5a9d58..5183261b 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -117,7 +117,7 @@ def self.add_extended_options(ol, _idl_params) 'atc' => { option_name: :gen_anytypecode_source, description: "-Gatc\t\t\tGenerate Any and TypeCode support in separate *A.cpp file (not generated by default)" }, 'ath' => { option_name: :gen_anytypecode_header, - description: "-Gatc\t\t\tGenerate Any and TypeCode support in separate *A.h file (not generated by default)" }, + description: "-Gath\t\t\tGenerate Any and TypeCode support in separate *A.h file (not generated by default)" }, 'aia' => { option_name: :gen_anyinsert_adapter_policy, description: "-Gaia\t\t\tGenerate AnyInsert_Adapter version of the Any insert policy (not generated by default)" }, 'ce' => { option_name: :gen_corba_e, From 504f2fc395098f87efeb39b92cb9de7ce87ea25e Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 8 Apr 2024 11:02:30 +0200 Subject: [PATCH 48/94] Simplification * ridlbe/c++11/config.rb: --- ridlbe/c++11/config.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 5183261b..59ebc7eb 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -526,13 +526,13 @@ def self.generate_client_stubs(options) IDL.push_production(:stub_proxy_source, ::IDL::Cxx11::StubProxySourceWriter.new(co_prx, options)) end end - if ((options[:gen_anytypecode_source] || false) && options[:gen_typecodes]) + if options[:gen_anytypecode_source] && options[:gen_typecodes] if options[:output_anytypecode_source] co_atc = GenFile.new(options[:output_anytypecode_source]) IDL.push_production(:any_typecode_source, ::IDL::Cxx11::AnyTypeCodeWriter.new(co_atc, options)) end end - if ((options[:gen_anytypecode_header] || false) && options[:gen_typecodes]) + if options[:gen_anytypecode_header] && options[:gen_typecodes] if options[:output_anytypecode_header] co_ath = GenFile.new(options[:output_anytypecode_header]) IDL.push_production(:any_typecode_header, ::IDL::Cxx11::AnyTypeCodeHeaderWriter.new(co_ath, options)) From 04aa4c0da99f6559d42824aaa975d756c9b790b2 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 8 Apr 2024 15:05:53 +0200 Subject: [PATCH 49/94] Rename commandline arguments to make them more distinct * bin/MPC/config/ridl_base_defaults.mpb: * docs/src/ridlc.adoc: * ridlbe/c++11/config.rb: * tao/x11/portable_server/taox11_portableserver.mpc: * tests/include_chain/include_chain.mpc: * tests/proxysource/proxysource.mpc: --- bin/MPC/config/ridl_base_defaults.mpb | 4 ++-- docs/src/ridlc.adoc | 4 ++-- ridlbe/c++11/config.rb | 4 ++-- tao/x11/portable_server/taox11_portableserver.mpc | 2 +- tests/include_chain/include_chain.mpc | 2 +- tests/proxysource/proxysource.mpc | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/MPC/config/ridl_base_defaults.mpb b/bin/MPC/config/ridl_base_defaults.mpb index 0298a08a..49bf089b 100644 --- a/bin/MPC/config/ridl_base_defaults.mpb +++ b/bin/MPC/config/ridl_base_defaults.mpb @@ -24,12 +24,12 @@ project: taox11_basedefaults, taobaseidldefaults { optional(source_pre_extension) { commandflags(-GC) += AmiC commandflags(-GCa) += AmiC - commandflags(-Gcp) += CP + commandflags(-Gcpc) += CP commandflags(-Gatc) += A } optional(header_pre_extension) { - commandflags(!-Scp) += CP + commandflags(!-Scph) += CP commandflags(!-Ssh) += SP commandflags(-GC) += AmiC, AmiCP commandflags(-GCa) += AmiC, AmiCP diff --git a/docs/src/ridlc.adoc b/docs/src/ridlc.adoc index 499bc591..580a2260 100644 --- a/docs/src/ridlc.adoc +++ b/docs/src/ridlc.adoc @@ -329,7 +329,7 @@ Generate Any and TypeCode support declarations in separate *A.h file off -||-Gcp| +||-Gcpc| Generate client proxy implementation in separate *CP.cpp file (not generated by default)| @@ -465,7 +465,7 @@ Suppress generation of client header file (generated by default)| off -||-Scp| +||-Scph| Suppress generation of client proxy header file (generated by default)| diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 59ebc7eb..498b6644 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -182,8 +182,8 @@ def self.add_extended_options(ol, _idl_params) description: "-Scc\t\t\tSuppress generation of client source file (generated by default)" }, 'ch' => { option_name: :no_client_header, description: "-Sch\t\t\tSuppress generation of client header file (generated by default)" }, - 'cp' => { option_name: :no_client_proxy_hdr, - description: "-Scp\t\t\tSuppress generation of client proxy header file (generated by default)" }, + 'cph' => { option_name: :no_client_proxy_hdr, + description: "-Scph\t\t\tSuppress generation of client proxy header file (generated by default)" }, 'cdr' => { option_name: :no_cdr_streaming, description: "-Scdr\t\t\tSuppress generation of CDR streaming operators (generated by default)" }, } diff --git a/tao/x11/portable_server/taox11_portableserver.mpc b/tao/x11/portable_server/taox11_portableserver.mpc index 1d13aa19..03497b45 100644 --- a/tao/x11/portable_server/taox11_portableserver.mpc +++ b/tao/x11/portable_server/taox11_portableserver.mpc @@ -53,7 +53,7 @@ project(taox11_portableserver_idl) : ridl_core_defaults, install, pidl_install { $(TAO_ROOT)/tao/PortableServer/PortableServer.pidl } IDL_Files { - idlflags += -Scp -Sna + idlflags += -Scph -Sna idlflags += -Wb,add_post_include=tao/x11/portable_server/servant_forward.h idlflags -= -Sa -St gendir = . diff --git a/tests/include_chain/include_chain.mpc b/tests/include_chain/include_chain.mpc index 38340afb..631ac2ac 100644 --- a/tests/include_chain/include_chain.mpc +++ b/tests/include_chain/include_chain.mpc @@ -5,7 +5,7 @@ project(*x11_Idl): ridl_ostream_defaults, taox11_anytypecode { a.idl } IDL_Files { - idlflags += -Scp + idlflags += -Scph b.idl } IDL_Files { diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 7497ce10..e9f8cdb5 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -1,7 +1,7 @@ // -*- MPC -*- project(*proxysource_gen_Idl): ridl_ostream_defaults { - idlflags += -Gcp -Gatc -Gath + idlflags += -Gcpc -Gatc -Gath idlflags -= -Sa -St IDL_Files { test.idl From 49f4b1b5b82fe07952a78f0f22d3e552c9454a4f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 8 Apr 2024 16:34:00 +0200 Subject: [PATCH 50/94] Added todo * ridlbe/c++11/config.rb: * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/config.rb | 4 ++-- ridlbe/c++11/writers/stubsource.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 498b6644..9c72ba96 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -144,8 +144,8 @@ def self.add_extended_options(ol, _idl_params) description: "-Gxhpr\t\t\tGenerate export header file for Any and TypeCode support (not generated by default)" }, 'isrv' => { option_name: :gen_impl_servant, description: "-Gisrv\t\t\tGenerate implementation classes for servants (not generated by default; ignored with -SS or --stubs-only)" }, - 'cp' => { option_name: :client_proxy_source, - description: "-Gcp\t\t\tGenerate implementation of client proxy is separate *CP.cpp file (not generated by default)" }, + 'cpc' => { option_name: :client_proxy_source, + description: "-Gcpc\t\t\tGenerate implementation of client proxy is separate *CP.cpp file (not generated by default)" }, } end diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 5504f5f8..83ed2f7a 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -155,7 +155,7 @@ def visit_includes(parser) default_post_includes: @default_post_includes }).visit_nodes(parser) end - def visit_proxy(parser) + def visit_proxy(parser) # TODO Probabably cause duplicate header writer(StubProxySourceWriter).visit_nodes(parser) unless params[:client_proxy_source] end From 7d89031b87cd7ae2c416f9eef62dd276e5e3b4fb Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 8 Apr 2024 16:36:10 +0200 Subject: [PATCH 51/94] Added todo * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/writers/stubsource.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 83ed2f7a..b531bd66 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -167,6 +167,7 @@ def visit_object_traits_specializations(parser) writer(StubSourceObjTraitsWriter).visit_nodes(parser) end + # todo, probably this is needed, StubProxySourceWriter should call this also def visit_proxy_object_ref_traits_specializations(parser) #writer(StubSourceProxyObjRefTraitsWriter).visit_nodes(parser) end From d3448f623d7ecfd40964db94dbf88ee1d8701647 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 10:30:38 +0200 Subject: [PATCH 52/94] Fixed duplicate header, don't generate empty namespace begin/end blocks * ridlbe/c++11/templates/cli/src/interface_proxy.erb: * ridlbe/c++11/writers/stubproxysource.rb: * ridlbe/c++11/writers/stubsource.rb: --- .../templates/cli/src/interface_proxy.erb | 7 +- ridlbe/c++11/writers/stubproxysource.rb | 65 +++++++++++++------ ridlbe/c++11/writers/stubsource.rb | 30 ++++++--- 3 files changed, 68 insertions(+), 34 deletions(-) diff --git a/ridlbe/c++11/templates/cli/src/interface_proxy.erb b/ridlbe/c++11/templates/cli/src/interface_proxy.erb index bf849c5a..ebd7ab1f 100644 --- a/ridlbe/c++11/templates/cli/src/interface_proxy.erb +++ b/ridlbe/c++11/templates/cli/src/interface_proxy.erb @@ -15,9 +15,7 @@ { } -<%= proxy_cxxname %>::<%= proxy_cxxname %> ( - TAO_IOP::IOR *ior, - TAO_ORB_Core *orb_core) : +<%= proxy_cxxname %>::<%= proxy_cxxname %> (TAO_IOP::IOR *ior, TAO_ORB_Core *orb_core) : TAO_CORBA::Object (ior, orb_core) % if is_derived? % _bases = ancestors.dup.find_all { |_a| !_a.is_abstract? } @@ -40,8 +38,7 @@ } <%= proxy_cxxname %>::_ptr_type -<%= proxy_cxxname %>::_narrow ( - TAO_CORBA::Object::_ptr_type _tao_objref) +<%= proxy_cxxname %>::_narrow (TAO_CORBA::Object::_ptr_type _tao_objref) { return TAO_TAO::Narrow_Utils<<%= proxy_cxxname %>>::narrow (_tao_objref, "<%= repository_id %>"); } diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 4e00ae36..a45038e1 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -30,30 +30,17 @@ def initialize(output = STDOUT, opts = {}) # Object traits are only required for interfaces and valuetypes @object_traits_specializations = false + # Proxy implementation is only required for interfaces + @proxy_impl = false - def enter_module(node) + def enter_interface(node) super - println - printiln('// generated from StubProxySourceWriter#enter_module') - printiln('namespace ' + node.cxxname) - printiln('{') - inc_nest - end - def leave_module(node) - dec_nest - printiln("} // namespace #{node.cxxname}") - println - super - end + @object_traits_specializations = true - def enter_interface(node) - super return if node.is_local? || node.is_pseudo? || node.is_abstract? - @object_traits_specializations = true - visitor(InterfaceVisitor).visit_proxy(node) - println + @proxy_impl = true end def enter_valuetype(node) @@ -71,7 +58,9 @@ def pre_visit(parser) def post_visit(parser) # stub proxy implementations - #visit_proxy(parser) + if @proxy_impl + visit_proxy_implementation(parser) + end if @object_traits_specializations # Object ref traits specializations @@ -79,14 +68,14 @@ def post_visit(parser) end # CDR operators - visit_cdr(parser) + visit_cdr(parser) unless params[:no_cdr_streaming] super visitor(PostVisitor).visit end def visit_cdr(parser) - writer(StubProxySourceCDRWriter).visit_nodes(parser) unless params[:no_cdr_streaming] + writer(StubProxySourceCDRWriter).visit_nodes(parser) end def visit_includes(parser) @@ -98,6 +87,10 @@ def visit_includes(parser) def visit_proxy_object_ref_traits_specializations(parser) writer(StubSourceProxyObjRefTraitsWriter).visit_nodes(parser) end + + def visit_proxy_implementation(parser) + writer(StubProxySourceProxyImplWriter).visit_nodes(parser) + end end # StubProxySourceWriter class StubProxySourceCDRWriter < StubProxySourceBaseWriter @@ -188,6 +181,36 @@ def visit_typedef(node) end end # StubProxySourceCDRWriter + class StubProxySourceProxyImplWriter < StubProxySourceBaseWriter + def initialize(output = STDOUT, opts = {}) + super + end + + def enter_module(node) + super + println + printiln('// generated from StubProxySourceProxyImplWriter') + printiln('namespace ' + node.cxxname) + printiln('{') + inc_nest + end + + def leave_module(node) + dec_nest + printiln("} // namespace #{node.cxxname}") + println + super + end + + def enter_interface(node) + super + return if node.is_local? || node.is_pseudo? || node.is_abstract? + + visitor(InterfaceVisitor).visit_proxy(node) + println + end + end + class StubSourceProxyObjRefTraitsWriter < StubProxySourceBaseWriter def initialize(output = STDOUT, opts = {}) super diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index b531bd66..06521076 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -25,6 +25,9 @@ def initialize(output = STDOUT, opts = {}) # Object traits are only required for interfaces and valuetypes @object_traits_specializations = false + # Proxy implementation is only required for interfaces + @proxy_impl = false + @default_pre_includes = [] unless params[:no_cdr_streaming] || params[:client_proxy_source] @default_pre_includes << 'tao/CDR.h' @@ -52,7 +55,7 @@ def pre_visit(parser) def post_visit(parser) # stub proxy implementations - visit_proxy(parser) + visit_proxy_implementation(parser) if @proxy_impl && !params[:client_proxy_source] visit_anyops(parser) if params[:gen_any_ops] && !params[:gen_anytypecode_source] @@ -64,6 +67,9 @@ def post_visit(parser) visit_proxy_object_ref_traits_specializations(parser) unless params[:no_client_proxy_hdr] end + # CDR operators + visit_cdr(parser) unless params[:client_proxy_source] + super visitor(PostVisitor).visit end @@ -103,9 +109,14 @@ def leave_module(node) end def enter_interface(node) - @object_traits_specializations = true return if node.is_abstract? + if !node.is_local? && !node.is_pseudo? && !node.is_abstract? + @proxy_impl = true + end + + @object_traits_specializations = true + visitor(InterfaceVisitor).visit_pre(node) end @@ -155,10 +166,6 @@ def visit_includes(parser) default_post_includes: @default_post_includes }).visit_nodes(parser) end - def visit_proxy(parser) # TODO Probabably cause duplicate header - writer(StubProxySourceWriter).visit_nodes(parser) unless params[:client_proxy_source] - end - def visit_anyops(parser) writer(StubSourceAnyOpWriter).visit_nodes(parser) end @@ -167,14 +174,21 @@ def visit_object_traits_specializations(parser) writer(StubSourceObjTraitsWriter).visit_nodes(parser) end - # todo, probably this is needed, StubProxySourceWriter should call this also + def visit_proxy_implementation(parser) + writer(StubProxySourceProxyImplWriter).visit_nodes(parser) unless params[:client_proxy_source] + end + def visit_proxy_object_ref_traits_specializations(parser) - #writer(StubSourceProxyObjRefTraitsWriter).visit_nodes(parser) + writer(StubSourceProxyObjRefTraitsWriter).visit_nodes(parser) end def visit_typecodes(parser) writer(StubSourceTypecodeWriter).visit_nodes(parser) end + + def visit_cdr(parser) + writer(StubProxySourceCDRWriter).visit_nodes(parser) unless params[:no_cdr_streaming] + end end # StubSourceWriter class StubSourceIncludeWriter < StubSourceBaseWriter From d454c6515aba3831683514ed9ee7c15a874d7a96 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 10:46:57 +0200 Subject: [PATCH 53/94] Another place where we can generate a namespace open/close less * ridlbe/c++11/writers/stubproxyheader.rb: --- ridlbe/c++11/writers/stubproxyheader.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ridlbe/c++11/writers/stubproxyheader.rb b/ridlbe/c++11/writers/stubproxyheader.rb index 7178308b..bafa4632 100644 --- a/ridlbe/c++11/writers/stubproxyheader.rb +++ b/ridlbe/c++11/writers/stubproxyheader.rb @@ -30,6 +30,8 @@ def initialize(output = STDOUT, opts = {}) @default_post_includes = [] end + @object_varout = false + def visit_nodes(parser) @include_guard = "__RIDL_#{File.basename(params[:output_client_proxy_header] || '').to_random_include_guard}_INCLUDED__" super @@ -73,6 +75,9 @@ def enter_interface(node) super return if node.is_local? || node.is_pseudo? || node.is_abstract? + # varout generation is only necessary for interfaces + @object_varout = true + println printiln('// generated from StubProxyHeaderWriter#enter_interface') visitor(InterfaceVisitor).visit_pre(node) @@ -101,7 +106,7 @@ def visit_cdr(parser) end def visit_obj_var_out_specializations(parser) - writer(StubProxyHeaderVarOutWriter).visit_nodes(parser) + writer(StubProxyHeaderVarOutWriter).visit_nodes(parser) if @object_varout end def visit_obj_ref_traits_specializations(parser) From 11c3b3ed54b20bc5bbff2296c90b18b5c182e063 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 10:55:11 +0200 Subject: [PATCH 54/94] More compact any insertion/extration * ridlbe/c++11/templates/cli/src/enum_anyop.erb: * ridlbe/c++11/templates/cli/src/interface_anyop.erb: * ridlbe/c++11/templates/cli/src/struct_anyop.erb: * ridlbe/c++11/templates/cli/src/union_anyop.erb: * ridlbe/c++11/templates/cli/src/value_anyop.erb: --- ridlbe/c++11/templates/cli/src/enum_anyop.erb | 10 ++----- .../templates/cli/src/interface_anyop.erb | 27 +++---------------- .../c++11/templates/cli/src/struct_anyop.erb | 27 +++---------------- .../c++11/templates/cli/src/union_anyop.erb | 27 +++---------------- .../c++11/templates/cli/src/value_anyop.erb | 18 ++----------- 5 files changed, 14 insertions(+), 95 deletions(-) diff --git a/ridlbe/c++11/templates/cli/src/enum_anyop.erb b/ridlbe/c++11/templates/cli/src/enum_anyop.erb index 964144a6..12263581 100644 --- a/ridlbe/c++11/templates/cli/src/enum_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/enum_anyop.erb @@ -3,17 +3,11 @@ /// Any insertion operator for <%= scoped_cxxname %> void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _val) { - TAOX11_NAMESPACE::Any_Basic_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, - TAOX11_NAMESPACE::CDR_Marshal_Policy - >::insert (any, <%= scoped_cxx_typecode %>, _val); + TAOX11_NAMESPACE::Any_Basic_Impl_T>, TAOX11_NAMESPACE::CDR_Marshal_Policy>::insert (any, <%= scoped_cxx_typecode %>, _val); } /// Any extraction operator for <%= scoped_cxxname %> bool operator>>= (const TAOX11_CORBA::Any &any, <%= scoped_cxx_out_type %> _val) { - return TAOX11_NAMESPACE::Any_Basic_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, - TAOX11_NAMESPACE::CDR_Marshal_Policy - >::extract (any, <%= scoped_cxx_typecode %>, _val); + return TAOX11_NAMESPACE::Any_Basic_Impl_T>, TAOX11_NAMESPACE::CDR_Marshal_Policy >::extract (any, <%= scoped_cxx_typecode %>, _val); } diff --git a/ridlbe/c++11/templates/cli/src/interface_anyop.erb b/ridlbe/c++11/templates/cli/src/interface_anyop.erb index ce9e53f3..148f0d47 100644 --- a/ridlbe/c++11/templates/cli/src/interface_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/interface_anyop.erb @@ -4,19 +4,9 @@ void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _val) { % if is_abstract? - TAOX11_NAMESPACE::Any_AbstractBase_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, - TAOX11_NAMESPACE::CDR_Marshal_Policy - >::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); + TAOX11_NAMESPACE::Any_AbstractBase_Impl_T>, TAOX11_NAMESPACE::CDR_Marshal_Policy >::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); % else - TAOX11_NAMESPACE::Any_Object_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); + TAOX11_NAMESPACE::Any_Object_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); % end } @@ -24,18 +14,9 @@ void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _val) bool operator>>= (const TAOX11_CORBA::Any &any, <%= scoped_cxx_out_type %> _val) { % if is_abstract? - return TAOX11_NAMESPACE::Any_AbstractBase_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, - TAOX11_NAMESPACE::CDR_Marshal_Policy - >::extract (any, <%= scoped_cxx_typecode %>, _val); + return TAOX11_NAMESPACE::Any_AbstractBase_Impl_T>, TAOX11_NAMESPACE::CDR_Marshal_Policy >::extract (any, <%= scoped_cxx_typecode %>, _val); % else - return TAOX11_NAMESPACE::Any_Object_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end + return TAOX11_NAMESPACE::Any_Object_Impl_T>, <% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %> >::extract (any, <%= scoped_cxx_typecode %>, _val); % end } diff --git a/ridlbe/c++11/templates/cli/src/struct_anyop.erb b/ridlbe/c++11/templates/cli/src/struct_anyop.erb index 87a1aadd..36197492 100644 --- a/ridlbe/c++11/templates/cli/src/struct_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/struct_anyop.erb @@ -3,38 +3,17 @@ /// Copying any insertion operator for <%= scoped_cxxname %> void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _struct) { - TAOX11_NAMESPACE::Any_Dual_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::insert_copy (any, <%= scoped_cxx_typecode %>, _struct); + TAOX11_NAMESPACE::Any_Dual_Impl_T>, <% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert_copy (any, <%= scoped_cxx_typecode %>, _struct); } /// Non copying any insertion operator for <%= scoped_cxxname %> void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_move_type %> _struct) { - Any_Dual_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::insert (any, <%= scoped_cxx_typecode %>, std::move(_struct)); + Any_Dual_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert (any, <%= scoped_cxx_typecode %>, std::move(_struct)); } /// Any extraction operator for <%= scoped_cxxname %> bool operator>>= (const TAOX11_CORBA::Any &any, <%= scoped_cxx_out_type %> _struct) { - return Any_Dual_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::extract (any, <%= scoped_cxx_typecode %>, _struct); + return Any_Dual_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::extract (any, <%= scoped_cxx_typecode %>, _struct); } diff --git a/ridlbe/c++11/templates/cli/src/union_anyop.erb b/ridlbe/c++11/templates/cli/src/union_anyop.erb index 86104f93..109f898b 100644 --- a/ridlbe/c++11/templates/cli/src/union_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/union_anyop.erb @@ -3,38 +3,17 @@ /// Any insertion operator for <%= scoped_cxxname %> void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _union) { - Any_Dual_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::insert_copy (any, <%= scoped_cxx_typecode %>, _union); + Any_Dual_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert_copy (any, <%= scoped_cxx_typecode %>, _union); } /// Any insertion operator for <%= scoped_cxxname %> void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_move_type %> _union) { - Any_Dual_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::insert (any, <%= scoped_cxx_typecode %>, std::move(_union)); + Any_Dual_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert (any, <%= scoped_cxx_typecode %>, std::move(_union)); } /// Any extraction operator for <%= scoped_cxxname %> bool operator>>= (const TAOX11_CORBA::Any &any, <%= scoped_cxx_out_type %> _union) { - return Any_Dual_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::extract (any, <%= scoped_cxx_typecode %>, _union); + return Any_Dual_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::extract (any, <%= scoped_cxx_typecode %>, _union); } diff --git a/ridlbe/c++11/templates/cli/src/value_anyop.erb b/ridlbe/c++11/templates/cli/src/value_anyop.erb index a1a07615..48e8e149 100644 --- a/ridlbe/c++11/templates/cli/src/value_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/value_anyop.erb @@ -3,25 +3,11 @@ /// Any insertion operator for <%= scoped_cxxname %> void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _val) { - TAOX11_NAMESPACE::Any_Value_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); + TAOX11_NAMESPACE::Any_Value_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy%<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); } /// Any extraction operator for <%= scoped_cxxname %> bool operator>>= (const TAOX11_CORBA::Any &any, <%= scoped_cxx_out_type %> _val) { - return TAOX11_NAMESPACE::Any_Value_Impl_T< - IDL::traits<<%= scoped_cxxtype %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::extract (any, <%= scoped_cxx_typecode %>, _val); + return TAOX11_NAMESPACE::Any_Value_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::extract (any, <%= scoped_cxx_typecode %>, _val); } From e426b88fc9653f3f23716c905bbd3e6b7632152f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 11:25:58 +0200 Subject: [PATCH 55/94] layout changes and initial support for export of anytypecode * ridlbe/c++11/templates/cli/hdr/anyop.erb: * ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb: * ridlbe/c++11/templates/cli/prx/array_cdr.erb: * ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb: * ridlbe/c++11/templates/cli/prx/bitset_cdr.erb: * ridlbe/c++11/templates/cli/prx/enum_cdr.erb: * ridlbe/c++11/templates/cli/prx/except_cdr.erb: * ridlbe/c++11/templates/cli/prx/interface_cdr.erb: * ridlbe/c++11/templates/cli/prx/string_cdr.erb: * ridlbe/c++11/templates/cli/prx/struct_cdr.erb: * ridlbe/c++11/templates/cli/prx/union_cdr.erb: * ridlbe/c++11/templates/cli/prx/value_cdr.erb: * ridlbe/c++11/templates/cli/src/ami/interface_amic_cdr.erb: * ridlbe/c++11/templates/cli/src/enum_anyop.erb: * ridlbe/c++11/templates/cli/src/interface_anyop.erb: * ridlbe/c++11/templates/cli/src/interface_cdr.erb: * ridlbe/c++11/templates/cli/src/struct_anyop.erb: * ridlbe/c++11/templates/cli/src/union_anyop.erb: * ridlbe/c++11/templates/cli/src/value_anyop.erb: * ridlbe/c++11/templates/cli/src/value_cdr.erb: * ridlbe/c++11/visitorbase.rb: --- ridlbe/c++11/templates/cli/hdr/anyop.erb | 6 +++--- ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb | 9 +++------ ridlbe/c++11/templates/cli/prx/array_cdr.erb | 4 ++-- ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb | 4 ++-- ridlbe/c++11/templates/cli/prx/bitset_cdr.erb | 4 ++-- ridlbe/c++11/templates/cli/prx/enum_cdr.erb | 4 ++-- ridlbe/c++11/templates/cli/prx/except_cdr.erb | 4 ++-- ridlbe/c++11/templates/cli/prx/interface_cdr.erb | 8 ++++---- ridlbe/c++11/templates/cli/prx/string_cdr.erb | 4 ++-- ridlbe/c++11/templates/cli/prx/struct_cdr.erb | 4 ++-- ridlbe/c++11/templates/cli/prx/union_cdr.erb | 4 ++-- ridlbe/c++11/templates/cli/prx/value_cdr.erb | 4 ++-- .../templates/cli/src/ami/interface_amic_cdr.erb | 4 ++-- ridlbe/c++11/templates/cli/src/enum_anyop.erb | 4 ++-- ridlbe/c++11/templates/cli/src/interface_anyop.erb | 4 ++-- ridlbe/c++11/templates/cli/src/interface_cdr.erb | 8 ++++---- ridlbe/c++11/templates/cli/src/struct_anyop.erb | 6 +++--- ridlbe/c++11/templates/cli/src/union_anyop.erb | 6 +++--- ridlbe/c++11/templates/cli/src/value_anyop.erb | 4 ++-- ridlbe/c++11/templates/cli/src/value_cdr.erb | 8 ++------ ridlbe/c++11/visitorbase.rb | 12 ++++++++++++ 21 files changed, 60 insertions(+), 55 deletions(-) diff --git a/ridlbe/c++11/templates/cli/hdr/anyop.erb b/ridlbe/c++11/templates/cli/hdr/anyop.erb index a9f1d773..12b3212e 100644 --- a/ridlbe/c++11/templates/cli/hdr/anyop.erb +++ b/ridlbe/c++11/templates/cli/hdr/anyop.erb @@ -2,9 +2,9 @@ // generated from <%= ridl_template_path %> #if !defined (__TAOX11_ANYOP_<%= scoped_cxxname.to_include_guard %>_DECL__) #define __TAOX11_ANYOP_<%= scoped_cxxname.to_include_guard %>_DECL__ -<%= anytypecode_export_macro %>void operator<<= (TAOX11_CORBA::Any &, <%= scoped_cxx_in_type %>); +<%= anytypecode_export_macro %>void operator<<= (TAOX11_CORBA::Any&, <%= scoped_cxx_in_type %>); % unless (is_pod? || is_reference?) -<%= anytypecode_export_macro %>void operator<<= (TAOX11_CORBA::Any &, <%= scoped_cxx_move_type %>); +<%= anytypecode_export_macro %>void operator<<= (TAOX11_CORBA::Any&, <%= scoped_cxx_move_type %>); % end -<%= anytypecode_export_macro %>bool operator>>= (const TAOX11_CORBA::Any &, <%= scoped_cxx_out_type %>); +<%= anytypecode_export_macro %>bool operator>>= (const TAOX11_CORBA::Any&, <%= scoped_cxx_out_type %>); #endif diff --git a/ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb b/ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb index 3c71b15c..8fd5c0f2 100644 --- a/ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb +++ b/ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb @@ -7,12 +7,9 @@ #define _ALIAS_ANYOP_<%= alias_md5 %>_DECL_ #define _ALIAS_ANYOP_<%= scoped_cxxname.scope_to_cxxname %>_IMPL_ -<%= anytypecode_export_macro %> void -_any_cp_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any&, <%= scoped_cxx_in_type %>); -<%= anytypecode_export_macro %> void -_any_mv_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any&, <%= scoped_cxx_move_type %>); -<%= anytypecode_export_macro %> bool -_any_out_<%= scoped_cxxname.scope_to_cxxname %> (const TAOX11_CORBA::Any&, <%= scoped_cxx_out_type %>); +<%= anytypecode_export_macro %> void _any_cp_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any&, <%= scoped_cxx_in_type %>); +<%= anytypecode_export_macro %> void _any_mv_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any&, <%= scoped_cxx_move_type %>); +<%= anytypecode_export_macro %> bool _any_out_<%= scoped_cxxname.scope_to_cxxname %> (const TAOX11_CORBA::Any&, <%= scoped_cxx_out_type %>); /// Copying any insertion operator inline void operator<<= (TAOX11_CORBA::Any& any, <%= scoped_cxx_in_type %> _val) diff --git a/ridlbe/c++11/templates/cli/prx/array_cdr.erb b/ridlbe/c++11/templates/cli/prx/array_cdr.erb index eab5dd91..6fe257b2 100644 --- a/ridlbe/c++11/templates/cli/prx/array_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/array_cdr.erb @@ -16,11 +16,11 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -inline TAO_CORBA::Boolean operator<< (TAO_OutputCDR &cdr, const IDL::traits<<%= scoped_cxxtype %>>::value_type &v) +inline TAO_CORBA::Boolean operator<< (TAO_OutputCDR& cdr, const IDL::traits<<%= scoped_cxxtype %>>::value_type& v) { return taox11_array_cdr<<%= cxxdim_sizes.size-1 %>U, <%= scoped_cxxtype %>::value_type, <%= cxxdim_sizes.first %>>::insert (cdr, v); } -inline TAO_CORBA::Boolean operator>> (TAO_InputCDR &cdr, IDL::traits<<%= scoped_cxxtype %>>::value_type& v) +inline TAO_CORBA::Boolean operator>> (TAO_InputCDR& cdr, IDL::traits<<%= scoped_cxxtype %>>::value_type& v) { return taox11_array_cdr<<%= cxxdim_sizes.size-1 %>U, <%= scoped_cxxtype %>::value_type, <%= cxxdim_sizes.first %>>::extract (cdr, v); } diff --git a/ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb b/ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb index 3df48f71..e45a3399 100644 --- a/ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb @@ -15,8 +15,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); -<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/bitset_cdr.erb b/ridlbe/c++11/templates/cli/prx/bitset_cdr.erb index 632ddc43..2fece938 100644 --- a/ridlbe/c++11/templates/cli/prx/bitset_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/bitset_cdr.erb @@ -14,8 +14,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); -<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/enum_cdr.erb b/ridlbe/c++11/templates/cli/prx/enum_cdr.erb index 3df48f71..e45a3399 100644 --- a/ridlbe/c++11/templates/cli/prx/enum_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/enum_cdr.erb @@ -15,8 +15,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); -<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/except_cdr.erb b/ridlbe/c++11/templates/cli/prx/except_cdr.erb index 3c18b8c7..7bac6163 100644 --- a/ridlbe/c++11/templates/cli/prx/except_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/except_cdr.erb @@ -4,8 +4,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); -<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, const <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/interface_cdr.erb b/ridlbe/c++11/templates/cli/prx/interface_cdr.erb index f5370e38..6f0aa7a4 100644 --- a/ridlbe/c++11/templates/cli/prx/interface_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/interface_cdr.erb @@ -22,13 +22,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL % if is_abstract? %# Abstract interfaces %# -<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, <%= scoped_cxx_in_type %>); -<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxx_out_type %>); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, <%= scoped_cxx_in_type %>); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxx_out_type %>); % else %# Remote interfaces %# -<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &strm, <%= scoped_cxx_in_type %> _tao_objref); -<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &strm, <%= scoped_cxx_out_type %> _tao_objref); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR& strm, <%= scoped_cxx_in_type %> _tao_objref); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR& strm, <%= scoped_cxx_out_type %> _tao_objref); % end //@} diff --git a/ridlbe/c++11/templates/cli/prx/string_cdr.erb b/ridlbe/c++11/templates/cli/prx/string_cdr.erb index 556487a7..2d9d2e55 100644 --- a/ridlbe/c++11/templates/cli/prx/string_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/string_cdr.erb @@ -15,8 +15,8 @@ class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>> TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// CDR streaming methods for <%= scoped_cxxname %> -<%= stub_export_macro %>bool _cdr_in_<%= scoped_cxxname.scope_to_cxxname %> (TAO_OutputCDR &, const IDL::traits<<%= scoped_cxxtype %>>::value_type&); -<%= stub_export_macro %>bool _cdr_out_<%= scoped_cxxname.scope_to_cxxname %> (TAO_InputCDR &, IDL::traits<<%= scoped_cxxtype %>>::value_type&); +<%= client_proxy_export_macro %>bool _cdr_in_<%= scoped_cxxname.scope_to_cxxname %> (TAO_OutputCDR &, const IDL::traits<<%= scoped_cxxtype %>>::value_type&); +<%= client_proxy_export_macro %>bool _cdr_out_<%= scoped_cxxname.scope_to_cxxname %> (TAO_InputCDR &, IDL::traits<<%= scoped_cxxtype %>>::value_type&); #define _ALIAS_<%= scoped_cxxname.scope_to_cxxname %>_CDR_OPS_IMPL_ /// @name CDR streaming operator specializations for <%= scoped_cxxname %> diff --git a/ridlbe/c++11/templates/cli/prx/struct_cdr.erb b/ridlbe/c++11/templates/cli/prx/struct_cdr.erb index 3df48f71..3ed92eac 100644 --- a/ridlbe/c++11/templates/cli/prx/struct_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/struct_cdr.erb @@ -15,8 +15,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); -<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, const <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/union_cdr.erb b/ridlbe/c++11/templates/cli/prx/union_cdr.erb index 3df48f71..3ed92eac 100644 --- a/ridlbe/c++11/templates/cli/prx/union_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/union_cdr.erb @@ -15,8 +15,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); -<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, const <%= scoped_cxxname %>&); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/value_cdr.erb b/ridlbe/c++11/templates/cli/prx/value_cdr.erb index 16dad534..6b9eaae1 100644 --- a/ridlbe/c++11/templates/cli/prx/value_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/value_cdr.erb @@ -18,8 +18,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= stub_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, <%= scoped_cxx_in_type %>); -<%= stub_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxx_out_type %>); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, <%= scoped_cxx_in_type %>); +<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxx_out_type %>); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/src/ami/interface_amic_cdr.erb b/ridlbe/c++11/templates/cli/src/ami/interface_amic_cdr.erb index c143f47a..bf255e3a 100644 --- a/ridlbe/c++11/templates/cli/src/ami/interface_amic_cdr.erb +++ b/ridlbe/c++11/templates/cli/src/ami/interface_amic_cdr.erb @@ -1,13 +1,13 @@ // generated from <%= ridl_template_path %> /// CDR streaming operator specializations for <%= amic_scoped_cxxname %> -TAO_CORBA::Boolean operator<< (TAO_OutputCDR &strm, TAOX11_NAMESPACE::CORBA::amic_traits<<%= scoped_cxxname %>>::ref_type _tao_objref) +TAO_CORBA::Boolean operator<< (TAO_OutputCDR& strm, TAOX11_NAMESPACE::CORBA::amic_traits<<%= scoped_cxxname %>>::ref_type _tao_objref) { TAOX11_IDL::traits::ref_type _x11_obj { std::move(_tao_objref) }; return (strm << _x11_obj); } -TAO_CORBA::Boolean operator>> (TAO_InputCDR &strm, TAOX11_NAMESPACE::CORBA::amic_traits<<%= scoped_cxxname %>>::ref_type& _tao_objref) +TAO_CORBA::Boolean operator>> (TAO_InputCDR& strm, TAOX11_NAMESPACE::CORBA::amic_traits<<%= scoped_cxxname %>>::ref_type& _tao_objref) { TAO_CORBA::Object_var obj; if (!(strm >> obj.inout ())) diff --git a/ridlbe/c++11/templates/cli/src/enum_anyop.erb b/ridlbe/c++11/templates/cli/src/enum_anyop.erb index 12263581..aeff078a 100644 --- a/ridlbe/c++11/templates/cli/src/enum_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/enum_anyop.erb @@ -1,13 +1,13 @@ // generated from <%= ridl_template_path %> /// Any insertion operator for <%= scoped_cxxname %> -void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _val) +void operator<<= (TAOX11_CORBA::Any& any, <%= scoped_cxx_in_type %> _val) { TAOX11_NAMESPACE::Any_Basic_Impl_T>, TAOX11_NAMESPACE::CDR_Marshal_Policy>::insert (any, <%= scoped_cxx_typecode %>, _val); } /// Any extraction operator for <%= scoped_cxxname %> -bool operator>>= (const TAOX11_CORBA::Any &any, <%= scoped_cxx_out_type %> _val) +bool operator>>= (const TAOX11_CORBA::Any& any, <%= scoped_cxx_out_type %> _val) { return TAOX11_NAMESPACE::Any_Basic_Impl_T>, TAOX11_NAMESPACE::CDR_Marshal_Policy >::extract (any, <%= scoped_cxx_typecode %>, _val); } diff --git a/ridlbe/c++11/templates/cli/src/interface_anyop.erb b/ridlbe/c++11/templates/cli/src/interface_anyop.erb index 148f0d47..17c47fe2 100644 --- a/ridlbe/c++11/templates/cli/src/interface_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/interface_anyop.erb @@ -1,7 +1,7 @@ // generated from <%= ridl_template_path %> /// Any insertion operator for <%= scoped_cxxname %> -void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _val) +void operator<<= (TAOX11_CORBA::Any& any, <%= scoped_cxx_in_type %> _val) { % if is_abstract? TAOX11_NAMESPACE::Any_AbstractBase_Impl_T>, TAOX11_NAMESPACE::CDR_Marshal_Policy >::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); @@ -11,7 +11,7 @@ void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _val) } /// Any extraction operator for <%= scoped_cxxname %> -bool operator>>= (const TAOX11_CORBA::Any &any, <%= scoped_cxx_out_type %> _val) +bool operator>>= (const TAOX11_CORBA::Any& any, <%= scoped_cxx_out_type %> _val) { % if is_abstract? return TAOX11_NAMESPACE::Any_AbstractBase_Impl_T>, TAOX11_NAMESPACE::CDR_Marshal_Policy >::extract (any, <%= scoped_cxx_typecode %>, _val); diff --git a/ridlbe/c++11/templates/cli/src/interface_cdr.erb b/ridlbe/c++11/templates/cli/src/interface_cdr.erb index 20e92666..d634fd0d 100644 --- a/ridlbe/c++11/templates/cli/src/interface_cdr.erb +++ b/ridlbe/c++11/templates/cli/src/interface_cdr.erb @@ -4,24 +4,24 @@ %# Abstract interfaces %# /// Abstract interface CDR streaming operator specializations -TAO_CORBA::Boolean operator<< (TAO_OutputCDR &cdr, <%= scoped_cxx_in_type %> _absref) +TAO_CORBA::Boolean operator<< (TAO_OutputCDR& cdr, <%= scoped_cxx_in_type %> _absref) { return TAOX11_CORBA::AbstractBase::_abs_marshal (cdr, std::move(_absref)); } -TAO_CORBA::Boolean operator>> (TAO_InputCDR &cdr, <%= scoped_cxx_out_type %> _absref) +TAO_CORBA::Boolean operator>> (TAO_InputCDR& cdr, <%= scoped_cxx_out_type %> _absref) { return ::<%= scoped_cxxname %>::_abs_unmarshal (cdr, _absref); } % else /// CDR streaming operator specializations for <%= scoped_cxxname %> -TAO_CORBA::Boolean operator<< (TAO_OutputCDR &strm, <%= scoped_cxx_in_type %> _tao_objref) +TAO_CORBA::Boolean operator<< (TAO_OutputCDR& strm, <%= scoped_cxx_in_type %> _tao_objref) { TAOX11_IDL::traits::ref_type _x11_obj { std::move(_tao_objref) }; return (strm << _x11_obj); } -TAO_CORBA::Boolean operator>> (TAO_InputCDR &strm, <%= scoped_cxx_out_type %> _tao_objref) +TAO_CORBA::Boolean operator>> (TAO_InputCDR& strm, <%= scoped_cxx_out_type %> _tao_objref) { TAO_CORBA::Object_var obj; if (!(strm >> obj.inout ())) diff --git a/ridlbe/c++11/templates/cli/src/struct_anyop.erb b/ridlbe/c++11/templates/cli/src/struct_anyop.erb index 36197492..d8a0d02d 100644 --- a/ridlbe/c++11/templates/cli/src/struct_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/struct_anyop.erb @@ -1,19 +1,19 @@ // generated from <%= ridl_template_path %> /// Copying any insertion operator for <%= scoped_cxxname %> -void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _struct) +void operator<<= (TAOX11_CORBA::Any& any, <%= scoped_cxx_in_type %> _struct) { TAOX11_NAMESPACE::Any_Dual_Impl_T>, <% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert_copy (any, <%= scoped_cxx_typecode %>, _struct); } /// Non copying any insertion operator for <%= scoped_cxxname %> -void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_move_type %> _struct) +void operator<<= (TAOX11_CORBA::Any& any, <%= scoped_cxx_move_type %> _struct) { Any_Dual_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert (any, <%= scoped_cxx_typecode %>, std::move(_struct)); } /// Any extraction operator for <%= scoped_cxxname %> -bool operator>>= (const TAOX11_CORBA::Any &any, <%= scoped_cxx_out_type %> _struct) +bool operator>>= (const TAOX11_CORBA::Any& any, <%= scoped_cxx_out_type %> _struct) { return Any_Dual_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::extract (any, <%= scoped_cxx_typecode %>, _struct); } diff --git a/ridlbe/c++11/templates/cli/src/union_anyop.erb b/ridlbe/c++11/templates/cli/src/union_anyop.erb index 109f898b..636471a8 100644 --- a/ridlbe/c++11/templates/cli/src/union_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/union_anyop.erb @@ -1,19 +1,19 @@ // generated from <%= ridl_template_path %> /// Any insertion operator for <%= scoped_cxxname %> -void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _union) +void operator<<= (TAOX11_CORBA::Any& any, <%= scoped_cxx_in_type %> _union) { Any_Dual_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert_copy (any, <%= scoped_cxx_typecode %>, _union); } /// Any insertion operator for <%= scoped_cxxname %> -void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_move_type %> _union) +void operator<<= (TAOX11_CORBA::Any& any, <%= scoped_cxx_move_type %> _union) { Any_Dual_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert (any, <%= scoped_cxx_typecode %>, std::move(_union)); } /// Any extraction operator for <%= scoped_cxxname %> -bool operator>>= (const TAOX11_CORBA::Any &any, <%= scoped_cxx_out_type %> _union) +bool operator>>= (const TAOX11_CORBA::Any& any, <%= scoped_cxx_out_type %> _union) { return Any_Dual_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::extract (any, <%= scoped_cxx_typecode %>, _union); } diff --git a/ridlbe/c++11/templates/cli/src/value_anyop.erb b/ridlbe/c++11/templates/cli/src/value_anyop.erb index 48e8e149..895e5a69 100644 --- a/ridlbe/c++11/templates/cli/src/value_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/value_anyop.erb @@ -1,13 +1,13 @@ // generated from <%= ridl_template_path %> /// Any insertion operator for <%= scoped_cxxname %> -void operator<<= (TAOX11_CORBA::Any &any, <%= scoped_cxx_in_type %> _val) +void operator<<= (TAOX11_CORBA::Any& any, <%= scoped_cxx_in_type %> _val) { TAOX11_NAMESPACE::Any_Value_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy%<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); } /// Any extraction operator for <%= scoped_cxxname %> -bool operator>>= (const TAOX11_CORBA::Any &any, <%= scoped_cxx_out_type %> _val) +bool operator>>= (const TAOX11_CORBA::Any& any, <%= scoped_cxx_out_type %> _val) { return TAOX11_NAMESPACE::Any_Value_Impl_T>,<% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::extract (any, <%= scoped_cxx_typecode %>, _val); } diff --git a/ridlbe/c++11/templates/cli/src/value_cdr.erb b/ridlbe/c++11/templates/cli/src/value_cdr.erb index eb4dc129..43b5a11f 100644 --- a/ridlbe/c++11/templates/cli/src/value_cdr.erb +++ b/ridlbe/c++11/templates/cli/src/value_cdr.erb @@ -1,13 +1,9 @@ // generated from <%= ridl_template_path %> // CDR streaming operator specializations -TAO_CORBA::Boolean operator<< (TAO_OutputCDR &strm, <%= scoped_cxx_in_type %> _vbox) +TAO_CORBA::Boolean operator<< (TAO_OutputCDR& strm, <%= scoped_cxx_in_type %> _vbox) { - return - TAOX11_CORBA::ValueBase::_obv_marshal ( - strm, - std::move(_vbox), - reinterpret_cast (std::addressof(<%= scoped_cxxname %>::_obv_unmarshal))); + return TAOX11_CORBA::ValueBase::_obv_marshal (strm, std::move(_vbox), reinterpret_cast (std::addressof(<%= scoped_cxxname %>::_obv_unmarshal))); } TAO_CORBA::Boolean operator>> (TAO_InputCDR &strm, <%= scoped_cxx_out_type %> _vbox) diff --git a/ridlbe/c++11/visitorbase.rb b/ridlbe/c++11/visitorbase.rb index 04465075..56134f88 100644 --- a/ridlbe/c++11/visitorbase.rb +++ b/ridlbe/c++11/visitorbase.rb @@ -157,6 +157,18 @@ def anytypecode_export_macro params[:anytypecode_export_macro] ? params[:anytypecode_export_macro] + ' ' : self.stub_export_macro end + def client_proxy_export_include? + !params[:client_proxy_export_include].nil? + end + + def client_proxy_export_include + params[:client_proxy_export_include] + end + + def client_proxy_export_macro + params[:client_proxy_export_macro] ? params[:client_proxy_export_macro] + ' ' : self.stub_export_macro + end + def skel_export_include? !(params[:skel_export_include] || params[:export_include]).nil? && params[:svnt_skeletons] end From cc2ca117f918b77744c62d6dd85115c0d00c450e Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 11:34:30 +0200 Subject: [PATCH 56/94] Layout changes * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/writers/stubsource.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 06521076..32961ad2 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -476,8 +476,7 @@ def pre_visit(parser) def post_visit(parser) dec_nest - println - println(' } // namespace TAOX11_NAMESPACE::CORBA') + println('} // namespace TAOX11_NAMESPACE::CORBA') super end From ddf2ab7c835fab344fb9780666c406e13f2680a6 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 11:45:49 +0200 Subject: [PATCH 57/94] Add -Guia for the union std::invalid_argument * docs/src/ridlc.adoc: * ridlbe/c++11/config.rb: * ridlbe/c++11/visitors/union.rb: --- docs/src/ridlc.adoc | 6 ++++++ ridlbe/c++11/config.rb | 2 ++ ridlbe/c++11/visitors/union.rb | 3 +-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/src/ridlc.adoc b/docs/src/ridlc.adoc index 580a2260..ca0ff7f5 100644 --- a/docs/src/ridlc.adoc +++ b/docs/src/ridlc.adoc @@ -362,6 +362,12 @@ Generate std::ostream insertion operators (not generated by default)| off +||-Guia| + +Generate std::invalid_argument exception as part of our union generation (CORBA::BAD_PARAM by default)| + +off + ||-Gtie| Generate delegation based servant implementation support (not generated by default)| diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 9c72ba96..145aac06 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -126,6 +126,8 @@ def self.add_extended_options(ol, _idl_params) description: "-Glons\t\t\tGenerate declaration for an object_traits<>::narrow specialization for local objects (not generated by default)" }, 'os' => { option_name: :gen_ostream_operators, description: "-Gos\t\t\tGenerate std::ostream insertion operators (not generated by default)" }, + 'uia' => { option_name: :gen_union_invalid_argument, + description: "-Guia\t\t\tGenerate std::invalid_argument for union API misusage (CORBA::BAD_PARAM by default)" }, 'tie' => { option_name: :gen_tie, description: "-Gtie\t\t\tGenerate delegation based servant implementation support (not generated by default)" }, 'xh' => { option_name: :gen_export, diff --git a/ridlbe/c++11/visitors/union.rb b/ridlbe/c++11/visitors/union.rb index da502417..53530134 100644 --- a/ridlbe/c++11/visitors/union.rb +++ b/ridlbe/c++11/visitors/union.rb @@ -123,8 +123,7 @@ def switchtype end def invalid_argument_exception - # todo, add ridlc argument, also make a distinction which include to add - if params[:client_proxy_source] + if params[:client_proxy_source] || params[:gen_union_invalid_argument] 'std::invalid_argument ("")' else 'TAOX11_NAMESPACE::CORBA::BAD_PARAM ()' From ded00e1f586f70f405a499138130e894c10ebff1 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 11:52:22 +0200 Subject: [PATCH 58/94] Correct flags * ridlbe/c++11/config.rb: --- ridlbe/c++11/config.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 145aac06..5b254760 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -162,9 +162,9 @@ def self.add_extended_options(ol, _idl_params) 'impl' => { option_name: :export_impl, description: "-Ximpl\t\t\tExport implementation code (not exported by default)" }, 'cp' => { option_name: :export_client_proxy, - description: "-Xpr\t\t\tExport client proxy code (not exported by default)" }, + description: "-Xcp\t\t\tExport client proxy code (not exported by default)" }, 'at' => { option_name: :export_anytypecode, - description: "-Xpr\t\t\tExport Any and Typecode code (not exported by default)" }, + description: "-Xat\t\t\tExport Any and Typecode code (not exported by default)" }, } end From b97abfbe2dcbad64de4a04b0805be66195144223 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 12:19:49 +0200 Subject: [PATCH 59/94] Correct help * ridlbe/c++11/config.rb: --- ridlbe/c++11/config.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 5b254760..63f8ee1a 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -141,9 +141,9 @@ def self.add_extended_options(ol, _idl_params) 'xhimpl' => { option_name: :gen_export_impl, description: "-Gxhimpl\t\t\tGenerate export header file for implementation code (not generated by default)" }, 'xhcp' => { option_name: :gen_export_client_proxy, - description: "-Gxhpr\t\t\tGenerate export header file for client proxy (not generated by default)" }, + description: "-Gxhcp\t\t\tGenerate export header file for client proxy (not generated by default)" }, 'xhat' => { option_name: :gen_export_anytypecode, - description: "-Gxhpr\t\t\tGenerate export header file for Any and TypeCode support (not generated by default)" }, + description: "-Gxhat\t\t\tGenerate export header file for Any and TypeCode support (not generated by default)" }, 'isrv' => { option_name: :gen_impl_servant, description: "-Gisrv\t\t\tGenerate implementation classes for servants (not generated by default; ignored with -SS or --stubs-only)" }, 'cpc' => { option_name: :client_proxy_source, From 6adebaa43427c9d06abac33aab0cbc0f67744c4d Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 13:08:44 +0200 Subject: [PATCH 60/94] Check correct flags * ridlbe/c++11/config.rb: * ridlbe/c++11/templates/cli/hdr/post.erb: * ridlbe/c++11/templates/cli/src/interface_proxy.erb: * ridlbe/c++11/templates/cli/src/pre.erb: * ridlbe/c++11/visitorbase.rb: * ridlbe/c++11/visitors/union.rb: * ridlbe/c++11/writers/stubheader.rb: * ridlbe/c++11/writers/stubsource.rb: * tao/x11/stub_arg_traits.h: --- ridlbe/c++11/config.rb | 4 ++-- ridlbe/c++11/templates/cli/hdr/post.erb | 2 +- .../templates/cli/src/interface_proxy.erb | 6 +---- ridlbe/c++11/templates/cli/src/pre.erb | 2 -- ridlbe/c++11/visitorbase.rb | 2 +- ridlbe/c++11/visitors/union.rb | 2 +- ridlbe/c++11/writers/stubheader.rb | 6 ++--- ridlbe/c++11/writers/stubsource.rb | 23 ++++++++++--------- tao/x11/stub_arg_traits.h | 6 ++--- 9 files changed, 23 insertions(+), 30 deletions(-) diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 63f8ee1a..ff8685fd 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -146,7 +146,7 @@ def self.add_extended_options(ol, _idl_params) description: "-Gxhat\t\t\tGenerate export header file for Any and TypeCode support (not generated by default)" }, 'isrv' => { option_name: :gen_impl_servant, description: "-Gisrv\t\t\tGenerate implementation classes for servants (not generated by default; ignored with -SS or --stubs-only)" }, - 'cpc' => { option_name: :client_proxy_source, + 'cpc' => { option_name: :gen_client_proxy_source, description: "-Gcpc\t\t\tGenerate implementation of client proxy is separate *CP.cpp file (not generated by default)" }, } end @@ -522,7 +522,7 @@ def self.generate_client_stubs(options) IDL.push_production(:stub_proxy_header, ::IDL::Cxx11::StubProxyHeaderWriter.new(co_prx, options)) end end - if options[:client_proxy_source] + if options[:gen_client_proxy_source] if options[:output_client_proxy_source] co_prx = GenFile.new(options[:output_client_proxy_source]) IDL.push_production(:stub_proxy_source, ::IDL::Cxx11::StubProxySourceWriter.new(co_prx, options)) diff --git a/ridlbe/c++11/templates/cli/hdr/post.erb b/ridlbe/c++11/templates/cli/hdr/post.erb index 6eedad84..b6193c4f 100644 --- a/ridlbe/c++11/templates/cli/hdr/post.erb +++ b/ridlbe/c++11/templates/cli/hdr/post.erb @@ -1,7 +1,7 @@ // generated from <%= ridl_template_path %> %unless no_client_proxy_hdr? -#if defined (__TAOX11_INCLUDE_STUB_PROXY__) +#if defined (__TAOX11_INCLUDE_STUB_PROXY__) && __has_include("<%= client_proxy_hdr %>") # include "<%= client_proxy_hdr %>" #endif %end diff --git a/ridlbe/c++11/templates/cli/src/interface_proxy.erb b/ridlbe/c++11/templates/cli/src/interface_proxy.erb index ebd7ab1f..95a99a00 100644 --- a/ridlbe/c++11/templates/cli/src/interface_proxy.erb +++ b/ridlbe/c++11/templates/cli/src/interface_proxy.erb @@ -1,10 +1,6 @@ // generated from <%= ridl_template_path %> -<%= proxy_cxxname %>::<%= proxy_cxxname %> ( - TAO_Stub *objref, - TAO_CORBA::Boolean _tao_collocated, - TAO_Abstract_ServantBase *servant, - TAO_ORB_Core *oc) : +<%= proxy_cxxname %>::<%= proxy_cxxname %> (TAO_Stub *objref, TAO_CORBA::Boolean _tao_collocated, TAO_Abstract_ServantBase *servant, TAO_ORB_Core *oc) : TAO_CORBA::Object (objref, _tao_collocated, servant, oc) % if is_derived? % _bases = ancestors.dup.find_all { |_a| !_a.is_abstract? } diff --git a/ridlbe/c++11/templates/cli/src/pre.erb b/ridlbe/c++11/templates/cli/src/pre.erb index 0747a477..50b056e2 100644 --- a/ridlbe/c++11/templates/cli/src/pre.erb +++ b/ridlbe/c++11/templates/cli/src/pre.erb @@ -6,9 +6,7 @@ * https://www.remedy.nl */ -% unless client_proxy_src? #define __TAOX11_INCLUDE_STUB_PROXY__ -% end % pre_includes.each do |incfile| #include "<%= incfile %>" diff --git a/ridlbe/c++11/visitorbase.rb b/ridlbe/c++11/visitorbase.rb index 56134f88..ce72987c 100644 --- a/ridlbe/c++11/visitorbase.rb +++ b/ridlbe/c++11/visitorbase.rb @@ -50,7 +50,7 @@ def no_client_proxy_hdr? end def client_proxy_src? - params[:client_proxy_source] + params[:gen_client_proxy_source] end def anytypecode_hdr? diff --git a/ridlbe/c++11/visitors/union.rb b/ridlbe/c++11/visitors/union.rb index 53530134..7e167ce5 100644 --- a/ridlbe/c++11/visitors/union.rb +++ b/ridlbe/c++11/visitors/union.rb @@ -123,7 +123,7 @@ def switchtype end def invalid_argument_exception - if params[:client_proxy_source] || params[:gen_union_invalid_argument] + if params[:gen_client_proxy_source] || params[:gen_union_invalid_argument] 'std::invalid_argument ("")' else 'TAOX11_NAMESPACE::CORBA::BAD_PARAM ()' diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index 6ced1c9c..6d860d75 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -31,7 +31,7 @@ def initialize(output = STDOUT, opts = {}) 'tao/x11/basic_traits.h' ] - @default_pre_includes << 'tao/x11/corba.h' unless params[:client_proxy_source] + @default_pre_includes << 'tao/x11/corba.h' unless params[:gen_client_proxy_source] @default_post_includes = [] unless params[:output_anytypecode_header] @@ -449,8 +449,8 @@ def enter_struct(node) end def enter_union(node) - add_include('tao/x11/system_exception.h') unless params[:client_proxy_source] - add_pre_include('stdexcept') if params[:client_proxy_source] + add_include('tao/x11/system_exception.h') unless params[:gen_client_proxy_source] + add_pre_include('stdexcept') if params[:gen_client_proxy_source] node.members.each { |m| check_idl_type(m.idltype) } end diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 32961ad2..026da4d5 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -29,7 +29,7 @@ def initialize(output = STDOUT, opts = {}) @proxy_impl = false @default_pre_includes = [] - unless params[:no_cdr_streaming] || params[:client_proxy_source] + unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] @default_pre_includes << 'tao/CDR.h' end if params[:gen_typecodes] && !params[:gen_anytypecode_source] @@ -40,7 +40,7 @@ def initialize(output = STDOUT, opts = {}) @default_pre_includes << 'tao/AnyTypeCode/Any_Impl_T.h' end @default_post_includes = [] - @default_post_includes << 'tao/x11/tao_corba.h' unless params[:client_proxy_source] + @default_post_includes << 'tao/x11/tao_corba.h' unless params[:gen_client_proxy_source] @default_post_includes << 'tao/x11/anytypecode/typecode.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source] @default_post_includes << 'tao/x11/anytypecode/typecode_impl.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source] end @@ -55,7 +55,7 @@ def pre_visit(parser) def post_visit(parser) # stub proxy implementations - visit_proxy_implementation(parser) if @proxy_impl && !params[:client_proxy_source] + visit_proxy_implementation(parser) if @proxy_impl && !params[:gen_client_proxy_source] visit_anyops(parser) if params[:gen_any_ops] && !params[:gen_anytypecode_source] @@ -64,11 +64,11 @@ def post_visit(parser) visit_object_traits_specializations(parser) # Object ref traits specializations - visit_proxy_object_ref_traits_specializations(parser) unless params[:no_client_proxy_hdr] + visit_proxy_object_ref_traits_specializations(parser) unless params[:no_client_proxy_hdr] || params[:gen_client_proxy_source] end # CDR operators - visit_cdr(parser) unless params[:client_proxy_source] + visit_cdr(parser) unless params[:gen_client_proxy_source] super visitor(PostVisitor).visit @@ -175,7 +175,7 @@ def visit_object_traits_specializations(parser) end def visit_proxy_implementation(parser) - writer(StubProxySourceProxyImplWriter).visit_nodes(parser) unless params[:client_proxy_source] + writer(StubProxySourceProxyImplWriter).visit_nodes(parser) unless params[:gen_client_proxy_source] end def visit_proxy_object_ref_traits_specializations(parser) @@ -227,6 +227,7 @@ def enter_interface(node) return if node.is_local? || node.is_pseudo? || node.is_abstract? add_post_include('tao/x11/objproxy.h') + check_idl_type(node.idltype) end @@ -377,21 +378,21 @@ def check_idl_type(idl_type) IDL::Type::Boolean, IDL::Type::WChar, IDL::Type::Octet - add_include('tao/x11/special_basic_arguments.h') unless params[:no_cdr_streaming] || params[:client_proxy_source] + add_include('tao/x11/special_basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] when IDL::Type::LongDouble - add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:client_proxy_source] + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] when IDL::Type::Integer, IDL::Type::Double, IDL::Type::Float, IDL::Type::Void - add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:client_proxy_source] + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] when IDL::Type::String, IDL::Type::WString - add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:client_proxy_source] + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] when IDL::Type::Object, IDL::Type::Interface, IDL::Type::Component - add_include('tao/x11/stub_arg_traits.h') unless params[:no_cdr_streaming] || params[:client_proxy_source] + add_include('tao/x11/stub_arg_traits.h') unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] when IDL::Type::Sequence # arg template included in P.h check_idl_type(idl_type.basetype) diff --git a/tao/x11/stub_arg_traits.h b/tao/x11/stub_arg_traits.h index 6303b667..28f881b1 100644 --- a/tao/x11/stub_arg_traits.h +++ b/tao/x11/stub_arg_traits.h @@ -37,10 +37,8 @@ namespace TAOX11_NAMESPACE TAO_BEGIN_VERSIONED_NAMESPACE_DECL // CDR streaming operator specializations -TAOX11_Export TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, - TAOX11_CORBA::object_traits::ref_type); -TAOX11_Export TAO_CORBA::Boolean operator>> (TAO_InputCDR &, - TAOX11_CORBA::object_traits::ref_type&); +TAOX11_Export TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, TAOX11_CORBA::object_traits::ref_type); +TAOX11_Export TAO_CORBA::Boolean operator>> (TAO_InputCDR &, TAOX11_CORBA::object_traits::ref_type&); TAO_END_VERSIONED_NAMESPACE_DECL From cd09faed7706d33913f41477f552a0bdb4fd5cb3 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 13:11:57 +0200 Subject: [PATCH 61/94] Include fixes for proxy source * ridlbe/c++11/writers/stubproxysource.rb: --- ridlbe/c++11/writers/stubproxysource.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index a45038e1..84f6a042 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -49,10 +49,8 @@ def enter_valuetype(node) end def pre_visit(parser) - properties[:pre_includes] = @default_pre_includes - properties[:post_includes] = @default_post_includes - properties[:includes] = [] - visitor(PreVisitor).visit + visit_includes(parser) + super end @@ -252,6 +250,7 @@ def post_visit(_parser) properties[:pre_includes] = @default_pre_includes properties[:post_includes] = @default_post_includes properties[:includes] = @includes + visitor(PreVisitor).visit end def enter_interface(node) From 97e62ecd7da5a2e7fd0be9b8ec0e3877e016b7cb Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 14:43:04 +0200 Subject: [PATCH 62/94] Changed define generation * ridlbe/c++11/templates/cli/hdr/post.erb: * ridlbe/c++11/templates/cli/src/pre.erb: * ridlbe/c++11/writers/stubproxysource.rb: * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/templates/cli/hdr/post.erb | 2 +- ridlbe/c++11/templates/cli/src/pre.erb | 2 -- ridlbe/c++11/writers/stubproxysource.rb | 7 +++++++ ridlbe/c++11/writers/stubsource.rb | 8 +++++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ridlbe/c++11/templates/cli/hdr/post.erb b/ridlbe/c++11/templates/cli/hdr/post.erb index b6193c4f..6eedad84 100644 --- a/ridlbe/c++11/templates/cli/hdr/post.erb +++ b/ridlbe/c++11/templates/cli/hdr/post.erb @@ -1,7 +1,7 @@ // generated from <%= ridl_template_path %> %unless no_client_proxy_hdr? -#if defined (__TAOX11_INCLUDE_STUB_PROXY__) && __has_include("<%= client_proxy_hdr %>") +#if defined (__TAOX11_INCLUDE_STUB_PROXY__) # include "<%= client_proxy_hdr %>" #endif %end diff --git a/ridlbe/c++11/templates/cli/src/pre.erb b/ridlbe/c++11/templates/cli/src/pre.erb index 50b056e2..568c53ae 100644 --- a/ridlbe/c++11/templates/cli/src/pre.erb +++ b/ridlbe/c++11/templates/cli/src/pre.erb @@ -6,8 +6,6 @@ * https://www.remedy.nl */ -#define __TAOX11_INCLUDE_STUB_PROXY__ - % pre_includes.each do |incfile| #include "<%= incfile %>" % end diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 84f6a042..e2f64a90 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -10,6 +10,12 @@ module IDL module Cxx11 + class IncludeStubProxyDefineVisitor < VisitorBase + def visit + visit_template(:include_stub_proxy_define) + end + end + class StubProxySourceBaseWriter < CxxCodeWriterBase def initialize(output = STDOUT, opts = {}) super @@ -250,6 +256,7 @@ def post_visit(_parser) properties[:pre_includes] = @default_pre_includes properties[:post_includes] = @default_post_includes properties[:includes] = @includes + visitor(IncludeStubProxyDefineVisitor).visit visitor(PreVisitor).visit end diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 026da4d5..ab4cb6c8 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -10,6 +10,12 @@ module IDL module Cxx11 + class IncludeStubProxyDefineVisitor < VisitorBase + def visit + visit_template(:include_stub_proxy_define) + end + end + class StubSourceBaseWriter < CxxCodeWriterBase def initialize(output = STDOUT, opts = {}) super @@ -213,6 +219,7 @@ def post_visit(_parser) properties[:pre_includes] = @default_pre_includes properties[:post_includes] = @default_post_includes properties[:includes] = @includes + visitor(IncludeStubProxyDefineVisitor).visit unless params[:gen_client_proxy_source] visitor(PreVisitor).visit end @@ -460,7 +467,6 @@ def enter_valuetype(node) end end - class StubSourceAnyOpWriter < StubSourceBaseWriter def initialize(output = STDOUT, opts = {}) super From 6f3169d1a0b911c7847922b79158663676aa693c Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 15:02:29 +0200 Subject: [PATCH 63/94] New file --- ridlbe/c++11/templates/cli/src/include_stub_proxy_define.erb | 1 + 1 file changed, 1 insertion(+) create mode 100644 ridlbe/c++11/templates/cli/src/include_stub_proxy_define.erb diff --git a/ridlbe/c++11/templates/cli/src/include_stub_proxy_define.erb b/ridlbe/c++11/templates/cli/src/include_stub_proxy_define.erb new file mode 100644 index 00000000..05a357a6 --- /dev/null +++ b/ridlbe/c++11/templates/cli/src/include_stub_proxy_define.erb @@ -0,0 +1 @@ +#define __TAOX11_INCLUDE_STUB_PROXY__ From 182e7fa13840a0bf528f59b42ef38f7a136685be Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 15:07:32 +0200 Subject: [PATCH 64/94] Separate header visitor * ridlbe/c++11/templates/cli/src/header.erb: Added. * ridlbe/c++11/templates/cli/src/pre.erb: * ridlbe/c++11/visitors/pre_post.rb: * ridlbe/c++11/writers/stubproxysource.rb: * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/templates/cli/src/header.erb | 7 +++++++ ridlbe/c++11/templates/cli/src/pre.erb | 8 -------- ridlbe/c++11/visitors/pre_post.rb | 6 ++++++ ridlbe/c++11/writers/stubproxysource.rb | 1 + ridlbe/c++11/writers/stubsource.rb | 1 + 5 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 ridlbe/c++11/templates/cli/src/header.erb diff --git a/ridlbe/c++11/templates/cli/src/header.erb b/ridlbe/c++11/templates/cli/src/header.erb new file mode 100644 index 00000000..c3b5da61 --- /dev/null +++ b/ridlbe/c++11/templates/cli/src/header.erb @@ -0,0 +1,7 @@ +/** + * **** Code generated by the RIDL Compiler **** + * RIDL has been developed by: + * Remedy IT Expertise BV + * The Netherlands + * https://www.remedy.nl + */ diff --git a/ridlbe/c++11/templates/cli/src/pre.erb b/ridlbe/c++11/templates/cli/src/pre.erb index 568c53ae..0aad67c1 100644 --- a/ridlbe/c++11/templates/cli/src/pre.erb +++ b/ridlbe/c++11/templates/cli/src/pre.erb @@ -1,11 +1,3 @@ -/** - * **** Code generated by the RIDL Compiler **** - * RIDL has been developed by: - * Remedy IT Expertise BV - * The Netherlands - * https://www.remedy.nl - */ - % pre_includes.each do |incfile| #include "<%= incfile %>" % end diff --git a/ridlbe/c++11/visitors/pre_post.rb b/ridlbe/c++11/visitors/pre_post.rb index d8303c2f..c81815fb 100644 --- a/ridlbe/c++11/visitors/pre_post.rb +++ b/ridlbe/c++11/visitors/pre_post.rb @@ -20,5 +20,11 @@ def visit visit_template(:post) end end + + class HeaderVisitor < VisitorBase + def visit + visit_template(:header) + end + end end end diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index e2f64a90..5a4e2a7d 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -256,6 +256,7 @@ def post_visit(_parser) properties[:pre_includes] = @default_pre_includes properties[:post_includes] = @default_post_includes properties[:includes] = @includes + visitor(HeaderVisitor).visit visitor(IncludeStubProxyDefineVisitor).visit visitor(PreVisitor).visit end diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index ab4cb6c8..e8129e39 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -219,6 +219,7 @@ def post_visit(_parser) properties[:pre_includes] = @default_pre_includes properties[:post_includes] = @default_post_includes properties[:includes] = @includes + visitor(HeaderVisitor).visit visitor(IncludeStubProxyDefineVisitor).visit unless params[:gen_client_proxy_source] visitor(PreVisitor).visit end From d3ba15ae2be5f37aca47599715fd40df3c8b2982 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 15:14:22 +0200 Subject: [PATCH 65/94] Move header to own file --- ridlbe/c++11/visitors/header.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ridlbe/c++11/visitors/header.rb diff --git a/ridlbe/c++11/visitors/header.rb b/ridlbe/c++11/visitors/header.rb new file mode 100644 index 00000000..451f8841 --- /dev/null +++ b/ridlbe/c++11/visitors/header.rb @@ -0,0 +1,18 @@ +#-------------------------------------------------------------------- +# @file header.rb +# @author Johnny Willemsen +# +# @brief visitor class +# +# @copyright Copyright (c) Remedy IT Expertise BV +#-------------------------------------------------------------------- + +module IDL + module Cxx11 + class HeaderVisitor < VisitorBase + def visit + visit_template(:header) + end + end + end +end From b4f1ad0cbd93e2dcc6ec24d1cd76011c3d822502 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 15:18:29 +0200 Subject: [PATCH 66/94] Fix AMI * ridlbe/c++11/visitors/pre_post.rb: * ridlbe/c++11/writers/amistubsource.rb: * ridlbe/c++11/writers/stubsource.rb: --- ridlbe/c++11/visitors/pre_post.rb | 6 ------ ridlbe/c++11/writers/amistubsource.rb | 2 ++ ridlbe/c++11/writers/stubsource.rb | 6 ------ 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/ridlbe/c++11/visitors/pre_post.rb b/ridlbe/c++11/visitors/pre_post.rb index c81815fb..d8303c2f 100644 --- a/ridlbe/c++11/visitors/pre_post.rb +++ b/ridlbe/c++11/visitors/pre_post.rb @@ -20,11 +20,5 @@ def visit visit_template(:post) end end - - class HeaderVisitor < VisitorBase - def visit - visit_template(:header) - end - end end end diff --git a/ridlbe/c++11/writers/amistubsource.rb b/ridlbe/c++11/writers/amistubsource.rb index 1fcf8b80..c5fff594 100644 --- a/ridlbe/c++11/writers/amistubsource.rb +++ b/ridlbe/c++11/writers/amistubsource.rb @@ -242,6 +242,8 @@ def post_visit(_parser) properties[:pre_includes] = @default_pre_includes properties[:post_includes] = @default_post_includes properties[:includes] = @includes + visitor(HeaderVisitor).visit + visitor(IncludeStubProxyDefineVisitor).visit visitor(PreVisitor) do |v| ### # Overloads for this visitor only. diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index e8129e39..5fcb89bd 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -10,12 +10,6 @@ module IDL module Cxx11 - class IncludeStubProxyDefineVisitor < VisitorBase - def visit - visit_template(:include_stub_proxy_define) - end - end - class StubSourceBaseWriter < CxxCodeWriterBase def initialize(output = STDOUT, opts = {}) super From 126eaa914143aac882b141215e38594526d5f05d Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 15:59:48 +0200 Subject: [PATCH 67/94] Changes to get ciaox11 test to work * ridlbe/c++11/templates/cli/hdr/post.erb: * ridlbe/c++11/writers/anytypecodehdr.rb: * ridlbe/c++11/writers/stubsource.rb: * tests/proxysource/proxysource.mpc: --- ridlbe/c++11/templates/cli/hdr/post.erb | 2 +- ridlbe/c++11/writers/anytypecodehdr.rb | 12 +----------- ridlbe/c++11/writers/stubsource.rb | 2 +- tests/proxysource/proxysource.mpc | 2 +- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/ridlbe/c++11/templates/cli/hdr/post.erb b/ridlbe/c++11/templates/cli/hdr/post.erb index 6eedad84..c46e20bc 100644 --- a/ridlbe/c++11/templates/cli/hdr/post.erb +++ b/ridlbe/c++11/templates/cli/hdr/post.erb @@ -1,7 +1,7 @@ // generated from <%= ridl_template_path %> %unless no_client_proxy_hdr? -#if defined (__TAOX11_INCLUDE_STUB_PROXY__) +#if !defined (TAOX11_DISABLE_INCLUDE_STUB_PROXY_HDR) && defined (__TAOX11_INCLUDE_STUB_PROXY__) && __has_include("<%= client_proxy_hdr %>") # include "<%= client_proxy_hdr %>" #endif %end diff --git a/ridlbe/c++11/writers/anytypecodehdr.rb b/ridlbe/c++11/writers/anytypecodehdr.rb index 5d42a1da..d44e7de0 100644 --- a/ridlbe/c++11/writers/anytypecodehdr.rb +++ b/ridlbe/c++11/writers/anytypecodehdr.rb @@ -27,17 +27,7 @@ class AnyTypeCodeHeaderWriter < AnyTypeCodeHeaderBaseWriter def initialize(output = STDOUT, opts = {}) super @default_pre_includes = [] - @default_post_includes = [ - 'tao/x11/system_exception_x11.h', - 'tao/x11/exception_macros.h' - ] - if params[:gen_any_ops] - @default_post_includes << 'tao/x11/anytypecode/any.h' - end - if params[:gen_typecodes] - @default_post_includes << 'tao/x11/anytypecode/typecode.h' - @default_post_includes << 'tao/x11/anytypecode/typecode_constants.h' - end + @default_post_includes = [] @include_guard = "__RIDL_#{File.basename(params[:output_anytypecode_header] || '').to_random_include_guard}_INCLUDED__" end diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 5fcb89bd..022e357e 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -214,7 +214,7 @@ def post_visit(_parser) properties[:post_includes] = @default_post_includes properties[:includes] = @includes visitor(HeaderVisitor).visit - visitor(IncludeStubProxyDefineVisitor).visit unless params[:gen_client_proxy_source] + visitor(IncludeStubProxyDefineVisitor).visit visitor(PreVisitor).visit end diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index e9f8cdb5..8a1147a9 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -18,7 +18,7 @@ project(*proxysource_gen_Client) { testC.cpp } includes += $(TAOX11_ROOT) - macros += TAOX11_DISABLE_INCLUDE_ANYTYPECODE + macros += TAOX11_DISABLE_INCLUDE_ANYTYPECODE TAOX11_DISABLE_INCLUDE_STUB_PROXY_HDR } project(*proxysource_taox11_Client): taox11_client, taox11_anytypecode { From fcd3bc4f1952bd225da51a999b21f0e441094996 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 19:29:45 +0200 Subject: [PATCH 68/94] Add CP.cpp * .gitignore: --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a1fa577e..3e4a5f44 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ ACE *C.inl *C.cpp *P.h +*P.cpp *S.h *S.inl *S.cpp From de83fafcea5c67022ed4fb9ba40463e1df91aa29 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 9 Apr 2024 19:51:08 +0200 Subject: [PATCH 69/94] Fix compile error for normal case * ridlbe/c++11/templates/cli/hdr/pre.erb: * ridlbe/c++11/templates/cli/src/include_stub_proxy_define.erb: * ridlbe/c++11/templates/cli/src/pre.erb: * tests/hello/hello.mpc: * tests/proxysource/proxysource.mpc: --- ridlbe/c++11/templates/cli/hdr/pre.erb | 3 +++ .../cli/src/include_stub_proxy_define.erb | 2 ++ ridlbe/c++11/templates/cli/src/pre.erb | 7 ++++++ tests/hello/hello.mpc | 1 + tests/proxysource/proxysource.mpc | 23 ++++++++++--------- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/ridlbe/c++11/templates/cli/hdr/pre.erb b/ridlbe/c++11/templates/cli/hdr/pre.erb index aef6d387..60016ccf 100644 --- a/ridlbe/c++11/templates/cli/hdr/pre.erb +++ b/ridlbe/c++11/templates/cli/hdr/pre.erb @@ -19,6 +19,9 @@ % if pre_include? #include /**/ "<%= pre_include %>" % end +#if __has_include("tao/x11/tao_corba.h") +# include "tao/x11/tao_corba.h" +#endif % if unique_include? #include "<%= unique_include %>" % else diff --git a/ridlbe/c++11/templates/cli/src/include_stub_proxy_define.erb b/ridlbe/c++11/templates/cli/src/include_stub_proxy_define.erb index 05a357a6..8cc2c8a6 100644 --- a/ridlbe/c++11/templates/cli/src/include_stub_proxy_define.erb +++ b/ridlbe/c++11/templates/cli/src/include_stub_proxy_define.erb @@ -1 +1,3 @@ + #define __TAOX11_INCLUDE_STUB_PROXY__ + diff --git a/ridlbe/c++11/templates/cli/src/pre.erb b/ridlbe/c++11/templates/cli/src/pre.erb index 0aad67c1..504c9f1c 100644 --- a/ridlbe/c++11/templates/cli/src/pre.erb +++ b/ridlbe/c++11/templates/cli/src/pre.erb @@ -1,14 +1,21 @@ +%unless pre_includes.empty? + % pre_includes.each do |incfile| #include "<%= incfile %>" % end +%end +%unless includes.empty? % includes.each do |incfile| #include "<%= incfile %>" % end +%end +%unless post_includes.empty? % post_includes.each do |incfile| #include "<%= incfile %>" % end +%end % if safe_include? #include "<%= safe_include %>" diff --git a/tests/hello/hello.mpc b/tests/hello/hello.mpc index 7fad98bf..fd201fe3 100644 --- a/tests/hello/hello.mpc +++ b/tests/hello/hello.mpc @@ -2,6 +2,7 @@ project(*x11_Idl): ridl_ostream_defaults { idlflags += -Sp + idlflags -= -Sa -St IDL_Files { test.idl } diff --git a/tests/proxysource/proxysource.mpc b/tests/proxysource/proxysource.mpc index 8a1147a9..e14c0196 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/proxysource/proxysource.mpc @@ -9,17 +9,18 @@ project(*proxysource_gen_Idl): ridl_ostream_defaults { custom_only = 1 } -project(*proxysource_gen_Client) { - after += *proxysource_gen_Idl - Source_Files { - client.cpp - } - Source_Files { - testC.cpp - } - includes += $(TAOX11_ROOT) - macros += TAOX11_DISABLE_INCLUDE_ANYTYPECODE TAOX11_DISABLE_INCLUDE_STUB_PROXY_HDR -} +//project(*proxysource_gen_Client) { +// after += *proxysource_gen_Idl +// Source_Files { +// client.cpp +// } +// Source_Files { +// testC.cpp +// } +// includes += $(TAOX11_ROOT) +// macros += TAOX11_DISABLE_INCLUDE_ANYTYPECODE TAOX11_DISABLE_INCLUDE_STUB_PROXY_HDR +//} + project(*proxysource_taox11_Client): taox11_client, taox11_anytypecode { exename = taox11client From 44a8cbc86fdd558a236b7c9924f59d07cf06ce16 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 10 Apr 2024 09:05:30 +0200 Subject: [PATCH 70/94] Split test * tests/proxysource/client.cpp -> tests/typelib/stdlib/client.cpp: * tests/proxysource/proxysource.mpc -> tests/typelib/taox11/typelibtaox11.mpc: * tests/proxysource/run_test.pl -> tests/typelib/stdlib/run_test.pl: * tests/proxysource/taox11client.cpp -> tests/typelib/taox11/client.cpp: * tests/proxysource/test.idl -> tests/typelib/test.idl: Moved. * tests/typelib/stdlib/typelibstdlib.mpc: * tests/typelib/taox11/run_test.pl: Added. * bin/taox11_tests.lst: --- bin/taox11_tests.lst | 3 +- .../stdlib}/client.cpp | 0 .../stdlib}/run_test.pl | 11 ------- tests/typelib/stdlib/typelibstdlib.mpc | 23 ++++++++++++++ .../taox11/client.cpp} | 0 tests/typelib/taox11/run_test.pl | 31 +++++++++++++++++++ .../taox11/typelibtaox11.mpc} | 5 ++- tests/{proxysource => typelib}/test.idl | 0 8 files changed, 58 insertions(+), 15 deletions(-) rename tests/{proxysource => typelib/stdlib}/client.cpp (100%) rename tests/{proxysource => typelib/stdlib}/run_test.pl (76%) create mode 100644 tests/typelib/stdlib/typelibstdlib.mpc rename tests/{proxysource/taox11client.cpp => typelib/taox11/client.cpp} (100%) create mode 100755 tests/typelib/taox11/run_test.pl rename tests/{proxysource/proxysource.mpc => typelib/taox11/typelibtaox11.mpc} (91%) rename tests/{proxysource => typelib}/test.idl (100%) diff --git a/bin/taox11_tests.lst b/bin/taox11_tests.lst index c4865f6e..9cec9178 100644 --- a/bin/taox11_tests.lst +++ b/bin/taox11_tests.lst @@ -161,7 +161,6 @@ tests/policies/manipulation/run_test.pl: !CORBA_E_MICRO tests/policies/oneway_timeouts/run_test.pl: !CORBA_E_MICRO tests/policies/mt_timeout/run_test.pl: !CORBA_E_MICRO tests/policies/reliable_oneways/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO -tests/proxysource/run_test.pl: tests/pt_throughput/run_test.pl: tests/reactor/run_test.pl: tests/sequence/run_test.pl: @@ -179,6 +178,8 @@ tests/timebase/run_test.pl: tests/typecode/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO tests/typecode_adapter/orb_create/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO tests/typecode_adapter/resolve_ref/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO +tests/typelib/stdlib/run_test.pl: +tests/typelib/taox11/run_test.pl: tests/union/run_test.pl: tests/union/run_cross_tao_server.pl: tests/wchar/run_test.pl: diff --git a/tests/proxysource/client.cpp b/tests/typelib/stdlib/client.cpp similarity index 100% rename from tests/proxysource/client.cpp rename to tests/typelib/stdlib/client.cpp diff --git a/tests/proxysource/run_test.pl b/tests/typelib/stdlib/run_test.pl similarity index 76% rename from tests/proxysource/run_test.pl rename to tests/typelib/stdlib/run_test.pl index 67b34c9d..1a1bcc10 100755 --- a/tests/proxysource/run_test.pl +++ b/tests/typelib/stdlib/run_test.pl @@ -28,15 +28,4 @@ $target->GetStderrLog(); -$SV = $target->CreateProcess ("taox11client"); - -$server = $SV->SpawnWaitKill ($target->ProcessStartWaitInterval()); - -if ($server != 0) { - print STDERR "ERROR: taox11 returned $server\n"; - $status = 1; -} - -$target->GetStderrLog(); - exit $status; diff --git a/tests/typelib/stdlib/typelibstdlib.mpc b/tests/typelib/stdlib/typelibstdlib.mpc new file mode 100644 index 00000000..305e4724 --- /dev/null +++ b/tests/typelib/stdlib/typelibstdlib.mpc @@ -0,0 +1,23 @@ +// -*- MPC -*- + +project(*stdlib_gen_Idl): ridl_ostream_defaults { + idlflags += -Gcpc -Gatc -Gath + idlflags -= -Sa -St + IDL_Files { + ../test.idl + } + custom_only = 1 +} + +project(*stdlib_gen_Client) { + after += *stdlib_gen_Idl + Source_Files { + client.cpp + } + Source_Files { + testC.cpp + } + includes += $(TAOX11_ROOT) + macros += TAOX11_DISABLE_INCLUDE_ANYTYPECODE TAOX11_DISABLE_INCLUDE_STUB_PROXY_HDR +} + diff --git a/tests/proxysource/taox11client.cpp b/tests/typelib/taox11/client.cpp similarity index 100% rename from tests/proxysource/taox11client.cpp rename to tests/typelib/taox11/client.cpp diff --git a/tests/typelib/taox11/run_test.pl b/tests/typelib/taox11/run_test.pl new file mode 100755 index 00000000..1a1bcc10 --- /dev/null +++ b/tests/typelib/taox11/run_test.pl @@ -0,0 +1,31 @@ +#--------------------------------------------------------------------- +# @file run_test.pl +# @author Marcel Smit +# +# @copyright Copyright (c) Remedy IT Expertise BV +#--------------------------------------------------------------------- +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; + +my $target = PerlACE::TestTarget::create_target(2) || die "Create target 2 failed\n"; + +$status = 0; + +$SV = $target->CreateProcess ("client"); + +$server = $SV->SpawnWaitKill ($target->ProcessStartWaitInterval()); + +if ($server != 0) { + print STDERR "ERROR: client returned $server\n"; + $status = 1; +} + +$target->GetStderrLog(); + +exit $status; diff --git a/tests/proxysource/proxysource.mpc b/tests/typelib/taox11/typelibtaox11.mpc similarity index 91% rename from tests/proxysource/proxysource.mpc rename to tests/typelib/taox11/typelibtaox11.mpc index e14c0196..29304b80 100644 --- a/tests/proxysource/proxysource.mpc +++ b/tests/typelib/taox11/typelibtaox11.mpc @@ -4,7 +4,7 @@ project(*proxysource_gen_Idl): ridl_ostream_defaults { idlflags += -Gcpc -Gatc -Gath idlflags -= -Sa -St IDL_Files { - test.idl + ../test.idl } custom_only = 1 } @@ -23,10 +23,9 @@ project(*proxysource_gen_Idl): ridl_ostream_defaults { project(*proxysource_taox11_Client): taox11_client, taox11_anytypecode { - exename = taox11client after += *proxysource_gen_Idl Source_Files { - taox11client.cpp + client.cpp } Source_Files { testC.cpp diff --git a/tests/proxysource/test.idl b/tests/typelib/test.idl similarity index 100% rename from tests/proxysource/test.idl rename to tests/typelib/test.idl From 2df526122aa504dfa34a2f90802550b1f22fd0ce Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 10 Apr 2024 09:06:31 +0200 Subject: [PATCH 71/94] No white lines between includes * ridlbe/c++11/templates/cli/src/anytc/pre.erb: * ridlbe/c++11/templates/cli/src/pre.erb: * ridlbe/c++11/templates/srv/src/pre.erb: --- ridlbe/c++11/templates/cli/src/anytc/pre.erb | 2 -- ridlbe/c++11/templates/cli/src/pre.erb | 9 --------- ridlbe/c++11/templates/srv/src/pre.erb | 2 -- 3 files changed, 13 deletions(-) diff --git a/ridlbe/c++11/templates/cli/src/anytc/pre.erb b/ridlbe/c++11/templates/cli/src/anytc/pre.erb index 50b056e2..6091b9e3 100644 --- a/ridlbe/c++11/templates/cli/src/anytc/pre.erb +++ b/ridlbe/c++11/templates/cli/src/anytc/pre.erb @@ -11,11 +11,9 @@ % pre_includes.each do |incfile| #include "<%= incfile %>" % end - % includes.each do |incfile| #include "<%= incfile %>" % end - % post_includes.each do |incfile| #include "<%= incfile %>" % end diff --git a/ridlbe/c++11/templates/cli/src/pre.erb b/ridlbe/c++11/templates/cli/src/pre.erb index 504c9f1c..b4e4f14f 100644 --- a/ridlbe/c++11/templates/cli/src/pre.erb +++ b/ridlbe/c++11/templates/cli/src/pre.erb @@ -1,21 +1,12 @@ -%unless pre_includes.empty? - % pre_includes.each do |incfile| #include "<%= incfile %>" % end -%end -%unless includes.empty? - % includes.each do |incfile| #include "<%= incfile %>" % end -%end -%unless post_includes.empty? - % post_includes.each do |incfile| #include "<%= incfile %>" % end -%end % if safe_include? #include "<%= safe_include %>" diff --git a/ridlbe/c++11/templates/srv/src/pre.erb b/ridlbe/c++11/templates/srv/src/pre.erb index 09af28ca..38b22c9f 100644 --- a/ridlbe/c++11/templates/srv/src/pre.erb +++ b/ridlbe/c++11/templates/srv/src/pre.erb @@ -11,11 +11,9 @@ % pre_includes.each do |incfile| #include "<%= incfile %>" % end - % includes.each do |incfile| #include "<%= incfile %>" % end - % post_includes.each do |incfile| #include "<%= incfile %>" % end From f33365be70011e9d6ad0efb0277e9ab97ce41376 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 10 Apr 2024 09:08:00 +0200 Subject: [PATCH 72/94] Restore commandline * tests/hello/hello.mpc: --- tests/hello/hello.mpc | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/hello/hello.mpc b/tests/hello/hello.mpc index fd201fe3..7fad98bf 100644 --- a/tests/hello/hello.mpc +++ b/tests/hello/hello.mpc @@ -2,7 +2,6 @@ project(*x11_Idl): ridl_ostream_defaults { idlflags += -Sp - idlflags -= -Sa -St IDL_Files { test.idl } From 1be5cb55abc92b5c677be54b9c71336beb40c82a Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 10 Apr 2024 09:17:31 +0200 Subject: [PATCH 73/94] Reduce includes for non taox11 case * ridlbe/c++11/templates/cli/hdr/pre.erb: * ridlbe/c++11/templates/cli/src/pre.erb: * ridlbe/c++11/writers/stubproxysource.rb: * ridlbe/c++11/writers/stubsource.rb: * tao/x11/cdr_long_double.h: * tao/x11/tao_corba.h: --- ridlbe/c++11/templates/cli/hdr/pre.erb | 3 --- ridlbe/c++11/templates/cli/src/pre.erb | 3 +++ ridlbe/c++11/writers/stubproxysource.rb | 5 ++++- ridlbe/c++11/writers/stubsource.rb | 3 ++- tao/x11/cdr_long_double.h | 6 ++---- tao/x11/tao_corba.h | 26 +++++++++++++------------ 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ridlbe/c++11/templates/cli/hdr/pre.erb b/ridlbe/c++11/templates/cli/hdr/pre.erb index 60016ccf..aef6d387 100644 --- a/ridlbe/c++11/templates/cli/hdr/pre.erb +++ b/ridlbe/c++11/templates/cli/hdr/pre.erb @@ -19,9 +19,6 @@ % if pre_include? #include /**/ "<%= pre_include %>" % end -#if __has_include("tao/x11/tao_corba.h") -# include "tao/x11/tao_corba.h" -#endif % if unique_include? #include "<%= unique_include %>" % else diff --git a/ridlbe/c++11/templates/cli/src/pre.erb b/ridlbe/c++11/templates/cli/src/pre.erb index b4e4f14f..8026a2a1 100644 --- a/ridlbe/c++11/templates/cli/src/pre.erb +++ b/ridlbe/c++11/templates/cli/src/pre.erb @@ -1,3 +1,6 @@ +#if __has_include("tao/x11/tao_corba.h") +# include "tao/x11/tao_corba.h" +#endif % pre_includes.each do |incfile| #include "<%= incfile %>" % end diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 5a4e2a7d..94a0bab8 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -31,7 +31,10 @@ def initialize(output = STDOUT, opts = {}) @default_pre_includes << 'tao/x11/tao_corba.h' @default_pre_includes << 'tao/x11/corba.h' @default_post_includes = [] - @default_pre_includes << 'tao/CDR.h' unless params[:no_cdr_streaming] + unless params[:no_cdr_streaming] + @default_pre_includes << 'tao/CDR.h' + @default_post_includes << 'tao/x11/cdr_long_double.h' + end end # Object traits are only required for interfaces and valuetypes diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 022e357e..8ec4b0bb 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -29,8 +29,10 @@ def initialize(output = STDOUT, opts = {}) @proxy_impl = false @default_pre_includes = [] + @default_post_includes = [] unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] @default_pre_includes << 'tao/CDR.h' + @default_post_includes << 'tao/x11/cdr_long_double.h' end if params[:gen_typecodes] && !params[:gen_anytypecode_source] @default_pre_includes << 'tao/AnyTypeCode/TypeCode.h' @@ -39,7 +41,6 @@ def initialize(output = STDOUT, opts = {}) if params[:gen_any_ops] && !params[:gen_anytypecode_source] @default_pre_includes << 'tao/AnyTypeCode/Any_Impl_T.h' end - @default_post_includes = [] @default_post_includes << 'tao/x11/tao_corba.h' unless params[:gen_client_proxy_source] @default_post_includes << 'tao/x11/anytypecode/typecode.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source] @default_post_includes << 'tao/x11/anytypecode/typecode_impl.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source] diff --git a/tao/x11/cdr_long_double.h b/tao/x11/cdr_long_double.h index 3563cf58..954d5f79 100644 --- a/tao/x11/cdr_long_double.h +++ b/tao/x11/cdr_long_double.h @@ -21,8 +21,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// CDR output operator for long double -inline CORBA::Boolean operator<< (TAO_OutputCDR& os, - long double x) +inline CORBA::Boolean operator<< (TAO_OutputCDR& os, long double x) { CORBA::LongDouble ld; return @@ -32,8 +31,7 @@ inline CORBA::Boolean operator<< (TAO_OutputCDR& os, } /// CDR input operators for long double -inline CORBA::Boolean operator>> (TAO_InputCDR &is, - long double &x) +inline CORBA::Boolean operator>> (TAO_InputCDR &is, long double &x) { CORBA::LongDouble ld; if (!(static_cast (is) >> ld)) diff --git a/tao/x11/tao_corba.h b/tao/x11/tao_corba.h index b269e76c..3262c5a7 100644 --- a/tao/x11/tao_corba.h +++ b/tao/x11/tao_corba.h @@ -12,17 +12,19 @@ #pragma once -#include /**/ "ace/config-all.h" - -#include "tao/corba.h" -#include /**/ "tao/Versioned_Namespace.h" - -#define TAO_CORBA TAO_VERSIONED_NAMESPACE_NAME::CORBA - -#define TAO_TAO TAO_VERSIONED_NAMESPACE_NAME::TAO - -#define TAO_IOP TAO_VERSIONED_NAMESPACE_NAME::IOP - -#include "tao/x11/cdr_long_double.h" +#if __has_include("tao/corba.h") +# include "tao/corba.h" +#endif + +#if __has_include("tao/Versioned_Namespace.h") +# include /**/ "tao/Versioned_Namespace.h" +# define TAO_CORBA TAO_VERSIONED_NAMESPACE_NAME::CORBA +# define TAO_TAO TAO_VERSIONED_NAMESPACE_NAME::TAO +# define TAO_IOP TAO_VERSIONED_NAMESPACE_NAME::IOP +#else +# define TAO_CORBA +# define TAO_TAO +# define TAO_IOP +#endif #endif // TAOX11_TAO_CORBA_H_INCLUDED From d888aad277139f9d41afa1027cd96aab52f2b601 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 10 Apr 2024 09:23:39 +0200 Subject: [PATCH 74/94] Fix header * tests/typelib/taox11/client.cpp: --- tests/typelib/taox11/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/typelib/taox11/client.cpp b/tests/typelib/taox11/client.cpp index 66392b89..3e0e6753 100644 --- a/tests/typelib/taox11/client.cpp +++ b/tests/typelib/taox11/client.cpp @@ -1,5 +1,5 @@ /** - * @file taox11client.cpp + * @file client.cpp * @author Johnny Willemsen * * @brief C++11 client application which uses IDL defines types From 20c119e66226f94ea16794cb64f49a69f15c5f5a Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 10 Apr 2024 09:44:52 +0200 Subject: [PATCH 75/94] Add version which doesn't use C.cpp * tests/typelib/nocpp/client.cpp: * tests/typelib/nocpp/nocpp.mpc: * tests/typelib/nocpp/run_test.pl: Added. * tests/typelib/stdlib/client.cpp: * tests/typelib/taox11/client.cpp: --- tests/typelib/nocpp/client.cpp | 30 ++++++++++++++++++++++++++++++ tests/typelib/nocpp/nocpp.mpc | 19 +++++++++++++++++++ tests/typelib/nocpp/run_test.pl | 31 +++++++++++++++++++++++++++++++ tests/typelib/stdlib/client.cpp | 2 ++ tests/typelib/taox11/client.cpp | 2 ++ 5 files changed, 84 insertions(+) create mode 100644 tests/typelib/nocpp/client.cpp create mode 100644 tests/typelib/nocpp/nocpp.mpc create mode 100755 tests/typelib/nocpp/run_test.pl diff --git a/tests/typelib/nocpp/client.cpp b/tests/typelib/nocpp/client.cpp new file mode 100644 index 00000000..92368158 --- /dev/null +++ b/tests/typelib/nocpp/client.cpp @@ -0,0 +1,30 @@ +/** + * @file client.cpp + * @author Johnny Willemsen + * + * @brief C++11 client application which uses IDL defines types + * without the full TAOX11 support + * + * @copyright Copyright (c) Remedy IT Expertise BV + */ + +#include "testC.h" + +// Check for ACE define + +int +main(int, char* []) +{ + int result {}; + + Test::Bar mybar; + + try + { + } + catch (const std::exception& e) + { + return 1; + } + return result; +} diff --git a/tests/typelib/nocpp/nocpp.mpc b/tests/typelib/nocpp/nocpp.mpc new file mode 100644 index 00000000..b2e66fb0 --- /dev/null +++ b/tests/typelib/nocpp/nocpp.mpc @@ -0,0 +1,19 @@ +// -*- MPC -*- + +project(*nocpp_gen_Idl): ridl_ostream_defaults { + idlflags += -Gcpc -Scc + IDL_Files { + ../test.idl + } + custom_only = 1 +} + +project(*nocpp_gen_Client) { + after += *nocpp_gen_Idl + Source_Files { + client.cpp + } + includes += $(TAOX11_ROOT) + macros += TAOX11_DISABLE_INCLUDE_ANYTYPECODE TAOX11_DISABLE_INCLUDE_STUB_PROXY_HDR +} + diff --git a/tests/typelib/nocpp/run_test.pl b/tests/typelib/nocpp/run_test.pl new file mode 100755 index 00000000..1a1bcc10 --- /dev/null +++ b/tests/typelib/nocpp/run_test.pl @@ -0,0 +1,31 @@ +#--------------------------------------------------------------------- +# @file run_test.pl +# @author Marcel Smit +# +# @copyright Copyright (c) Remedy IT Expertise BV +#--------------------------------------------------------------------- +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; + +my $target = PerlACE::TestTarget::create_target(2) || die "Create target 2 failed\n"; + +$status = 0; + +$SV = $target->CreateProcess ("client"); + +$server = $SV->SpawnWaitKill ($target->ProcessStartWaitInterval()); + +if ($server != 0) { + print STDERR "ERROR: client returned $server\n"; + $status = 1; +} + +$target->GetStderrLog(); + +exit $status; diff --git a/tests/typelib/stdlib/client.cpp b/tests/typelib/stdlib/client.cpp index dc458bf9..92368158 100644 --- a/tests/typelib/stdlib/client.cpp +++ b/tests/typelib/stdlib/client.cpp @@ -17,6 +17,8 @@ main(int, char* []) { int result {}; + Test::Bar mybar; + try { } diff --git a/tests/typelib/taox11/client.cpp b/tests/typelib/taox11/client.cpp index 3e0e6753..aeeca818 100644 --- a/tests/typelib/taox11/client.cpp +++ b/tests/typelib/taox11/client.cpp @@ -17,6 +17,8 @@ main(int, char* []) { int result {}; + Test::Bar mybar; + try { } From d56fff3f9c401801e58e710c09fa6859c5375bcb Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 11:55:53 +0200 Subject: [PATCH 76/94] Export fixes * tests/typelib/shared/client.cpp: * tests/typelib/shared/run_test.pl: * tests/typelib/shared/typelibshared.mpc: Added. * ridlbe/c++11/config.rb: * ridlbe/c++11/templates/cli/prx/pre.erb: * ridlbe/c++11/visitorbase.rb: * tests/typelib/taox11/typelibtaox11.mpc: --- ridlbe/c++11/config.rb | 10 +++++---- ridlbe/c++11/templates/cli/prx/pre.erb | 4 +++- ridlbe/c++11/visitorbase.rb | 4 ++-- tests/typelib/shared/client.cpp | 30 +++++++++++++++++++++++++ tests/typelib/shared/run_test.pl | 31 ++++++++++++++++++++++++++ tests/typelib/shared/typelibshared.mpc | 24 ++++++++++++++++++++ tests/typelib/taox11/typelibtaox11.mpc | 13 ----------- 7 files changed, 96 insertions(+), 20 deletions(-) create mode 100644 tests/typelib/shared/client.cpp create mode 100755 tests/typelib/shared/run_test.pl create mode 100644 tests/typelib/shared/typelibshared.mpc diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index ff8685fd..0203220a 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -80,8 +80,10 @@ def self.add_extended_options(ol, _idl_params) 'impl_export_file' => { description: "-Wb,impl_export_file=FILE\t\tSet implementation export file to generate for -Gxhimpl" }, 'anytypecode_export_macro' => { description: "-Wb,anytypecode_export_macro=MACRO\tSet export macro for Any ops and TypeCode" }, 'anytypecode_export_include' => { description: "-Wb,anytypecode_export_include=FILE\tSet export include file for Any ops and TypeCode" }, + 'anytypecode_export_file' => { description: "-Wb,anytypecode_export_file=FILE\t\tSet implementation export file to generate for -Gxhat" }, 'stub_proxy_export_macro' => { description: "-Wb,stub_proxy_export_macro=MACRO\tSet export macro for stub proxy files" }, 'stub_proxy_export_include' => { description: "-Wb,stub_proxy_export_include=FILE\tSet export include file for stub proxy files" }, + 'stub_proxy_export_file' => { description: "-Wb,stub_proxy_export_file=FILE\t\tSet implementation export file to generate for -Gxhcp" }, 'include_guard' => { description: "-Wb,include_guard=MACRO\t\tguard to prevent the generated client header file to be included" }, 'safe_include' => { description: "-Wb,safe_include=FILE\t\tinclude that should be used instead of the own generated client header file" }, 'unique_include' => { description: "-Wb,unique_include=FILE\t\tinclude that should be generated as only contents of the generated client header file" } @@ -483,8 +485,8 @@ def self.check_client_proxy_export_params(options) end # only in case export header generation has been explicitly enabled will # we derive missing export parameters from base parameters - options.client_proxy_export_macro = options.base_export_macro + '_STUB' + options.export_macro_pfx unless options.client_proxy_export_macro || options.base_export_macro.nil? - options.client_proxy_export_include = options.base_export_include + '_stub' + options.export_header_pfx unless options.client_proxy_export_include || options.base_export_include.nil? + options.client_proxy_export_macro = options.base_export_macro + '_CLIENT_PROXY' + options.export_macro_pfx unless options.client_proxy_export_macro || options.base_export_macro.nil? + options.client_proxy_export_include = options.base_export_include + '_client_proxy' + options.export_header_pfx unless options.client_proxy_export_include || options.base_export_include.nil? end end @@ -496,8 +498,8 @@ def self.check_anytypecode_export_params(options) end # only in case export header generation has been explicitly enabled will # we derive missing export parameters from base parameters - options.anytypecode_export_macro = options.base_export_macro + '_STUB' + options.export_macro_pfx unless options.anytypecode_export_macro || options.base_export_macro.nil? - options.anytypecode_export_include = options.base_export_include + '_stub' + options.export_header_pfx unless options.anytypecode_export_include || options.base_export_include.nil? + options.anytypecode_export_macro = options.base_export_macro + '_ANYTYPECODE' + options.export_macro_pfx unless options.anytypecode_export_macro || options.base_export_macro.nil? + options.anytypecode_export_include = options.base_export_include + '_anytypecode' + options.export_header_pfx unless options.anytypecode_export_include || options.base_export_include.nil? end end diff --git a/ridlbe/c++11/templates/cli/prx/pre.erb b/ridlbe/c++11/templates/cli/prx/pre.erb index 1158aff1..041d5535 100644 --- a/ridlbe/c++11/templates/cli/prx/pre.erb +++ b/ridlbe/c++11/templates/cli/prx/pre.erb @@ -17,8 +17,10 @@ #include "<%= incfile %>" % end % post_includes.each do |incfile| - #include "<%= incfile %>" % end +% if client_proxy_export_include? +#include /**/ "<%= client_proxy_export_include %>" +% end <%= taox11_version_check %> diff --git a/ridlbe/c++11/visitorbase.rb b/ridlbe/c++11/visitorbase.rb index ce72987c..4de5fc93 100644 --- a/ridlbe/c++11/visitorbase.rb +++ b/ridlbe/c++11/visitorbase.rb @@ -146,11 +146,11 @@ def implementation_export_macro end def anytypecode_export_include? - !params[:anytypecode_export_include].nil? + !(params[:anytypecode_export_include] || params[:export_include]).nil? end def anytypecode_export_include - params[:anytypecode_export_include] + params[:anytypecode_export_include] || params[:export_include] end def anytypecode_export_macro diff --git a/tests/typelib/shared/client.cpp b/tests/typelib/shared/client.cpp new file mode 100644 index 00000000..aeeca818 --- /dev/null +++ b/tests/typelib/shared/client.cpp @@ -0,0 +1,30 @@ +/** + * @file client.cpp + * @author Johnny Willemsen + * + * @brief C++11 client application which uses IDL defines types + * and TAOX11 + * + * @copyright Copyright (c) Remedy IT Expertise BV + */ + +#include "testC.h" + +// Check for ACE define + +int +main(int, char* []) +{ + int result {}; + + Test::Bar mybar; + + try + { + } + catch (const std::exception& e) + { + return 1; + } + return result; +} diff --git a/tests/typelib/shared/run_test.pl b/tests/typelib/shared/run_test.pl new file mode 100755 index 00000000..1a1bcc10 --- /dev/null +++ b/tests/typelib/shared/run_test.pl @@ -0,0 +1,31 @@ +#--------------------------------------------------------------------- +# @file run_test.pl +# @author Marcel Smit +# +# @copyright Copyright (c) Remedy IT Expertise BV +#--------------------------------------------------------------------- +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; + +my $target = PerlACE::TestTarget::create_target(2) || die "Create target 2 failed\n"; + +$status = 0; + +$SV = $target->CreateProcess ("client"); + +$server = $SV->SpawnWaitKill ($target->ProcessStartWaitInterval()); + +if ($server != 0) { + print STDERR "ERROR: client returned $server\n"; + $status = 1; +} + +$target->GetStderrLog(); + +exit $status; diff --git a/tests/typelib/shared/typelibshared.mpc b/tests/typelib/shared/typelibshared.mpc new file mode 100644 index 00000000..04eb3904 --- /dev/null +++ b/tests/typelib/shared/typelibshared.mpc @@ -0,0 +1,24 @@ +// -*- MPC -*- + +project(*proxysource_gen_Idl): ridl_ostream_defaults { + idlflags += -Gcpc -Gatc -Gath -Wb,base_export_macro=TYPELIB -Wb,base_export_include=TYPELIB -Gxhat -Gxhcp + idlflags -= -Sa -St + IDL_Files { + ../test.idl + } + custom_only = 1 +} + +project(*proxysource_taox11_Client): taox11_client, taox11_anytypecode { + after += *proxysource_gen_Idl + Source_Files { + client.cpp + } + Source_Files { + testC.cpp + testA.cpp + testCP.cpp + } +} + + diff --git a/tests/typelib/taox11/typelibtaox11.mpc b/tests/typelib/taox11/typelibtaox11.mpc index 29304b80..77ecab89 100644 --- a/tests/typelib/taox11/typelibtaox11.mpc +++ b/tests/typelib/taox11/typelibtaox11.mpc @@ -9,19 +9,6 @@ project(*proxysource_gen_Idl): ridl_ostream_defaults { custom_only = 1 } -//project(*proxysource_gen_Client) { -// after += *proxysource_gen_Idl -// Source_Files { -// client.cpp -// } -// Source_Files { -// testC.cpp -// } -// includes += $(TAOX11_ROOT) -// macros += TAOX11_DISABLE_INCLUDE_ANYTYPECODE TAOX11_DISABLE_INCLUDE_STUB_PROXY_HDR -//} - - project(*proxysource_taox11_Client): taox11_client, taox11_anytypecode { after += *proxysource_gen_Idl Source_Files { From 49c9072e4197d427917218c2ad4b03bf9bf3a4c2 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 11:56:27 +0200 Subject: [PATCH 77/94] Add new test * bin/taox11_tests.lst: --- bin/taox11_tests.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/taox11_tests.lst b/bin/taox11_tests.lst index 9cec9178..f79389b5 100644 --- a/bin/taox11_tests.lst +++ b/bin/taox11_tests.lst @@ -178,6 +178,7 @@ tests/timebase/run_test.pl: tests/typecode/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO tests/typecode_adapter/orb_create/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO tests/typecode_adapter/resolve_ref/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO +tests/typelib/shared/run_test.pl: tests/typelib/stdlib/run_test.pl: tests/typelib/taox11/run_test.pl: tests/union/run_test.pl: From 2f7b775f355941bcba291ff9db7ca34ce0618e41 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 12:04:39 +0200 Subject: [PATCH 78/94] Add test code * tests/typelib/shared/client.cpp: * tests/typelib/shared/typelibshared.mpc: --- tests/typelib/shared/client.cpp | 2 ++ tests/typelib/shared/typelibshared.mpc | 28 +++++++++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/typelib/shared/client.cpp b/tests/typelib/shared/client.cpp index aeeca818..2b7d0f46 100644 --- a/tests/typelib/shared/client.cpp +++ b/tests/typelib/shared/client.cpp @@ -18,6 +18,8 @@ main(int, char* []) int result {}; Test::Bar mybar; + CORBA::Any a; + a <<= mybar; try { diff --git a/tests/typelib/shared/typelibshared.mpc b/tests/typelib/shared/typelibshared.mpc index 04eb3904..f664a62a 100644 --- a/tests/typelib/shared/typelibshared.mpc +++ b/tests/typelib/shared/typelibshared.mpc @@ -1,6 +1,6 @@ // -*- MPC -*- -project(*proxysource_gen_Idl): ridl_ostream_defaults { +project(*typelibshared_gen_Idl): ridl_ostream_defaults { idlflags += -Gcpc -Gatc -Gath -Wb,base_export_macro=TYPELIB -Wb,base_export_include=TYPELIB -Gxhat -Gxhcp idlflags -= -Sa -St IDL_Files { @@ -9,16 +9,34 @@ project(*proxysource_gen_Idl): ridl_ostream_defaults { custom_only = 1 } -project(*proxysource_taox11_Client): taox11_client, taox11_anytypecode { - after += *proxysource_gen_Idl +project(*typelibshared_anytypecode): taox11_lib, taox11_anytypecode { + after += *typelibshared_gen_Idl + sharedname = typelibshared_anytypecode + dynamicflags += TYPELIB_ANYTYPECODE_BUILD_DLL + Source_Files { + testA.cpp + } +} + +project(*typelibshared_clientproxy): taox11_lib { + after += *typelibshared_gen_Idl + sharedname = typelibshared_clientproxy + dynamicflags += TYPELIB_CLIENT_PROXY_BUILD_DLL + Source_Files { + testCP.cpp + } +} + +project(*typelibshared_taox11_Client): taox11_client, taox11_anytypecode { + after += *typelibshared_gen_Idl *typelibshared_clientproxy *typelibshared_anytypecode + libs += typelibshared_clientproxy typelibshared_anytypecode Source_Files { client.cpp } Source_Files { testC.cpp - testA.cpp - testCP.cpp } } + From 296c9583622ebbc67d41b2878815a073092197ab Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 12:58:36 +0200 Subject: [PATCH 79/94] Link order * tests/typelib/shared/typelibshared.mpc: --- tests/typelib/shared/typelibshared.mpc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/typelib/shared/typelibshared.mpc b/tests/typelib/shared/typelibshared.mpc index f664a62a..3a5183fb 100644 --- a/tests/typelib/shared/typelibshared.mpc +++ b/tests/typelib/shared/typelibshared.mpc @@ -27,9 +27,9 @@ project(*typelibshared_clientproxy): taox11_lib { } } -project(*typelibshared_taox11_Client): taox11_client, taox11_anytypecode { +project(*typelibshared_client): taox11_client, taox11_anytypecode { after += *typelibshared_gen_Idl *typelibshared_clientproxy *typelibshared_anytypecode - libs += typelibshared_clientproxy typelibshared_anytypecode + libs += typelibshared_anytypecode typelibshared_clientproxy Source_Files { client.cpp } From 23891dfcb55e6319e8771a5db7d7721d8179535e Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 13:00:04 +0200 Subject: [PATCH 80/94] add deps * tests/typelib/shared/typelibshared.mpc: --- tests/typelib/shared/typelibshared.mpc | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/tests/typelib/shared/typelibshared.mpc b/tests/typelib/shared/typelibshared.mpc index 3a5183fb..956335b1 100644 --- a/tests/typelib/shared/typelibshared.mpc +++ b/tests/typelib/shared/typelibshared.mpc @@ -1,6 +1,6 @@ // -*- MPC -*- -project(*typelibshared_gen_Idl): ridl_ostream_defaults { +project(*typelibshared_gen_idl): ridl_ostream_defaults { idlflags += -Gcpc -Gatc -Gath -Wb,base_export_macro=TYPELIB -Wb,base_export_include=TYPELIB -Gxhat -Gxhcp idlflags -= -Sa -St IDL_Files { @@ -9,17 +9,8 @@ project(*typelibshared_gen_Idl): ridl_ostream_defaults { custom_only = 1 } -project(*typelibshared_anytypecode): taox11_lib, taox11_anytypecode { - after += *typelibshared_gen_Idl - sharedname = typelibshared_anytypecode - dynamicflags += TYPELIB_ANYTYPECODE_BUILD_DLL - Source_Files { - testA.cpp - } -} - project(*typelibshared_clientproxy): taox11_lib { - after += *typelibshared_gen_Idl + after += *typelibshared_gen_idl sharedname = typelibshared_clientproxy dynamicflags += TYPELIB_CLIENT_PROXY_BUILD_DLL Source_Files { @@ -27,8 +18,18 @@ project(*typelibshared_clientproxy): taox11_lib { } } +project(*typelibshared_anytypecode): taox11_lib, taox11_anytypecode { + after += *typelibshared_gen_idl *typelibshared_clientproxy + sharedname = typelibshared_anytypecode + dynamicflags += TYPELIB_ANYTYPECODE_BUILD_DLL + libs += typelibshared_clientproxy + Source_Files { + testA.cpp + } +} + project(*typelibshared_client): taox11_client, taox11_anytypecode { - after += *typelibshared_gen_Idl *typelibshared_clientproxy *typelibshared_anytypecode + after += *typelibshared_gen_idl *typelibshared_clientproxy *typelibshared_anytypecode libs += typelibshared_anytypecode typelibshared_clientproxy Source_Files { client.cpp From ea0e1e085b10463f1eaf3294ee509415e965ce57 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 15:35:01 +0200 Subject: [PATCH 81/94] Rename client_proxy to stub_proxy * docs/src/ridlc.adoc: * ridlbe/c++11/config.rb: * ridlbe/c++11/templates/cli/hdr/post.erb: * ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb: * ridlbe/c++11/templates/cli/prx/bitset_cdr.erb: * ridlbe/c++11/templates/cli/prx/enum_cdr.erb: * ridlbe/c++11/templates/cli/prx/except_cdr.erb: * ridlbe/c++11/templates/cli/prx/interface_cdr.erb: * ridlbe/c++11/templates/cli/prx/pre.erb: * ridlbe/c++11/templates/cli/prx/string_cdr.erb: * ridlbe/c++11/templates/cli/prx/struct_cdr.erb: * ridlbe/c++11/templates/cli/prx/union_cdr.erb: * ridlbe/c++11/templates/cli/prx/value_cdr.erb: * ridlbe/c++11/visitorbase.rb: * ridlbe/c++11/visitors/union.rb: * ridlbe/c++11/writers/amistubheader.rb: * ridlbe/c++11/writers/stubheader.rb: * ridlbe/c++11/writers/stubproxyheader.rb: * ridlbe/c++11/writers/stubproxysource.rb: * ridlbe/c++11/writers/stubsource.rb: --- docs/src/ridlc.adoc | 8 +-- ridlbe/c++11/config.rb | 56 +++++++++---------- ridlbe/c++11/templates/cli/hdr/post.erb | 6 +- .../c++11/templates/cli/prx/bitmask_cdr.erb | 4 +- ridlbe/c++11/templates/cli/prx/bitset_cdr.erb | 4 +- ridlbe/c++11/templates/cli/prx/enum_cdr.erb | 4 +- ridlbe/c++11/templates/cli/prx/except_cdr.erb | 4 +- .../c++11/templates/cli/prx/interface_cdr.erb | 8 +-- ridlbe/c++11/templates/cli/prx/pre.erb | 4 +- ridlbe/c++11/templates/cli/prx/string_cdr.erb | 4 +- ridlbe/c++11/templates/cli/prx/struct_cdr.erb | 4 +- ridlbe/c++11/templates/cli/prx/union_cdr.erb | 4 +- ridlbe/c++11/templates/cli/prx/value_cdr.erb | 4 +- ridlbe/c++11/visitorbase.rb | 28 +++++----- ridlbe/c++11/visitors/union.rb | 2 +- ridlbe/c++11/writers/amistubheader.rb | 4 +- ridlbe/c++11/writers/stubheader.rb | 6 +- ridlbe/c++11/writers/stubproxyheader.rb | 2 +- ridlbe/c++11/writers/stubproxysource.rb | 2 +- ridlbe/c++11/writers/stubsource.rb | 22 ++++---- 20 files changed, 90 insertions(+), 90 deletions(-) diff --git a/docs/src/ridlc.adoc b/docs/src/ridlc.adoc index ca0ff7f5..3f296be8 100644 --- a/docs/src/ridlc.adoc +++ b/docs/src/ridlc.adoc @@ -256,13 +256,13 @@ Sets export macro for Any and TypeCode| Sets export include file for Any and TypeCode| -||-Wb,client_proxy_export_macro=MACRO| +||-Wb,stub_proxy_export_macro=MACRO| -Sets export macro for client proxy| +Sets export macro for stub proxy| -||-Wb,client_proxy_export_include=FILE| +||-Wb,stub_proxy_export_include=FILE| -Sets export include file for client proxy| +Sets export include file for stub proxy| ||-Wb,include_guard=MACRO| diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 0203220a..73b052d1 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -81,8 +81,8 @@ def self.add_extended_options(ol, _idl_params) 'anytypecode_export_macro' => { description: "-Wb,anytypecode_export_macro=MACRO\tSet export macro for Any ops and TypeCode" }, 'anytypecode_export_include' => { description: "-Wb,anytypecode_export_include=FILE\tSet export include file for Any ops and TypeCode" }, 'anytypecode_export_file' => { description: "-Wb,anytypecode_export_file=FILE\t\tSet implementation export file to generate for -Gxhat" }, - 'stub_proxy_export_macro' => { description: "-Wb,stub_proxy_export_macro=MACRO\tSet export macro for stub proxy files" }, - 'stub_proxy_export_include' => { description: "-Wb,stub_proxy_export_include=FILE\tSet export include file for stub proxy files" }, + 'stub_proxy_export_macro' => { description: "-Wb,stub_proxy_export_macro=MACRO\tSet export macro for client proxy files" }, + 'stub_proxy_export_include' => { description: "-Wb,stub_proxy_export_include=FILE\tSet export include file for client proxy files" }, 'stub_proxy_export_file' => { description: "-Wb,stub_proxy_export_file=FILE\t\tSet implementation export file to generate for -Gxhcp" }, 'include_guard' => { description: "-Wb,include_guard=MACRO\t\tguard to prevent the generated client header file to be included" }, 'safe_include' => { description: "-Wb,safe_include=FILE\t\tinclude that should be used instead of the own generated client header file" }, @@ -142,13 +142,13 @@ def self.add_extended_options(ol, _idl_params) description: "-Gxhsta\t\t\tGenerate export header file for AMI stub (not generated by default)" }, 'xhimpl' => { option_name: :gen_export_impl, description: "-Gxhimpl\t\t\tGenerate export header file for implementation code (not generated by default)" }, - 'xhcp' => { option_name: :gen_export_client_proxy, + 'xhcp' => { option_name: :gen_export_stub_proxy, description: "-Gxhcp\t\t\tGenerate export header file for client proxy (not generated by default)" }, 'xhat' => { option_name: :gen_export_anytypecode, description: "-Gxhat\t\t\tGenerate export header file for Any and TypeCode support (not generated by default)" }, 'isrv' => { option_name: :gen_impl_servant, description: "-Gisrv\t\t\tGenerate implementation classes for servants (not generated by default; ignored with -SS or --stubs-only)" }, - 'cpc' => { option_name: :gen_client_proxy_source, + 'cpc' => { option_name: :gen_stub_proxy_source, description: "-Gcpc\t\t\tGenerate implementation of client proxy is separate *CP.cpp file (not generated by default)" }, } end @@ -163,7 +163,7 @@ def self.add_extended_options(ol, _idl_params) description: "-Xsta\t\t\tExport ami stub code (not exported by default)" }, 'impl' => { option_name: :export_impl, description: "-Ximpl\t\t\tExport implementation code (not exported by default)" }, - 'cp' => { option_name: :export_client_proxy, + 'cp' => { option_name: :export_stub_proxy, description: "-Xcp\t\t\tExport client proxy code (not exported by default)" }, 'at' => { option_name: :export_anytypecode, description: "-Xat\t\t\tExport Any and Typecode code (not exported by default)" }, @@ -186,7 +186,7 @@ def self.add_extended_options(ol, _idl_params) description: "-Scc\t\t\tSuppress generation of client source file (generated by default)" }, 'ch' => { option_name: :no_client_header, description: "-Sch\t\t\tSuppress generation of client header file (generated by default)" }, - 'cph' => { option_name: :no_client_proxy_hdr, + 'cph' => { option_name: :no_stub_proxy_hdr, description: "-Scph\t\t\tSuppress generation of client proxy header file (generated by default)" }, 'cdr' => { option_name: :no_cdr_streaming, description: "-Scdr\t\t\tSuppress generation of CDR streaming operators (generated by default)" }, @@ -348,7 +348,7 @@ def taox11_version IDL::Cxx11.check_anytypecode_export_params(options) - IDL::Cxx11.check_client_proxy_export_params(options) + IDL::Cxx11.check_stub_proxy_export_params(options) # generate client stubs if requested if options[:client_stubs] @@ -395,8 +395,8 @@ def taox11_version IDL::Cxx11.gen_anytypecode_export(options) end - if options[:gen_export_client_proxy] - IDL::Cxx11.gen_client_proxy_export(options) + if options[:gen_export_stub_proxy] + IDL::Cxx11.gen_stub_proxy_export(options) end end # becfg.on_process_input end # Backend.configure @@ -408,8 +408,8 @@ def self.setup_output(options) options[:output] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx]) options[:output_ami_incl] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:ami_pfx] + options[:stub_pfx] + options[:hdr_ext]) options[:output_src] = options[:output] + options[:src_ext] - options[:output_client_proxy_header] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx] + options[:proxy_pfx] + options[:hdr_ext]) - options[:output_client_proxy_source] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx] + options[:proxy_pfx] + options[:src_ext]) + options[:output_stub_proxy_header] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx] + options[:proxy_pfx] + options[:hdr_ext]) + options[:output_stub_proxy_source] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:stub_pfx] + options[:proxy_pfx] + options[:src_ext]) options[:output] << options[:hdr_ext] if options[:gen_typecodes] && options[:gen_anytypecode_source] options[:output_anytypecode_source] = File.join(options[:outputdir], File.basename(options[:idlfile], idl_ext) + options[:anytypecode_pfx] + options[:src_ext]) @@ -477,16 +477,16 @@ def self.check_impl_export_params(options) end end - def self.check_client_proxy_export_params(options) - if options.gen_export_client_proxy || options.export_client_proxy - unless options.client_proxy_export_macro || options.base_export_macro - IDL.fatal("ERROR: it isn't allowed to use -Gxhcp or -Xcp without specifying the macro with -Wb,client_proxy_export_macro=MACRO " + + def self.check_stub_proxy_export_params(options) + if options.gen_export_stub_proxy || options.export_stub_proxy + unless options.stub_proxy_export_macro || options.base_export_macro + IDL.fatal("ERROR: it isn't allowed to use -Gxhcp or -Xcp without specifying the macro with -Wb,stub_proxy_export_macro=MACRO " + 'or with -Wb,base_export_macro=MACRO_PREFIX') end # only in case export header generation has been explicitly enabled will # we derive missing export parameters from base parameters - options.client_proxy_export_macro = options.base_export_macro + '_CLIENT_PROXY' + options.export_macro_pfx unless options.client_proxy_export_macro || options.base_export_macro.nil? - options.client_proxy_export_include = options.base_export_include + '_client_proxy' + options.export_header_pfx unless options.client_proxy_export_include || options.base_export_include.nil? + options.stub_proxy_export_macro = options.base_export_macro + '_CLIENT_PROXY' + options.export_macro_pfx unless options.stub_proxy_export_macro || options.base_export_macro.nil? + options.stub_proxy_export_include = options.base_export_include + '_stub_proxy' + options.export_header_pfx unless options.stub_proxy_export_include || options.base_export_include.nil? end end @@ -518,15 +518,15 @@ def self.generate_client_stubs(options) IDL.push_production(:stub_source, ::IDL::Cxx11::StubSourceWriter.new(co_src, options)) end end - unless options[:no_client_proxy_hdr] - if options[:output_client_proxy_header] - co_prx = GenFile.new(options[:output_client_proxy_header]) + unless options[:no_stub_proxy_hdr] + if options[:output_stub_proxy_header] + co_prx = GenFile.new(options[:output_stub_proxy_header]) IDL.push_production(:stub_proxy_header, ::IDL::Cxx11::StubProxyHeaderWriter.new(co_prx, options)) end end - if options[:gen_client_proxy_source] - if options[:output_client_proxy_source] - co_prx = GenFile.new(options[:output_client_proxy_source]) + if options[:gen_stub_proxy_source] + if options[:output_stub_proxy_source] + co_prx = GenFile.new(options[:output_stub_proxy_source]) IDL.push_production(:stub_proxy_source, ::IDL::Cxx11::StubProxySourceWriter.new(co_prx, options)) end end @@ -712,15 +712,15 @@ def self.gen_anytypecode_export(options) end end - def self.gen_client_proxy_export(options) - return if IDL.has_production?(:client_proxy_export_header) + def self.gen_stub_proxy_export(options) + return if IDL.has_production?(:stub_proxy_export_header) - export_file = options.client_proxy_export_file || options.client_proxy_export_include + export_file = options.stub_proxy_export_file || options.stub_proxy_export_include if export_file so = GenFile.new(File.join(options.outputdir, export_file)) IDL.push_production( - :client_proxy_export_header, - ::IDL::Cxx11::ExportHeaderWriter.new(options.client_proxy_export_macro, export_file, so, options)) + :stub_proxy_export_header, + ::IDL::Cxx11::ExportHeaderWriter.new(options.stub_proxy_export_macro, export_file, so, options)) else IDL.fatal('ERROR: it is not allowed to use -Gxhimpl without specifying the file with -Wb,impl_export_file=FILE, ' + '-Wb,impl_export_include=FILE or -Wb,base_export_include=FILE_PREFIX') diff --git a/ridlbe/c++11/templates/cli/hdr/post.erb b/ridlbe/c++11/templates/cli/hdr/post.erb index c46e20bc..55f9b8d3 100644 --- a/ridlbe/c++11/templates/cli/hdr/post.erb +++ b/ridlbe/c++11/templates/cli/hdr/post.erb @@ -1,8 +1,8 @@ // generated from <%= ridl_template_path %> -%unless no_client_proxy_hdr? -#if !defined (TAOX11_DISABLE_INCLUDE_STUB_PROXY_HDR) && defined (__TAOX11_INCLUDE_STUB_PROXY__) && __has_include("<%= client_proxy_hdr %>") -# include "<%= client_proxy_hdr %>" +%unless no_stub_proxy_hdr? +#if !defined (TAOX11_DISABLE_INCLUDE_STUB_PROXY_HDR) && defined (__TAOX11_INCLUDE_STUB_PROXY__) && __has_include("<%= stub_proxy_hdr %>") +# include "<%= stub_proxy_hdr %>" #endif %end %if anytypecode_hdr? diff --git a/ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb b/ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb index e45a3399..3f710ecd 100644 --- a/ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/bitmask_cdr.erb @@ -15,8 +15,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/bitset_cdr.erb b/ridlbe/c++11/templates/cli/prx/bitset_cdr.erb index 2fece938..20d947e6 100644 --- a/ridlbe/c++11/templates/cli/prx/bitset_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/bitset_cdr.erb @@ -14,8 +14,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/enum_cdr.erb b/ridlbe/c++11/templates/cli/prx/enum_cdr.erb index e45a3399..3f710ecd 100644 --- a/ridlbe/c++11/templates/cli/prx/enum_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/enum_cdr.erb @@ -15,8 +15,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR &, const <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR &, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/except_cdr.erb b/ridlbe/c++11/templates/cli/prx/except_cdr.erb index 7bac6163..c28ab194 100644 --- a/ridlbe/c++11/templates/cli/prx/except_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/except_cdr.erb @@ -4,8 +4,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, const <%= scoped_cxxname %>&); -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, const <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/interface_cdr.erb b/ridlbe/c++11/templates/cli/prx/interface_cdr.erb index 6f0aa7a4..bda114fd 100644 --- a/ridlbe/c++11/templates/cli/prx/interface_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/interface_cdr.erb @@ -22,13 +22,13 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL % if is_abstract? %# Abstract interfaces %# -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, <%= scoped_cxx_in_type %>); -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxx_out_type %>); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, <%= scoped_cxx_in_type %>); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxx_out_type %>); % else %# Remote interfaces %# -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR& strm, <%= scoped_cxx_in_type %> _tao_objref); -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR& strm, <%= scoped_cxx_out_type %> _tao_objref); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR& strm, <%= scoped_cxx_in_type %> _tao_objref); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR& strm, <%= scoped_cxx_out_type %> _tao_objref); % end //@} diff --git a/ridlbe/c++11/templates/cli/prx/pre.erb b/ridlbe/c++11/templates/cli/prx/pre.erb index 041d5535..158bd0ae 100644 --- a/ridlbe/c++11/templates/cli/prx/pre.erb +++ b/ridlbe/c++11/templates/cli/prx/pre.erb @@ -19,8 +19,8 @@ % post_includes.each do |incfile| #include "<%= incfile %>" % end -% if client_proxy_export_include? -#include /**/ "<%= client_proxy_export_include %>" +% if stub_proxy_export_include? +#include /**/ "<%= stub_proxy_export_include %>" % end <%= taox11_version_check %> diff --git a/ridlbe/c++11/templates/cli/prx/string_cdr.erb b/ridlbe/c++11/templates/cli/prx/string_cdr.erb index 2d9d2e55..8445986e 100644 --- a/ridlbe/c++11/templates/cli/prx/string_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/string_cdr.erb @@ -15,8 +15,8 @@ class TAOX11_NAMESPACE::Arg_Traits<<%= scoped_cxxtype %>> TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// CDR streaming methods for <%= scoped_cxxname %> -<%= client_proxy_export_macro %>bool _cdr_in_<%= scoped_cxxname.scope_to_cxxname %> (TAO_OutputCDR &, const IDL::traits<<%= scoped_cxxtype %>>::value_type&); -<%= client_proxy_export_macro %>bool _cdr_out_<%= scoped_cxxname.scope_to_cxxname %> (TAO_InputCDR &, IDL::traits<<%= scoped_cxxtype %>>::value_type&); +<%= stub_proxy_export_macro %>bool _cdr_in_<%= scoped_cxxname.scope_to_cxxname %> (TAO_OutputCDR &, const IDL::traits<<%= scoped_cxxtype %>>::value_type&); +<%= stub_proxy_export_macro %>bool _cdr_out_<%= scoped_cxxname.scope_to_cxxname %> (TAO_InputCDR &, IDL::traits<<%= scoped_cxxtype %>>::value_type&); #define _ALIAS_<%= scoped_cxxname.scope_to_cxxname %>_CDR_OPS_IMPL_ /// @name CDR streaming operator specializations for <%= scoped_cxxname %> diff --git a/ridlbe/c++11/templates/cli/prx/struct_cdr.erb b/ridlbe/c++11/templates/cli/prx/struct_cdr.erb index 3ed92eac..86a94ebc 100644 --- a/ridlbe/c++11/templates/cli/prx/struct_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/struct_cdr.erb @@ -15,8 +15,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, const <%= scoped_cxxname %>&); -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, const <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/union_cdr.erb b/ridlbe/c++11/templates/cli/prx/union_cdr.erb index 3ed92eac..86a94ebc 100644 --- a/ridlbe/c++11/templates/cli/prx/union_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/union_cdr.erb @@ -15,8 +15,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, const <%= scoped_cxxname %>&); -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, const <%= scoped_cxxname %>&); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxxname %>&); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/templates/cli/prx/value_cdr.erb b/ridlbe/c++11/templates/cli/prx/value_cdr.erb index 6b9eaae1..c59e3b86 100644 --- a/ridlbe/c++11/templates/cli/prx/value_cdr.erb +++ b/ridlbe/c++11/templates/cli/prx/value_cdr.erb @@ -18,8 +18,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL /// @name CDR streaming operator specializations for <%= scoped_cxxname %> //@{ -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, <%= scoped_cxx_in_type %>); -<%= client_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxx_out_type %>); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator<< (TAO_OutputCDR&, <%= scoped_cxx_in_type %>); +<%= stub_proxy_export_macro %>TAO_CORBA::Boolean operator>> (TAO_InputCDR&, <%= scoped_cxx_out_type %>); //@} TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/ridlbe/c++11/visitorbase.rb b/ridlbe/c++11/visitorbase.rb index 4de5fc93..99059e80 100644 --- a/ridlbe/c++11/visitorbase.rb +++ b/ridlbe/c++11/visitorbase.rb @@ -37,20 +37,20 @@ def anytypecode_hdr File.basename(params[:output_anytypecode_header] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:anytypecode_pfx] + '.h')) end - def client_proxy_hdr - File.basename(params[:output_client_proxy_header] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.h')) + def stub_proxy_hdr + File.basename(params[:output_stub_proxy_header] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.h')) end - def client_proxy_source - File.basename(params[:output_client_proxy_source] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.cpp')) + def stub_proxy_source + File.basename(params[:output_stub_proxy_source] || (File.basename(params[:idlfile], params[:idlext]) + params[:stub_pfx] + params[:proxy_pfx] + '.cpp')) end - def no_client_proxy_hdr? - params[:no_client_proxy_hdr] && params[:ami_stub_output_prx].nil? + def no_stub_proxy_hdr? + params[:no_stub_proxy_hdr] && params[:ami_stub_output_prx].nil? end - def client_proxy_src? - params[:gen_client_proxy_source] + def stub_proxy_src? + params[:gen_stub_proxy_source] end def anytypecode_hdr? @@ -157,16 +157,16 @@ def anytypecode_export_macro params[:anytypecode_export_macro] ? params[:anytypecode_export_macro] + ' ' : self.stub_export_macro end - def client_proxy_export_include? - !params[:client_proxy_export_include].nil? + def stub_proxy_export_include? + !params[:stub_proxy_export_include].nil? end - def client_proxy_export_include - params[:client_proxy_export_include] + def stub_proxy_export_include + params[:stub_proxy_export_include] end - def client_proxy_export_macro - params[:client_proxy_export_macro] ? params[:client_proxy_export_macro] + ' ' : self.stub_export_macro + def stub_proxy_export_macro + params[:stub_proxy_export_macro] ? params[:stub_proxy_export_macro] + ' ' : self.stub_export_macro end def skel_export_include? diff --git a/ridlbe/c++11/visitors/union.rb b/ridlbe/c++11/visitors/union.rb index 7e167ce5..3092c13f 100644 --- a/ridlbe/c++11/visitors/union.rb +++ b/ridlbe/c++11/visitors/union.rb @@ -123,7 +123,7 @@ def switchtype end def invalid_argument_exception - if params[:gen_client_proxy_source] || params[:gen_union_invalid_argument] + if params[:gen_stub_proxy_source] || params[:gen_union_invalid_argument] 'std::invalid_argument ("")' else 'TAOX11_NAMESPACE::CORBA::BAD_PARAM ()' diff --git a/ridlbe/c++11/writers/amistubheader.rb b/ridlbe/c++11/writers/amistubheader.rb index 0187ccab..d1ce4f42 100644 --- a/ridlbe/c++11/writers/amistubheader.rb +++ b/ridlbe/c++11/writers/amistubheader.rb @@ -90,8 +90,8 @@ def post_visit(parser) visitor(PostVisitor) do |v| v.class_eval do ### - # Overload standard #client_proxy for this visitor instance - def client_proxy_hdr + # Overload standard #stub_proxy for this visitor instance + def stub_proxy_hdr File.basename(params[:idlfile], params[:idlext]) + params[:ami_pfx] + params[:stub_pfx] + params[:proxy_pfx] + '.h' end end diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index 6d860d75..df43530f 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -31,7 +31,7 @@ def initialize(output = STDOUT, opts = {}) 'tao/x11/basic_traits.h' ] - @default_pre_includes << 'tao/x11/corba.h' unless params[:gen_client_proxy_source] + @default_pre_includes << 'tao/x11/corba.h' unless params[:gen_stub_proxy_source] @default_post_includes = [] unless params[:output_anytypecode_header] @@ -449,8 +449,8 @@ def enter_struct(node) end def enter_union(node) - add_include('tao/x11/system_exception.h') unless params[:gen_client_proxy_source] - add_pre_include('stdexcept') if params[:gen_client_proxy_source] + add_include('tao/x11/system_exception.h') unless params[:gen_stub_proxy_source] + add_pre_include('stdexcept') if params[:gen_stub_proxy_source] node.members.each { |m| check_idl_type(m.idltype) } end diff --git a/ridlbe/c++11/writers/stubproxyheader.rb b/ridlbe/c++11/writers/stubproxyheader.rb index bafa4632..853a7ca4 100644 --- a/ridlbe/c++11/writers/stubproxyheader.rb +++ b/ridlbe/c++11/writers/stubproxyheader.rb @@ -33,7 +33,7 @@ def initialize(output = STDOUT, opts = {}) @object_varout = false def visit_nodes(parser) - @include_guard = "__RIDL_#{File.basename(params[:output_client_proxy_header] || '').to_random_include_guard}_INCLUDED__" + @include_guard = "__RIDL_#{File.basename(params[:output_stub_proxy_header] || '').to_random_include_guard}_INCLUDED__" super visitor(PostVisitor).visit end diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 94a0bab8..9aeac2cc 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -71,7 +71,7 @@ def post_visit(parser) if @object_traits_specializations # Object ref traits specializations - visit_proxy_object_ref_traits_specializations(parser) unless params[:no_client_proxy_hdr] + visit_proxy_object_ref_traits_specializations(parser) unless params[:no_stub_proxy_hdr] end # CDR operators diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index 8ec4b0bb..fc8cc37e 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -30,7 +30,7 @@ def initialize(output = STDOUT, opts = {}) @default_pre_includes = [] @default_post_includes = [] - unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] + unless params[:no_cdr_streaming] || params[:gen_stub_proxy_source] @default_pre_includes << 'tao/CDR.h' @default_post_includes << 'tao/x11/cdr_long_double.h' end @@ -41,7 +41,7 @@ def initialize(output = STDOUT, opts = {}) if params[:gen_any_ops] && !params[:gen_anytypecode_source] @default_pre_includes << 'tao/AnyTypeCode/Any_Impl_T.h' end - @default_post_includes << 'tao/x11/tao_corba.h' unless params[:gen_client_proxy_source] + @default_post_includes << 'tao/x11/tao_corba.h' unless params[:gen_stub_proxy_source] @default_post_includes << 'tao/x11/anytypecode/typecode.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source] @default_post_includes << 'tao/x11/anytypecode/typecode_impl.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source] end @@ -56,7 +56,7 @@ def pre_visit(parser) def post_visit(parser) # stub proxy implementations - visit_proxy_implementation(parser) if @proxy_impl && !params[:gen_client_proxy_source] + visit_proxy_implementation(parser) if @proxy_impl && !params[:gen_stub_proxy_source] visit_anyops(parser) if params[:gen_any_ops] && !params[:gen_anytypecode_source] @@ -65,11 +65,11 @@ def post_visit(parser) visit_object_traits_specializations(parser) # Object ref traits specializations - visit_proxy_object_ref_traits_specializations(parser) unless params[:no_client_proxy_hdr] || params[:gen_client_proxy_source] + visit_proxy_object_ref_traits_specializations(parser) unless params[:no_stub_proxy_hdr] || params[:gen_stub_proxy_source] end # CDR operators - visit_cdr(parser) unless params[:gen_client_proxy_source] + visit_cdr(parser) unless params[:gen_stub_proxy_source] super visitor(PostVisitor).visit @@ -176,7 +176,7 @@ def visit_object_traits_specializations(parser) end def visit_proxy_implementation(parser) - writer(StubProxySourceProxyImplWriter).visit_nodes(parser) unless params[:gen_client_proxy_source] + writer(StubProxySourceProxyImplWriter).visit_nodes(parser) unless params[:gen_stub_proxy_source] end def visit_proxy_object_ref_traits_specializations(parser) @@ -381,21 +381,21 @@ def check_idl_type(idl_type) IDL::Type::Boolean, IDL::Type::WChar, IDL::Type::Octet - add_include('tao/x11/special_basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] + add_include('tao/x11/special_basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_stub_proxy_source] when IDL::Type::LongDouble - add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_stub_proxy_source] when IDL::Type::Integer, IDL::Type::Double, IDL::Type::Float, IDL::Type::Void - add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_stub_proxy_source] when IDL::Type::String, IDL::Type::WString - add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] + add_include('tao/x11/basic_arguments.h') unless params[:no_cdr_streaming] || params[:gen_stub_proxy_source] when IDL::Type::Object, IDL::Type::Interface, IDL::Type::Component - add_include('tao/x11/stub_arg_traits.h') unless params[:no_cdr_streaming] || params[:gen_client_proxy_source] + add_include('tao/x11/stub_arg_traits.h') unless params[:no_cdr_streaming] || params[:gen_stub_proxy_source] when IDL::Type::Sequence # arg template included in P.h check_idl_type(idl_type.basetype) From 43c8ab768084dfedc8cfd113af88a091eedc575d Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 15:38:47 +0200 Subject: [PATCH 82/94] Back to Latest_ACE7TAO3_Micro for ACE/TAO/MPC * .github/workflows/linux.yml: --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5bcdb661..06f0a474 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -32,7 +32,7 @@ env: TAOX11_ROOT: ${{ github.workspace }} INSTALL_PREFIX: ${{ github.workspace }}/stage X11_BRANCH: master - ACETAOMPC_BRANCH: master + ACETAOMPC_BRANCH: Latest_ACE7TAO3_Micro jobs: build: From fc40ee6ee17285a12a80c609e506099649660967 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 15:47:15 +0200 Subject: [PATCH 83/94] client_proxy to stub_proxy * bin/MPC/modules/IDLHelper.pm: --- bin/MPC/modules/IDLHelper.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/MPC/modules/IDLHelper.pm b/bin/MPC/modules/IDLHelper.pm index 8fe05a4e..49371854 100644 --- a/bin/MPC/modules/IDLHelper.pm +++ b/bin/MPC/modules/IDLHelper.pm @@ -82,9 +82,9 @@ sub get_output { } } if ($flags =~ /--Gxhcpr/) { - if ($flags =~ /-Wb,client_proxy_export_file=(\S*)/) { + if ($flags =~ /-Wb,stub_proxy_export_file=(\S*)/) { push(@out, $1); - } elsif ($flags =~ /-Wb,client_proxy_export_include=(\S*)/) { + } elsif ($flags =~ /-Wb,stub_proxy_export_include=(\S*)/) { push(@out, $1); } } From 9362ee0d3356a8b5dde6b61a156c29051d95052f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 15:49:09 +0200 Subject: [PATCH 84/94] client proxy to stub proxy * docs/src/ridlc.adoc: * ridlbe/c++11/config.rb: --- docs/src/ridlc.adoc | 6 +++--- ridlbe/c++11/config.rb | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/src/ridlc.adoc b/docs/src/ridlc.adoc index 3f296be8..8981edfc 100644 --- a/docs/src/ridlc.adoc +++ b/docs/src/ridlc.adoc @@ -331,7 +331,7 @@ off ||-Gcpc| -Generate client proxy implementation in separate *CP.cpp file +Generate stub proxy implementation in separate *CP.cpp file (not generated by default)| off @@ -407,7 +407,7 @@ off ||-Gxhcp| -Generate export header file for client proxy code (not generated by +Generate export header file for stub proxy code (not generated by default).| off @@ -473,7 +473,7 @@ off ||-Scph| -Suppress generation of client proxy header file (generated by default)| +Suppress generation of stub proxy header file (generated by default)| off diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index 73b052d1..ffd74b00 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -81,8 +81,8 @@ def self.add_extended_options(ol, _idl_params) 'anytypecode_export_macro' => { description: "-Wb,anytypecode_export_macro=MACRO\tSet export macro for Any ops and TypeCode" }, 'anytypecode_export_include' => { description: "-Wb,anytypecode_export_include=FILE\tSet export include file for Any ops and TypeCode" }, 'anytypecode_export_file' => { description: "-Wb,anytypecode_export_file=FILE\t\tSet implementation export file to generate for -Gxhat" }, - 'stub_proxy_export_macro' => { description: "-Wb,stub_proxy_export_macro=MACRO\tSet export macro for client proxy files" }, - 'stub_proxy_export_include' => { description: "-Wb,stub_proxy_export_include=FILE\tSet export include file for client proxy files" }, + 'stub_proxy_export_macro' => { description: "-Wb,stub_proxy_export_macro=MACRO\tSet export macro for stub proxy files" }, + 'stub_proxy_export_include' => { description: "-Wb,stub_proxy_export_include=FILE\tSet export include file for stub proxy files" }, 'stub_proxy_export_file' => { description: "-Wb,stub_proxy_export_file=FILE\t\tSet implementation export file to generate for -Gxhcp" }, 'include_guard' => { description: "-Wb,include_guard=MACRO\t\tguard to prevent the generated client header file to be included" }, 'safe_include' => { description: "-Wb,safe_include=FILE\t\tinclude that should be used instead of the own generated client header file" }, @@ -143,13 +143,13 @@ def self.add_extended_options(ol, _idl_params) 'xhimpl' => { option_name: :gen_export_impl, description: "-Gxhimpl\t\t\tGenerate export header file for implementation code (not generated by default)" }, 'xhcp' => { option_name: :gen_export_stub_proxy, - description: "-Gxhcp\t\t\tGenerate export header file for client proxy (not generated by default)" }, + description: "-Gxhcp\t\t\tGenerate export header file for stub proxy (not generated by default)" }, 'xhat' => { option_name: :gen_export_anytypecode, description: "-Gxhat\t\t\tGenerate export header file for Any and TypeCode support (not generated by default)" }, 'isrv' => { option_name: :gen_impl_servant, description: "-Gisrv\t\t\tGenerate implementation classes for servants (not generated by default; ignored with -SS or --stubs-only)" }, 'cpc' => { option_name: :gen_stub_proxy_source, - description: "-Gcpc\t\t\tGenerate implementation of client proxy is separate *CP.cpp file (not generated by default)" }, + description: "-Gcpc\t\t\tGenerate implementation of stub proxy is separate *CP.cpp file (not generated by default)" }, } end @@ -164,7 +164,7 @@ def self.add_extended_options(ol, _idl_params) 'impl' => { option_name: :export_impl, description: "-Ximpl\t\t\tExport implementation code (not exported by default)" }, 'cp' => { option_name: :export_stub_proxy, - description: "-Xcp\t\t\tExport client proxy code (not exported by default)" }, + description: "-Xcp\t\t\tExport stub proxy code (not exported by default)" }, 'at' => { option_name: :export_anytypecode, description: "-Xat\t\t\tExport Any and Typecode code (not exported by default)" }, } @@ -187,7 +187,7 @@ def self.add_extended_options(ol, _idl_params) 'ch' => { option_name: :no_client_header, description: "-Sch\t\t\tSuppress generation of client header file (generated by default)" }, 'cph' => { option_name: :no_stub_proxy_hdr, - description: "-Scph\t\t\tSuppress generation of client proxy header file (generated by default)" }, + description: "-Scph\t\t\tSuppress generation of stub proxy header file (generated by default)" }, 'cdr' => { option_name: :no_cdr_streaming, description: "-Scdr\t\t\tSuppress generation of CDR streaming operators (generated by default)" }, } From 8ea2108eecfce1aa9a9a889b788788cf70350e97 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 16:18:19 +0200 Subject: [PATCH 85/94] Add base directory and move headers that work without ACE/TAO to there --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/custom.md | 2 +- bin/MPC/config/ridl_base_defaults.mpb | 4 ++-- docs/src/compilation.adoc | 8 +++---- examples/log_module/my_log_module_export.h | 2 +- .../naming_server/taox11_cosnaming_export.h | 2 +- ridlbe/base/config.rb | 2 +- ridlbe/c++11/config.rb | 2 +- ridlbe/c++11/templates/cli/src/pre.erb | 4 ++-- .../c++11/templates/exp/hdr/taox11_export.erb | 2 +- ridlbe/c++11/writers/amistubheader.rb | 4 ++-- ridlbe/c++11/writers/anytypecodesrc.rb | 2 +- .../c++11/writers/helpers/version_helper.rb | 2 +- ridlbe/c++11/writers/stubheader.rb | 14 ++++++------ ridlbe/c++11/writers/stubproxysource.rb | 2 +- ridlbe/c++11/writers/stubsource.rb | 2 +- tao/rules.taox11.GNU | 12 +++++----- tao/x11/PolicyC.h | 10 ++++----- tao/x11/amic_traits_t.h | 2 +- tao/x11/anyinsert_adapter.h | 4 ++-- tao/x11/anytypecode/any.cpp | 2 +- tao/x11/anytypecode/any.h | 6 ++--- tao/x11/anytypecode/any_arg_traits.h | 2 +- tao/x11/anytypecode/any_impl.h | 4 ++-- tao/x11/anytypecode/any_util.h | 4 ++-- tao/x11/anytypecode/anyinsert.h | 4 ++-- tao/x11/anytypecode/system_exceptionA.cpp | 2 +- .../anytypecode/taox11_anytypecode_export.h | 2 +- tao/x11/anytypecode/typecode_case_t.h | 2 +- tao/x11/anytypecode/typecode_impl.cpp | 2 +- tao/x11/anytypecode/typecode_impl.h | 2 +- tao/x11/anytypecode/typecode_ref.h | 2 +- tao/x11/arg_traits_t.h | 2 +- tao/x11/array_cdr_t.h | 6 ++--- tao/x11/{ => base}/basic_traits.h | 3 +-- tao/x11/{ => base}/bounded_map_t.h | 2 +- tao/x11/{ => base}/bounded_string_t.h | 2 +- tao/x11/{ => base}/bounded_type_traits_t.h | 3 +-- tao/x11/{ => base}/bounded_vector_t.h | 2 +- tao/x11/{ => base}/idl_traits_t.h | 6 ++--- tao/x11/{ => base}/post.h | 0 tao/x11/{ => base}/pre.h | 0 tao/x11/{ => base}/stddef.h | 4 ++-- tao/x11/{ => base}/tao_corba.h | 0 tao/x11/{ => base}/taox11_export.h | 2 +- tao/x11/{ => base}/taox11_export_macros.h | 0 tao/x11/{ => base}/versioned_x11_namespace.h | 2 +- tao/x11/{ => base}/versionx11.h | 0 tao/x11/basic_argument_t.h | 4 ++-- tao/x11/bidir_giop/taox11_bidir_giop_export.h | 2 +- tao/x11/codecfactory/codecfactory.cpp | 2 +- tao/x11/codecfactory/codecfactory.h | 2 +- tao/x11/codecfactory/tao_codecfactory.h | 2 +- .../codecfactory/taox11_codecfactory_export.h | 2 +- tao/x11/dynamic_adapter.h | 2 +- tao/x11/dynamic_any/dyn_common.h | 2 +- tao/x11/dynamic_any/dynamicany.cpp | 2 +- tao/x11/dynamic_any/dynamicany.h | 2 +- .../dynamic_any/taox11_dynamicany_export.h | 2 +- tao/x11/exception.h | 4 ++-- tao/x11/fixed_t.h | 2 +- tao/x11/ifr_client_adapter.h | 2 +- tao/x11/ifr_client_adapter_impl_base.h | 2 +- tao/x11/ior_interceptor/ior_info.cpp | 2 +- tao/x11/ior_interceptor/ior_interceptor.h | 2 +- .../ior_interceptor/ior_interceptor_proxy.cpp | 2 +- .../ior_interceptor_proxy_factory.cpp | 2 +- .../taox11_ior_interceptor_export.h | 2 +- tao/x11/ior_table/ior_table.h | 2 +- tao/x11/ior_table/locator_cb.h | 2 +- tao/x11/ior_table/taox11_ior_table_export.h | 2 +- tao/x11/log.h | 4 ++-- tao/x11/logger/x11_logger_export.h | 2 +- tao/x11/long_double_argument_t.h | 4 ++-- tao/x11/map_cdr_t.h | 8 +++---- tao/x11/messaging/exception_holder_i.cpp | 2 +- tao/x11/messaging/taox11_messaging_export.h | 2 +- tao/x11/nvlist_adapter.h | 2 +- tao/x11/object_fwd.h | 4 ++-- tao/x11/object_loader.h | 2 +- tao/x11/object_traits_t.h | 2 +- tao/x11/objproxy.h | 4 ++-- tao/x11/optional_t.h | 2 +- tao/x11/orb.cpp | 2 +- tao/x11/orb_registry.cpp | 2 +- tao/x11/orb_registry.h | 4 ++-- tao/x11/orbproxy.h | 4 ++-- tao/x11/ort/object_reference_template.h | 2 +- tao/x11/ort/taox11_ort_export.h | 2 +- tao/x11/pi/client_request_info.cpp | 2 +- tao/x11/pi/interceptor_proxy.h | 2 +- tao/x11/pi/orb_initializer_registry.cpp | 2 +- tao/x11/pi/policyfactory_manager.h | 4 ++-- tao/x11/pi/request_info.cpp | 2 +- tao/x11/pi/taox11_pi_export.h | 2 +- tao/x11/pi_server/pi_server.h | 2 +- tao/x11/pi_server/server_request_info.cpp | 2 +- ...rver_request_interceptor_proxy_factory.cpp | 2 +- tao/x11/pi_server/taox11_pi_server_export.h | 2 +- tao/x11/portable_server/basic_sargument_t.h | 4 ++-- .../portable_server/operation_table_std_map.h | 2 +- .../portable_server/portableserver_proxies.h | 4 ++-- tao/x11/portable_server/sarg_traits_t.h | 2 +- tao/x11/portable_server/servant_proxy.h | 2 +- tao/x11/portable_server/servant_traits_t.h | 2 +- tao/x11/portable_server/servantbase.cpp | 2 +- tao/x11/portable_server/servantbase.h | 2 +- .../special_basic_sargument_t.h | 4 ++-- .../taox11_portableserver_export.h | 2 +- tao/x11/portable_server/upcall_command.h | 4 ++-- tao/x11/sequence_cdr_t.h | 8 +++---- tao/x11/sequence_conversion_t.h | 2 +- tao/x11/special_basic_argument_t.h | 4 ++-- tao/x11/stub_arg_traits.h | 2 +- tao/x11/system_exception.cpp | 2 +- tao/x11/taox11.mpc | 22 +++++++++---------- tao/x11/typecode_factory_adapter.h | 2 +- .../taox11_typecodefactory_export.h | 2 +- tao/x11/typecodefactory/typecodefactory.cpp | 2 +- tao/x11/typecodefactory/typecodefactory.h | 2 +- tao/x11/typecodefactory/typecodefactory_i.cpp | 2 +- tao/x11/user_exception_proxy_in_t.h | 2 +- tao/x11/user_exception_proxy_out.h | 2 +- tao/x11/valuefactory_manager_adapter.h | 2 +- tao/x11/valuetype/abstract_base.cpp | 2 +- tao/x11/valuetype/abstractbase_proxy.cpp | 2 +- tao/x11/valuetype/abstractbase_proxy.h | 2 +- tao/x11/valuetype/abstractbase_traits_t.h | 2 +- tao/x11/valuetype/taox11_valuetype_export.h | 2 +- tao/x11/valuetype/value_base.cpp | 2 +- tao/x11/valuetype/valuefactory_manager.cpp | 2 +- tao/x11/valuetype/valuetype_adapter_impl.cpp | 2 +- tao/x11/valuetype/valuetype_proxies.cpp | 2 +- tao/x11/valuetype/valuetype_proxies.h | 2 +- tao/x11/valuetype/valuetype_traits_t.h | 2 +- tao/x11/valuetype_adapter.h | 2 +- .../attr_raises/ami_test_ami_stub_export.h | 2 +- tests/custom_format/client.cpp | 2 +- tests/dynany/data.h | 2 +- tests/obv/factory/client.cpp | 2 +- .../generic_servant/generic_servant_export.h | 2 +- tests/typelib/test.idl | 1 + 142 files changed, 199 insertions(+), 200 deletions(-) rename tao/x11/{ => base}/basic_traits.h (99%) rename tao/x11/{ => base}/bounded_map_t.h (98%) rename tao/x11/{ => base}/bounded_string_t.h (99%) rename tao/x11/{ => base}/bounded_type_traits_t.h (90%) rename tao/x11/{ => base}/bounded_vector_t.h (98%) rename tao/x11/{ => base}/idl_traits_t.h (99%) rename tao/x11/{ => base}/post.h (100%) rename tao/x11/{ => base}/pre.h (100%) rename tao/x11/{ => base}/stddef.h (91%) rename tao/x11/{ => base}/tao_corba.h (100%) rename tao/x11/{ => base}/taox11_export.h (96%) rename tao/x11/{ => base}/taox11_export_macros.h (100%) rename tao/x11/{ => base}/versioned_x11_namespace.h (97%) rename tao/x11/{ => base}/versionx11.h (100%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 9aa2faad..e88fee0d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,7 +8,7 @@ assignees: '' --- **Version** -Your TAOX11 version from taox11/tao/x11/versionx11.h +Your TAOX11 version from taox11/tao/x11/base/versionx11.h **Describe the bug** A clear and concise description of what the bug is. diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md index 06334579..ba8a5ad3 100644 --- a/.github/ISSUE_TEMPLATE/custom.md +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -8,7 +8,7 @@ assignees: '' --- **Version** -Your TAOX11 version from taox11/tao/x11/versionx11.h +Your TAOX11 version from taox11/tao/x11/base/versionx11.h **Describe the issue** Description of your issue with as much as detail as possible diff --git a/bin/MPC/config/ridl_base_defaults.mpb b/bin/MPC/config/ridl_base_defaults.mpb index 49bf089b..5476cfc3 100644 --- a/bin/MPC/config/ridl_base_defaults.mpb +++ b/bin/MPC/config/ridl_base_defaults.mpb @@ -40,7 +40,7 @@ project: taox11_basedefaults, taobaseidldefaults { after -= TAO_IDL_EXE idlflags -= $(TAO_IDLFLAGS) idlflags -= -Sa -St - idlflags += -Wb,pre_include=tao/x11/pre.h \ - -Wb,post_include=tao/x11/post.h -I$(TAOX11_ROOT) + idlflags += -Wb,pre_include=tao/x11/base/pre.h \ + -Wb,post_include=tao/x11/base/post.h -I$(TAOX11_ROOT) idlflags += $(RIDLCFLAGS) -Sci -Ssi -Sa -St } diff --git a/docs/src/compilation.adoc b/docs/src/compilation.adoc index ca809c8b..fad9dc08 100644 --- a/docs/src/compilation.adoc +++ b/docs/src/compilation.adoc @@ -17,8 +17,8 @@ command line options should be used when invoking the RIDL compiler. + Command line options: + ----------------------------------- - -Wb,pre_include=tao/x11/pre.h - -Wb,post_include=tao/x11/post.h + -Wb,pre_include=tao/x11/base/pre.h + -Wb,post_include=tao/x11/base/post.h -I$TAOX11_ROOT -Sci -Ssi @@ -47,8 +47,8 @@ When a client needs to use <>, the following command line options should be applied to the RIDL compiler: ----------------------------------- - -Wb,pre_include=tao/x11/pre.h - -Wb,post_include=tao/x11/post.h + -Wb,pre_include=tao/x11/base/pre.h + -Wb,post_include=tao/x11/base/post.h -I$TAOX11_ROOT -Sci -Ssi diff --git a/examples/log_module/my_log_module_export.h b/examples/log_module/my_log_module_export.h index 07d02b2a..40ed043c 100644 --- a/examples/log_module/my_log_module_export.h +++ b/examples/log_module/my_log_module_export.h @@ -9,7 +9,7 @@ #ifndef MY_LOG_MODULE_EXPORT_H #define MY_LOG_MODULE_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (MY_LOGGER_HAS_DLL) # define MY_LOGGER_HAS_DLL 0 diff --git a/orbsvcs/orbsvcs/naming_server/taox11_cosnaming_export.h b/orbsvcs/orbsvcs/naming_server/taox11_cosnaming_export.h index 2dcbb17e..50cef6c9 100644 --- a/orbsvcs/orbsvcs/naming_server/taox11_cosnaming_export.h +++ b/orbsvcs/orbsvcs/naming_server/taox11_cosnaming_export.h @@ -7,7 +7,7 @@ #ifndef TAOX11_COSNAMING_EXPORT_H #define TAOX11_COSNAMING_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_COSNAMING_HAS_DLL) # define TAOX11_COSNAMING_HAS_DLL 0 diff --git a/ridlbe/base/config.rb b/ridlbe/base/config.rb index d861bd60..34caddcc 100644 --- a/ridlbe/base/config.rb +++ b/ridlbe/base/config.rb @@ -22,7 +22,7 @@ def determine_taox11_version beta: 0 } - base = File.join(File.dirname(__FILE__), '..', '..', 'tao', 'x11', 'versionx11.h') + base = File.join(File.dirname(__FILE__), '..', '..', 'tao', 'x11', 'base', 'versionx11.h') File.open(base, 'r') do |file| while (line = file.gets) if VERSION_REGEXP =~ line diff --git a/ridlbe/c++11/config.rb b/ridlbe/c++11/config.rb index ffd74b00..7bc87bf3 100644 --- a/ridlbe/c++11/config.rb +++ b/ridlbe/c++11/config.rb @@ -220,7 +220,7 @@ def determine_taox11_version beta: 0 } - base = File.join(File.dirname(__FILE__), '..', '..', 'tao', 'x11', 'versionx11.h') + base = File.join(File.dirname(__FILE__), '..', '..', 'tao', 'x11', 'base', 'versionx11.h') File.open(base, 'r') do |file| while (line = file.gets) if VERSION_REGEXP =~ line diff --git a/ridlbe/c++11/templates/cli/src/pre.erb b/ridlbe/c++11/templates/cli/src/pre.erb index 8026a2a1..36aaaf12 100644 --- a/ridlbe/c++11/templates/cli/src/pre.erb +++ b/ridlbe/c++11/templates/cli/src/pre.erb @@ -1,5 +1,5 @@ -#if __has_include("tao/x11/tao_corba.h") -# include "tao/x11/tao_corba.h" +#if __has_include("tao/x11/base/tao_corba.h") +# include "tao/x11/base/tao_corba.h" #endif % pre_includes.each do |incfile| #include "<%= incfile %>" diff --git a/ridlbe/c++11/templates/exp/hdr/taox11_export.erb b/ridlbe/c++11/templates/exp/hdr/taox11_export.erb index 2d334b49..21feabe4 100644 --- a/ridlbe/c++11/templates/exp/hdr/taox11_export.erb +++ b/ridlbe/c++11/templates/exp/hdr/taox11_export.erb @@ -7,7 +7,7 @@ */ <%= include_guard_start %> -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" <%= taox11_version_check %> diff --git a/ridlbe/c++11/writers/amistubheader.rb b/ridlbe/c++11/writers/amistubheader.rb index d1ce4f42..a12b3244 100644 --- a/ridlbe/c++11/writers/amistubheader.rb +++ b/ridlbe/c++11/writers/amistubheader.rb @@ -28,8 +28,8 @@ class AmiStubHeaderWriter < AmiStubHeaderBaseWriter def initialize(output = STDOUT, opts = {}) super @default_pre_includes = [ - 'tao/x11/stddef.h', - 'tao/x11/basic_traits.h', + 'tao/x11/base/stddef.h', + 'tao/x11/base/basic_traits.h', 'tao/x11/corba.h', 'tao/x11/system_exception.h' ] diff --git a/ridlbe/c++11/writers/anytypecodesrc.rb b/ridlbe/c++11/writers/anytypecodesrc.rb index c7629ed3..52da1434 100644 --- a/ridlbe/c++11/writers/anytypecodesrc.rb +++ b/ridlbe/c++11/writers/anytypecodesrc.rb @@ -33,7 +33,7 @@ def initialize(output = STDOUT, opts = {}) @default_pre_includes << 'tao/AnyTypeCode/Any_Impl_T.h' end @default_post_includes = [ - 'tao/x11/tao_corba.h', + 'tao/x11/base/tao_corba.h', 'tao/x11/objproxy.h', 'tao/x11/system_exception_x11.h', 'tao/x11/exception_macros.h', diff --git a/ridlbe/c++11/writers/helpers/version_helper.rb b/ridlbe/c++11/writers/helpers/version_helper.rb index fbd820ce..6fb8fb4d 100644 --- a/ridlbe/c++11/writers/helpers/version_helper.rb +++ b/ridlbe/c++11/writers/helpers/version_helper.rb @@ -11,7 +11,7 @@ module IDL module Cxx11 module VersionHelper def taox11_version_header - 'tao/x11/versionx11.h' + 'tao/x11/base/versionx11.h' end def taox11_version diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index df43530f..fa21e6bb 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -27,8 +27,8 @@ class StubHeaderWriter < StubHeaderBaseWriter def initialize(output = STDOUT, opts = {}) super @default_pre_includes = [ - 'tao/x11/stddef.h', - 'tao/x11/basic_traits.h' + 'tao/x11/base/stddef.h', + 'tao/x11/base/basic_traits.h' ] @default_pre_includes << 'tao/x11/corba.h' unless params[:gen_stub_proxy_source] @@ -470,13 +470,13 @@ def visit_typedef(node) when IDL::Type::Fixed add_include('tao/x11/fixed_t.h') when IDL::Type::Sequence - add_include('tao/x11/bounded_vector_t.h') if idl_type.size.to_i.positive? - add_include('tao/x11/bounded_type_traits_t.h') if idl_type.size.to_i.positive? + add_include('tao/x11/base/bounded_vector_t.h') if idl_type.size.to_i.positive? + add_include('tao/x11/base/bounded_type_traits_t.h') if idl_type.size.to_i.positive? check_idl_type(idl_type.basetype) when IDL::Type::Map add_include('map') - add_include('tao/x11/bounded_map_t.h') if idl_type.size.to_i.positive? - add_include('tao/x11/bounded_type_traits_t.h') if idl_type.size.to_i.positive? + add_include('tao/x11/base/bounded_map_t.h') if idl_type.size.to_i.positive? + add_include('tao/x11/base/bounded_type_traits_t.h') if idl_type.size.to_i.positive? check_idl_type(idl_type.keytype) check_idl_type(idl_type.valuetype) when IDL::Type::Array @@ -484,7 +484,7 @@ def visit_typedef(node) when IDL::Type::String, IDL::Type::WString add_include('tao/x11/bounded_string_t.h') if idl_type.size.to_i.positive? - add_include('tao/x11/bounded_type_traits_t.h') if idl_type.size.to_i.positive? + add_include('tao/x11/base/bounded_type_traits_t.h') if idl_type.size.to_i.positive? check_idl_type(idl_type) end end diff --git a/ridlbe/c++11/writers/stubproxysource.rb b/ridlbe/c++11/writers/stubproxysource.rb index 9aeac2cc..a2f5ac0b 100644 --- a/ridlbe/c++11/writers/stubproxysource.rb +++ b/ridlbe/c++11/writers/stubproxysource.rb @@ -28,7 +28,7 @@ def initialize(output = STDOUT, opts = {}) super @default_pre_includes = [] - @default_pre_includes << 'tao/x11/tao_corba.h' + @default_pre_includes << 'tao/x11/base/tao_corba.h' @default_pre_includes << 'tao/x11/corba.h' @default_post_includes = [] unless params[:no_cdr_streaming] diff --git a/ridlbe/c++11/writers/stubsource.rb b/ridlbe/c++11/writers/stubsource.rb index fc8cc37e..0d1d75f6 100644 --- a/ridlbe/c++11/writers/stubsource.rb +++ b/ridlbe/c++11/writers/stubsource.rb @@ -41,7 +41,7 @@ def initialize(output = STDOUT, opts = {}) if params[:gen_any_ops] && !params[:gen_anytypecode_source] @default_pre_includes << 'tao/AnyTypeCode/Any_Impl_T.h' end - @default_post_includes << 'tao/x11/tao_corba.h' unless params[:gen_stub_proxy_source] + @default_post_includes << 'tao/x11/base/tao_corba.h' unless params[:gen_stub_proxy_source] @default_post_includes << 'tao/x11/anytypecode/typecode.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source] @default_post_includes << 'tao/x11/anytypecode/typecode_impl.h' if (params[:gen_typecodes] || params[:gen_any_ops]) && !params[:gen_anytypecode_source] end diff --git a/tao/rules.taox11.GNU b/tao/rules.taox11.GNU index 61c46ef5..7c69a912 100644 --- a/tao/rules.taox11.GNU +++ b/tao/rules.taox11.GNU @@ -21,13 +21,13 @@ endif # with different minor or major or beta versions to fail. # ifeq (cmd,$(findstring cmd,$(SHELL))) -TAOX11_MAJOR_VERSION := $(shell awk "/TAOX11_MAJOR_VERSION/ { print $$3}" ${TAOX11_ROOT}/tao/x11/versionx11.h) -TAOX11_MINOR_VERSION := $(shell awk "/TAOX11_MINOR_VERSION/ { print $$3}" ${TAOX11_ROOT}/tao/x11/versionx11.h) -TAOX11_MICRO_VERSION := $(shell awk "/TAOX11_MICRO_VERSION/ { print $$3}" ${TAOX11_ROOT}/tao/x11/versionx11.h) +TAOX11_MAJOR_VERSION := $(shell awk "/TAOX11_MAJOR_VERSION/ { print $$3}" ${TAOX11_ROOT}/tao/x11/base/versionx11.h) +TAOX11_MINOR_VERSION := $(shell awk "/TAOX11_MINOR_VERSION/ { print $$3}" ${TAOX11_ROOT}/tao/x11/base/versionx11.h) +TAOX11_MICRO_VERSION := $(shell awk "/TAOX11_MICRO_VERSION/ { print $$3}" ${TAOX11_ROOT}/tao/x11/base/versionx11.h) else -TAOX11_MAJOR_VERSION := $(shell awk '/TAOX11_MAJOR_VERSION/ { print $$3}' ${TAOX11_ROOT}/tao/x11/versionx11.h) -TAOX11_MINOR_VERSION := $(shell awk '/TAOX11_MINOR_VERSION/ { print $$3}' ${TAOX11_ROOT}/tao/x11/versionx11.h) -TAOX11_MICRO_VERSION := $(shell awk '/TAOX11_MICRO_VERSION/ { print $$3}' ${TAOX11_ROOT}/tao/x11/versionx11.h) +TAOX11_MAJOR_VERSION := $(shell awk '/TAOX11_MAJOR_VERSION/ { print $$3}' ${TAOX11_ROOT}/tao/x11/base/versionx11.h) +TAOX11_MINOR_VERSION := $(shell awk '/TAOX11_MINOR_VERSION/ { print $$3}' ${TAOX11_ROOT}/tao/x11/base/versionx11.h) +TAOX11_MICRO_VERSION := $(shell awk '/TAOX11_MICRO_VERSION/ { print $$3}' ${TAOX11_ROOT}/tao/x11/base/versionx11.h) endif GNUACE_PROJECT_VERSION ?= $(TAOX11_MAJOR_VERSION).$(TAOX11_MINOR_VERSION).$(TAOX11_MICRO_VERSION) diff --git a/tao/x11/PolicyC.h b/tao/x11/PolicyC.h index a4a8c9bf..85a33cca 100644 --- a/tao/x11/PolicyC.h +++ b/tao/x11/PolicyC.h @@ -18,17 +18,17 @@ #ifndef __RIDL_POLICYC_H_INCLUDED__ #define __RIDL_POLICYC_H_INCLUDED__ -#include /**/ "tao/x11/pre.h" +#include /**/ "tao/x11/base/pre.h" -#include "tao/x11/stddef.h" -#include "tao/x11/basic_traits.h" +#include "tao/x11/base/stddef.h" +#include "tao/x11/base/basic_traits.h" #include "tao/x11/corba.h" #include "tao/x11/system_exception.h" #include "tao/x11/object.h" #include "tao/x11/user_exception.h" #include "tao/x11/anytypecode/any.h" #include "tao/x11/anytypecode/typecode_ref.h" -#include "tao/x11/taox11_export.h" +#include "tao/x11/base/taox11_export.h" using namespace TAOX11_NAMESPACE; @@ -518,7 +518,7 @@ TAOX11_Export std::ostream& operator<< ( #include "PolicyP.h" #endif -#include /**/ "tao/x11/post.h" +#include /**/ "tao/x11/base/post.h" #endif // __RIDL_POLICYC_H_INCLUDED__ diff --git a/tao/x11/amic_traits_t.h b/tao/x11/amic_traits_t.h index 85b73045..0d1f8a74 100644 --- a/tao/x11/amic_traits_t.h +++ b/tao/x11/amic_traits_t.h @@ -10,7 +10,7 @@ #ifndef TAOX11_AMIC_TRAITS_T_H_INCLUDED #define TAOX11_AMIC_TRAITS_T_H_INCLUDED -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/anyinsert_adapter.h b/tao/x11/anyinsert_adapter.h index 261c38f0..c2f203bb 100644 --- a/tao/x11/anyinsert_adapter.h +++ b/tao/x11/anyinsert_adapter.h @@ -14,8 +14,8 @@ #include "ace/Service_Object.h" -#include "tao/x11/tao_corba.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/tao_corba.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/object_traits_t.h" #include "tao/x11/system_exception.h" diff --git a/tao/x11/anytypecode/any.cpp b/tao/x11/anytypecode/any.cpp index fc2148d3..70774ed2 100644 --- a/tao/x11/anytypecode/any.cpp +++ b/tao/x11/anytypecode/any.cpp @@ -8,7 +8,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/object.h" #include "tao/x11/stub_arg_traits.h" #include "tao/x11/anytypecode/any.h" diff --git a/tao/x11/anytypecode/any.h b/tao/x11/anytypecode/any.h index 3d4a6d1b..510eb61f 100644 --- a/tao/x11/anytypecode/any.h +++ b/tao/x11/anytypecode/any.h @@ -15,11 +15,11 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/system_exception.h" #include "tao/x11/object_fwd.h" -#include "tao/x11/basic_traits.h" -#include "tao/x11/taox11_export.h" +#include "tao/x11/base/basic_traits.h" +#include "tao/x11/base/taox11_export.h" #include "tao/x11/anytypecode/any_impl.h" #include "tao/x11/anytypecode/typecode_ref.h" diff --git a/tao/x11/anytypecode/any_arg_traits.h b/tao/x11/anytypecode/any_arg_traits.h index d94eb8ae..afb38166 100644 --- a/tao/x11/anytypecode/any_arg_traits.h +++ b/tao/x11/anytypecode/any_arg_traits.h @@ -15,7 +15,7 @@ #include "tao/CORBA_methods.h" #include "tao/x11/basic_argument_t.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/arg_traits_t.h" #include "tao/x11/anyinsert_policy_t.h" diff --git a/tao/x11/anytypecode/any_impl.h b/tao/x11/anytypecode/any_impl.h index a62467de..b3c24f76 100644 --- a/tao/x11/anytypecode/any_impl.h +++ b/tao/x11/anytypecode/any_impl.h @@ -14,9 +14,9 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/object_fwd.h" -#include "tao/x11/taox11_export.h" +#include "tao/x11/base/taox11_export.h" #include "tao/x11/anytypecode/typecode_ref.h" #include "tao/x11/anytypecode/taox11_anytypecode_export.h" diff --git a/tao/x11/anytypecode/any_util.h b/tao/x11/anytypecode/any_util.h index c0c7f309..28818363 100644 --- a/tao/x11/anytypecode/any_util.h +++ b/tao/x11/anytypecode/any_util.h @@ -14,8 +14,8 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/tao_corba.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/tao_corba.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/anytypecode/taox11_anytypecode_export.h" #include "tao/x11/anytypecode/any_arg_traits.h" diff --git a/tao/x11/anytypecode/anyinsert.h b/tao/x11/anytypecode/anyinsert.h index 384adb50..92733cf4 100644 --- a/tao/x11/anytypecode/anyinsert.h +++ b/tao/x11/anytypecode/anyinsert.h @@ -13,11 +13,11 @@ #pragma once -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/PolicyC.h" #include "ace/Service_Config.h" -#include "tao/x11/basic_traits.h" +#include "tao/x11/base/basic_traits.h" #include "tao/x11/anyinsert_adapter.h" #include "tao/x11/anytypecode/any.h" diff --git a/tao/x11/anytypecode/system_exceptionA.cpp b/tao/x11/anytypecode/system_exceptionA.cpp index 1d99c682..ca1ecc53 100644 --- a/tao/x11/anytypecode/system_exceptionA.cpp +++ b/tao/x11/anytypecode/system_exceptionA.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/corba.h" #include "tao/x11/system_exception.h" #include "tao/x11/system_exception_x11.h" diff --git a/tao/x11/anytypecode/taox11_anytypecode_export.h b/tao/x11/anytypecode/taox11_anytypecode_export.h index 793db2ad..a3600be5 100644 --- a/tao/x11/anytypecode/taox11_anytypecode_export.h +++ b/tao/x11/anytypecode/taox11_anytypecode_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_ANYTYPECODE_EXPORT_H #define TAOX11_ANYTYPECODE_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_ANYTYPECODE_HAS_DLL) # define TAOX11_ANYTYPECODE_HAS_DLL 0 diff --git a/tao/x11/anytypecode/typecode_case_t.h b/tao/x11/anytypecode/typecode_case_t.h index 8b8a8eb6..02b8dc0e 100644 --- a/tao/x11/anytypecode/typecode_case_t.h +++ b/tao/x11/anytypecode/typecode_case_t.h @@ -12,7 +12,7 @@ #pragma once -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/AnyTypeCode/TypeCode.h" #include "tao/AnyTypeCode/TypeCode_Case_Base_T.h" diff --git a/tao/x11/anytypecode/typecode_impl.cpp b/tao/x11/anytypecode/typecode_impl.cpp index 0619bb04..fbb52589 100644 --- a/tao/x11/anytypecode/typecode_impl.cpp +++ b/tao/x11/anytypecode/typecode_impl.cpp @@ -15,7 +15,7 @@ #include "tao/AnyTypeCode/Struct_TypeCode_Static.h" #include "tao/AnyTypeCode/TypeCode_Struct_Field.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/anytypecode/taox11_anytypecode_export.h" #include "tao/x11/object_traits_t.h" #include "tao/x11/anytypecode/any_util.h" diff --git a/tao/x11/anytypecode/typecode_impl.h b/tao/x11/anytypecode/typecode_impl.h index acb6beb6..02181a69 100644 --- a/tao/x11/anytypecode/typecode_impl.h +++ b/tao/x11/anytypecode/typecode_impl.h @@ -15,7 +15,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/sequence_cdr_t.h" #include "tao/x11/anytypecode/VisibilityC.h" diff --git a/tao/x11/anytypecode/typecode_ref.h b/tao/x11/anytypecode/typecode_ref.h index 5e8ff3bb..495c5772 100644 --- a/tao/x11/anytypecode/typecode_ref.h +++ b/tao/x11/anytypecode/typecode_ref.h @@ -13,7 +13,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/system_exception.h" #include "tao/x11/object_traits_t.h" #include "tao/x11/anytypecode/taox11_anytypecode_export.h" diff --git a/tao/x11/arg_traits_t.h b/tao/x11/arg_traits_t.h index 7928b6e8..3e04b1c1 100644 --- a/tao/x11/arg_traits_t.h +++ b/tao/x11/arg_traits_t.h @@ -12,7 +12,7 @@ #pragma once -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/array_cdr_t.h b/tao/x11/array_cdr_t.h index 81866bca..a4129e18 100644 --- a/tao/x11/array_cdr_t.h +++ b/tao/x11/array_cdr_t.h @@ -12,9 +12,9 @@ #include #include -#include "tao/x11/tao_corba.h" -#include "tao/x11/taox11_export.h" -#include "tao/x11/basic_traits.h" +#include "tao/x11/base/tao_corba.h" +#include "tao/x11/base/taox11_export.h" +#include "tao/x11/base/basic_traits.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/tao/x11/basic_traits.h b/tao/x11/base/basic_traits.h similarity index 99% rename from tao/x11/basic_traits.h rename to tao/x11/base/basic_traits.h index 5372ceca..c0c8b1d9 100644 --- a/tao/x11/basic_traits.h +++ b/tao/x11/base/basic_traits.h @@ -10,7 +10,7 @@ #ifndef TAOX11_BASIC_TRAITS_H_INCLUDED #define TAOX11_BASIC_TRAITS_H_INCLUDED -#include "tao/x11/idl_traits_t.h" +#include "tao/x11/base/idl_traits_t.h" namespace TAOX11_NAMESPACE { @@ -411,7 +411,6 @@ namespace TAOX11_NAMESPACE typename writer_t::formatter_t>::type; return IDL::traits::write_on (os, w.val_, formatter_t ()); } - } // namespace IDL } // namespace TAOX11_NAMESPACE diff --git a/tao/x11/bounded_map_t.h b/tao/x11/base/bounded_map_t.h similarity index 98% rename from tao/x11/bounded_map_t.h rename to tao/x11/base/bounded_map_t.h index 065e00d0..6750d2be 100644 --- a/tao/x11/bounded_map_t.h +++ b/tao/x11/base/bounded_map_t.h @@ -13,7 +13,7 @@ #include #include -#include "tao/x11/versioned_x11_namespace.h" +#include "tao/x11/base/versioned_x11_namespace.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/bounded_string_t.h b/tao/x11/base/bounded_string_t.h similarity index 99% rename from tao/x11/bounded_string_t.h rename to tao/x11/base/bounded_string_t.h index 465dd1e4..2e459970 100644 --- a/tao/x11/bounded_string_t.h +++ b/tao/x11/base/bounded_string_t.h @@ -12,7 +12,7 @@ #define __IDL_BOUNDED_STRING_T_H_INCLUDED__ #include -#include "tao/x11/versioned_x11_namespace.h" +#include "tao/x11/base/versioned_x11_namespace.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/bounded_type_traits_t.h b/tao/x11/base/bounded_type_traits_t.h similarity index 90% rename from tao/x11/bounded_type_traits_t.h rename to tao/x11/base/bounded_type_traits_t.h index ed7d35c6..e1c9e7ac 100644 --- a/tao/x11/bounded_type_traits_t.h +++ b/tao/x11/base/bounded_type_traits_t.h @@ -9,8 +9,7 @@ #ifndef TAOX11_BOUNDED_TYPE_TRAITS_T_H_INCLUDED #define TAOX11_BOUNDED_TYPE_TRAITS_T_H_INCLUDED -#include "tao/x11/idl_traits_t.h" -#include "tao/x11/object_traits_t.h" +#include namespace TAOX11_NAMESPACE { diff --git a/tao/x11/bounded_vector_t.h b/tao/x11/base/bounded_vector_t.h similarity index 98% rename from tao/x11/bounded_vector_t.h rename to tao/x11/base/bounded_vector_t.h index 80c76287..6b4a9300 100644 --- a/tao/x11/bounded_vector_t.h +++ b/tao/x11/base/bounded_vector_t.h @@ -13,7 +13,7 @@ #include #include -#include "tao/x11/versioned_x11_namespace.h" +#include "tao/x11/base/versioned_x11_namespace.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/idl_traits_t.h b/tao/x11/base/idl_traits_t.h similarity index 99% rename from tao/x11/idl_traits_t.h rename to tao/x11/base/idl_traits_t.h index 250acbfe..3bea6fbf 100644 --- a/tao/x11/idl_traits_t.h +++ b/tao/x11/base/idl_traits_t.h @@ -10,9 +10,9 @@ #ifndef TAOX11_IDL_TRAITS_T_H_INCLUDED #define TAOX11_IDL_TRAITS_T_H_INCLUDED -#include "tao/x11/stddef.h" -#include "tao/x11/bounded_vector_t.h" -#include "tao/x11/bounded_map_t.h" +#include "tao/x11/base/stddef.h" +#include "tao/x11/base/bounded_vector_t.h" +#include "tao/x11/base/bounded_map_t.h" #include #include #include diff --git a/tao/x11/post.h b/tao/x11/base/post.h similarity index 100% rename from tao/x11/post.h rename to tao/x11/base/post.h diff --git a/tao/x11/pre.h b/tao/x11/base/pre.h similarity index 100% rename from tao/x11/pre.h rename to tao/x11/base/pre.h diff --git a/tao/x11/stddef.h b/tao/x11/base/stddef.h similarity index 91% rename from tao/x11/stddef.h rename to tao/x11/base/stddef.h index 6518d8b0..fea8ed3a 100644 --- a/tao/x11/stddef.h +++ b/tao/x11/base/stddef.h @@ -49,8 +49,8 @@ #if __has_include("tao/orbconf.h") # include "tao/orbconf.h" #endif -#include "tao/x11/taox11_export.h" -#include "tao/x11/versioned_x11_namespace.h" +#include "tao/x11/base/taox11_export.h" +#include "tao/x11/base/versioned_x11_namespace.h" #define TAOX11_CORBA TAOX11_NAMESPACE::CORBA diff --git a/tao/x11/tao_corba.h b/tao/x11/base/tao_corba.h similarity index 100% rename from tao/x11/tao_corba.h rename to tao/x11/base/tao_corba.h diff --git a/tao/x11/taox11_export.h b/tao/x11/base/taox11_export.h similarity index 96% rename from tao/x11/taox11_export.h rename to tao/x11/base/taox11_export.h index d445682e..8f56db8a 100644 --- a/tao/x11/taox11_export.h +++ b/tao/x11/base/taox11_export.h @@ -11,7 +11,7 @@ #ifndef TAOX11_EXPORT_H #define TAOX11_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_HAS_DLL) # define TAOX11_HAS_DLL 0 diff --git a/tao/x11/taox11_export_macros.h b/tao/x11/base/taox11_export_macros.h similarity index 100% rename from tao/x11/taox11_export_macros.h rename to tao/x11/base/taox11_export_macros.h diff --git a/tao/x11/versioned_x11_namespace.h b/tao/x11/base/versioned_x11_namespace.h similarity index 97% rename from tao/x11/versioned_x11_namespace.h rename to tao/x11/base/versioned_x11_namespace.h index 7095b70e..d222a9c8 100644 --- a/tao/x11/versioned_x11_namespace.h +++ b/tao/x11/base/versioned_x11_namespace.h @@ -17,7 +17,7 @@ #if defined (TAOX11_HAS_VERSIONED_NAMESPACE) && TAOX11_HAS_VERSIONED_NAMESPACE == 1 # ifndef TAOX11_VERSIONED_NAMESPACE_NAME -# include "tao/x11/versionx11.h" +# include "tao/x11/base/versionx11.h" // Preprocessor symbols will not be expanded if they are // concatenated. Force the preprocessor to expand them during the diff --git a/tao/x11/versionx11.h b/tao/x11/base/versionx11.h similarity index 100% rename from tao/x11/versionx11.h rename to tao/x11/base/versionx11.h diff --git a/tao/x11/basic_argument_t.h b/tao/x11/basic_argument_t.h index 73e8d00e..5723659e 100644 --- a/tao/x11/basic_argument_t.h +++ b/tao/x11/basic_argument_t.h @@ -14,8 +14,8 @@ #include "tao/Argument.h" -#include "tao/x11/stddef.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/stddef.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/arg_traits_t.h" namespace TAOX11_NAMESPACE diff --git a/tao/x11/bidir_giop/taox11_bidir_giop_export.h b/tao/x11/bidir_giop/taox11_bidir_giop_export.h index 1c5f3efb..6ade8ff2 100644 --- a/tao/x11/bidir_giop/taox11_bidir_giop_export.h +++ b/tao/x11/bidir_giop/taox11_bidir_giop_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_BIDIRGIOP_EXPORT_H #define TAOX11_BIDIRGIOP_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_BIDIRGIOP_HAS_DLL) # define TAOX11_BIDIRGIOP_HAS_DLL 0 diff --git a/tao/x11/codecfactory/codecfactory.cpp b/tao/x11/codecfactory/codecfactory.cpp index f2eb851a..add835c9 100644 --- a/tao/x11/codecfactory/codecfactory.cpp +++ b/tao/x11/codecfactory/codecfactory.cpp @@ -9,7 +9,7 @@ #include "tao/CodecFactory/CodecFactory.h" #include "tao/objectid.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/codecfactory/codecfactory.h" #include "tao/x11/orb_registry.h" diff --git a/tao/x11/codecfactory/codecfactory.h b/tao/x11/codecfactory/codecfactory.h index b4008228..7bf89d53 100644 --- a/tao/x11/codecfactory/codecfactory.h +++ b/tao/x11/codecfactory/codecfactory.h @@ -11,7 +11,7 @@ #pragma once -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/object_loader.h" #include "tao/x11/codecfactory/taox11_codecfactory_export.h" diff --git a/tao/x11/codecfactory/tao_codecfactory.h b/tao/x11/codecfactory/tao_codecfactory.h index 4ddffdd9..83b1314d 100644 --- a/tao/x11/codecfactory/tao_codecfactory.h +++ b/tao/x11/codecfactory/tao_codecfactory.h @@ -9,7 +9,7 @@ #ifndef TAOX11_TAO_CODECFACTORY_H_INCLUDE #define TAOX11_TAO_CODECFACTORY_H_INCLUDE -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/CodecFactory/CodecFactory.h" #include "tao/OctetSeqC.h" diff --git a/tao/x11/codecfactory/taox11_codecfactory_export.h b/tao/x11/codecfactory/taox11_codecfactory_export.h index 5035db26..8f7405d3 100644 --- a/tao/x11/codecfactory/taox11_codecfactory_export.h +++ b/tao/x11/codecfactory/taox11_codecfactory_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_CODECFACTORY_EXPORT_H #define TAOX11_CODECFACTORY_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_CODECFACTORY_HAS_DLL) # define TAOX11_CODECFACTORY_HAS_DLL 0 diff --git a/tao/x11/dynamic_adapter.h b/tao/x11/dynamic_adapter.h index b9beb849..d9dc05a1 100644 --- a/tao/x11/dynamic_adapter.h +++ b/tao/x11/dynamic_adapter.h @@ -14,7 +14,7 @@ #include "ace/Service_Object.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/object_traits_t.h" #if !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) diff --git a/tao/x11/dynamic_any/dyn_common.h b/tao/x11/dynamic_any/dyn_common.h index d40b79a0..eb7ace85 100644 --- a/tao/x11/dynamic_any/dyn_common.h +++ b/tao/x11/dynamic_any/dyn_common.h @@ -16,7 +16,7 @@ #include "tao/x11/dynamic_any/taox11_dynamicany_export.h" #include "tao/x11/anytypecode/any.h" #include "tao/x11/anytypecode/typecode.h" -#include "tao/x11/versioned_x11_namespace.h" +#include "tao/x11/base/versioned_x11_namespace.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/dynamic_any/dynamicany.cpp b/tao/x11/dynamic_any/dynamicany.cpp index 289cb276..043968c1 100644 --- a/tao/x11/dynamic_any/dynamicany.cpp +++ b/tao/x11/dynamic_any/dynamicany.cpp @@ -8,7 +8,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "ace/Service_Config.h" #include "tao/x11/dynamic_any/dynanyfactory.h" #include "tao/x11/orb_registry.h" diff --git a/tao/x11/dynamic_any/dynamicany.h b/tao/x11/dynamic_any/dynamicany.h index 2fb31c4d..a65dea55 100644 --- a/tao/x11/dynamic_any/dynamicany.h +++ b/tao/x11/dynamic_any/dynamicany.h @@ -12,7 +12,7 @@ #pragma once -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #if !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) diff --git a/tao/x11/dynamic_any/taox11_dynamicany_export.h b/tao/x11/dynamic_any/taox11_dynamicany_export.h index 4f2e2376..b02862b3 100644 --- a/tao/x11/dynamic_any/taox11_dynamicany_export.h +++ b/tao/x11/dynamic_any/taox11_dynamicany_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_DYNAMICANY_EXPORT_H #define TAOX11_DYNAMICANY_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) # if !defined (TAOX11_DYNAMICANY_HAS_DLL) diff --git a/tao/x11/exception.h b/tao/x11/exception.h index 9c3e250f..afcb902f 100644 --- a/tao/x11/exception.h +++ b/tao/x11/exception.h @@ -10,10 +10,10 @@ #ifndef TAOX11_EXCEPTION_H_INCLUDED #define TAOX11_EXCEPTION_H_INCLUDED -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include /**/ "tao/Versioned_Namespace.h" #include "tao/x11/anytypecode/taox11_anytypecode_export.h" -#include "tao/x11/idl_traits_t.h" +#include "tao/x11/base/idl_traits_t.h" #include diff --git a/tao/x11/fixed_t.h b/tao/x11/fixed_t.h index c3070b07..9d2ffbd8 100644 --- a/tao/x11/fixed_t.h +++ b/tao/x11/fixed_t.h @@ -12,7 +12,7 @@ #define __IDL_FIXED_T_H_INCLUDED__ #include -#include "tao/x11/versioned_x11_namespace.h" +#include "tao/x11/base/versioned_x11_namespace.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/ifr_client_adapter.h b/tao/x11/ifr_client_adapter.h index ae222d17..00a287ba 100644 --- a/tao/x11/ifr_client_adapter.h +++ b/tao/x11/ifr_client_adapter.h @@ -14,7 +14,7 @@ #include "ace/Service_Object.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/object_traits_t.h" #if !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) diff --git a/tao/x11/ifr_client_adapter_impl_base.h b/tao/x11/ifr_client_adapter_impl_base.h index 59a80c39..28d3e51c 100644 --- a/tao/x11/ifr_client_adapter_impl_base.h +++ b/tao/x11/ifr_client_adapter_impl_base.h @@ -12,7 +12,7 @@ #pragma once -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/ifr_client_adapter.h" #if !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) diff --git a/tao/x11/ior_interceptor/ior_info.cpp b/tao/x11/ior_interceptor/ior_info.cpp index 708da4e7..dbcf9fc2 100644 --- a/tao/x11/ior_interceptor/ior_info.cpp +++ b/tao/x11/ior_interceptor/ior_info.cpp @@ -8,7 +8,7 @@ */ // TAO namespace dependencies -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/ObjRefTemplate/Default_ORTC.h" #include "tao/ObjRefTemplate/ObjectReferenceTemplate.h" #include "tao/x11/objproxy.h" diff --git a/tao/x11/ior_interceptor/ior_interceptor.h b/tao/x11/ior_interceptor/ior_interceptor.h index 799d8cd8..ca53304e 100644 --- a/tao/x11/ior_interceptor/ior_interceptor.h +++ b/tao/x11/ior_interceptor/ior_interceptor.h @@ -11,7 +11,7 @@ #pragma once -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/ior_interceptor/taox11_ior_interceptor_export.h" diff --git a/tao/x11/ior_interceptor/ior_interceptor_proxy.cpp b/tao/x11/ior_interceptor/ior_interceptor_proxy.cpp index 091d9bee..f9b3e4f9 100644 --- a/tao/x11/ior_interceptor/ior_interceptor_proxy.cpp +++ b/tao/x11/ior_interceptor/ior_interceptor_proxy.cpp @@ -8,7 +8,7 @@ */ // TAO dependencies -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/pi/tao_pi.h" #include "tao/x11/ior_interceptor/tao_ior_interceptor.h" #include "tao/x11/sequence_conversion_t.h" diff --git a/tao/x11/ior_interceptor/ior_interceptor_proxy_factory.cpp b/tao/x11/ior_interceptor/ior_interceptor_proxy_factory.cpp index 79e938ab..079614c4 100644 --- a/tao/x11/ior_interceptor/ior_interceptor_proxy_factory.cpp +++ b/tao/x11/ior_interceptor/ior_interceptor_proxy_factory.cpp @@ -8,7 +8,7 @@ */ // pull in TAO dependencies first -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/ior_interceptor/tao_ior_interceptor.h" // TAOX11 dependencies diff --git a/tao/x11/ior_interceptor/taox11_ior_interceptor_export.h b/tao/x11/ior_interceptor/taox11_ior_interceptor_export.h index 5b8ad918..514dc9ba 100644 --- a/tao/x11/ior_interceptor/taox11_ior_interceptor_export.h +++ b/tao/x11/ior_interceptor/taox11_ior_interceptor_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_IOR_INTERCEPTOR_EXPORT_H #define TAOX11_IOR_INTERCEPTOR_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_IOR_INTERCEPTOR_HAS_DLL) # define TAOX11_IOR_INTERCEPTOR_HAS_DLL 0 diff --git a/tao/x11/ior_table/ior_table.h b/tao/x11/ior_table/ior_table.h index 5a22593f..18fe62d2 100644 --- a/tao/x11/ior_table/ior_table.h +++ b/tao/x11/ior_table/ior_table.h @@ -11,7 +11,7 @@ #pragma once -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "ace/Service_Object.h" #include "tao/x11/ior_table/taox11_ior_table_export.h" diff --git a/tao/x11/ior_table/locator_cb.h b/tao/x11/ior_table/locator_cb.h index 10094227..4ccfb372 100644 --- a/tao/x11/ior_table/locator_cb.h +++ b/tao/x11/ior_table/locator_cb.h @@ -13,7 +13,7 @@ #include "tao/x11/ior_table/tao_ior_table.h" #include "tao/x11/ior_table/taox11_ior_table_export.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/ior_table/ior_table.h" namespace TAOX11_NAMESPACE diff --git a/tao/x11/ior_table/taox11_ior_table_export.h b/tao/x11/ior_table/taox11_ior_table_export.h index 03f627fe..6c025a42 100644 --- a/tao/x11/ior_table/taox11_ior_table_export.h +++ b/tao/x11/ior_table/taox11_ior_table_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_IOR_TABLE_EXPORT_H #define TAOX11_IOR_TABLE_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_IOR_TABLE_HAS_DLL) # define TAOX11_IOR_TABLE_HAS_DLL 0 diff --git a/tao/x11/log.h b/tao/x11/log.h index 2acb0fa4..de335d1f 100644 --- a/tao/x11/log.h +++ b/tao/x11/log.h @@ -11,8 +11,8 @@ #define TAOX11_LOG_H #include "tao/x11/logger/log_base.h" -#include "tao/x11/versioned_x11_namespace.h" -#include "tao/x11/taox11_export.h" +#include "tao/x11/base/versioned_x11_namespace.h" +#include "tao/x11/base/taox11_export.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/logger/x11_logger_export.h b/tao/x11/logger/x11_logger_export.h index eb6f84b0..558300e7 100644 --- a/tao/x11/logger/x11_logger_export.h +++ b/tao/x11/logger/x11_logger_export.h @@ -9,7 +9,7 @@ #ifndef X11_LOGGER_EXPORT_H #define X11_LOGGER_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (X11_LOGGER_HAS_DLL) # define X11_LOGGER_HAS_DLL 0 diff --git a/tao/x11/long_double_argument_t.h b/tao/x11/long_double_argument_t.h index 2d015ea9..9c7e0ede 100644 --- a/tao/x11/long_double_argument_t.h +++ b/tao/x11/long_double_argument_t.h @@ -10,8 +10,8 @@ #ifndef TAOX11_LONG_DOUBLE_ARGUMENT_T_H_INCLUDED #define TAOX11_LONG_DOUBLE_ARGUMENT_T_H_INCLUDED -#include "tao/x11/tao_corba.h" -#include "tao/x11/taox11_export.h" +#include "tao/x11/base/tao_corba.h" +#include "tao/x11/base/taox11_export.h" // In cases where sizeof(long double) == 16 the 'long double' type // is identical to CORBA::LongDouble (old C++) and the arg traits diff --git a/tao/x11/map_cdr_t.h b/tao/x11/map_cdr_t.h index 0cccc09e..b1188170 100644 --- a/tao/x11/map_cdr_t.h +++ b/tao/x11/map_cdr_t.h @@ -10,10 +10,10 @@ #ifndef TAOX11_MAP_CDR_T_H_INCLUDED #define TAOX11_MAP_CDR_T_H_INCLUDED -#include "tao/x11/tao_corba.h" -#include "tao/x11/taox11_export.h" -#include "tao/x11/basic_traits.h" -#include "tao/x11/bounded_map_t.h" +#include "tao/x11/base/tao_corba.h" +#include "tao/x11/base/taox11_export.h" +#include "tao/x11/base/basic_traits.h" +#include "tao/x11/base/bounded_map_t.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/tao/x11/messaging/exception_holder_i.cpp b/tao/x11/messaging/exception_holder_i.cpp index b5b5ab4b..3cbb7aae 100644 --- a/tao/x11/messaging/exception_holder_i.cpp +++ b/tao/x11/messaging/exception_holder_i.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/anytypecode/typecode.h" #include "tao/x11/objproxy.h" #include "tao/x11/messaging/exception_holder_i.h" diff --git a/tao/x11/messaging/taox11_messaging_export.h b/tao/x11/messaging/taox11_messaging_export.h index 2a40a753..b46865ea 100644 --- a/tao/x11/messaging/taox11_messaging_export.h +++ b/tao/x11/messaging/taox11_messaging_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_MESSAGING_EXPORT_H #define TAOX11_MESSAGING_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_MESSAGING_HAS_DLL) # define TAOX11_MESSAGING_HAS_DLL 0 diff --git a/tao/x11/nvlist_adapter.h b/tao/x11/nvlist_adapter.h index 763f45c2..d3ab6788 100644 --- a/tao/x11/nvlist_adapter.h +++ b/tao/x11/nvlist_adapter.h @@ -13,7 +13,7 @@ #pragma once #include "ace/Service_Object.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/object_traits_t.h" #if (TAO_HAS_MINIMUM_CORBA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) diff --git a/tao/x11/object_fwd.h b/tao/x11/object_fwd.h index f2cf3c0b..88a7cae1 100644 --- a/tao/x11/object_fwd.h +++ b/tao/x11/object_fwd.h @@ -12,9 +12,9 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/object_traits_t.h" -#include "tao/x11/idl_traits_t.h" +#include "tao/x11/base/idl_traits_t.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/object_loader.h b/tao/x11/object_loader.h index e88cb85b..5a43f2fb 100644 --- a/tao/x11/object_loader.h +++ b/tao/x11/object_loader.h @@ -12,7 +12,7 @@ #pragma once #include "ace/Service_Object.h" -#include "tao/x11/taox11_export.h" +#include "tao/x11/base/taox11_export.h" #include "tao/x11/orb.h" namespace TAOX11_NAMESPACE diff --git a/tao/x11/object_traits_t.h b/tao/x11/object_traits_t.h index 4c4a87f3..1894a354 100644 --- a/tao/x11/object_traits_t.h +++ b/tao/x11/object_traits_t.h @@ -13,7 +13,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/system_exception.h" namespace TAOX11_NAMESPACE diff --git a/tao/x11/objproxy.h b/tao/x11/objproxy.h index 1cbef80e..72aaef23 100644 --- a/tao/x11/objproxy.h +++ b/tao/x11/objproxy.h @@ -14,7 +14,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/ORB.h" #include "tao/SystemException.h" #include "tao/Basic_Types.h" @@ -23,7 +23,7 @@ #include "tao/Objref_VarOut_T.h" #include "tao/VarOut_T.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/optional_t.h b/tao/x11/optional_t.h index 4ca6c07a..aff68909 100644 --- a/tao/x11/optional_t.h +++ b/tao/x11/optional_t.h @@ -12,7 +12,7 @@ #define __IDL__OPTIONAL_T_H_INCLUDED__ #include -#include "tao/x11/versioned_x11_namespace.h" +#include "tao/x11/base/versioned_x11_namespace.h" #if defined (ACE_HAS_CPP17) diff --git a/tao/x11/orb.cpp b/tao/x11/orb.cpp index dff6ef0d..aad4a712 100644 --- a/tao/x11/orb.cpp +++ b/tao/x11/orb.cpp @@ -30,7 +30,7 @@ # endif #endif #include "tao/x11/log.h" -#include "tao/x11/versionx11.h" +#include "tao/x11/base/versionx11.h" #if !defined (TAOX11_RELEASE_BUILDSTAMP) # define TAOX11_RELEASE_BUILDSTAMP \ diff --git a/tao/x11/orb_registry.cpp b/tao/x11/orb_registry.cpp index 6d371eed..4d1e3aff 100644 --- a/tao/x11/orb_registry.cpp +++ b/tao/x11/orb_registry.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/objproxy.h" #include "tao/x11/orbproxy.h" #include "tao/objectid.h" diff --git a/tao/x11/orb_registry.h b/tao/x11/orb_registry.h index 156064b9..33207724 100644 --- a/tao/x11/orb_registry.h +++ b/tao/x11/orb_registry.h @@ -10,8 +10,8 @@ #ifndef TAOX11_ORB_REGISTRY_H_INCLUDED #define TAOX11_ORB_REGISTRY_H_INCLUDED -#include "tao/x11/stddef.h" -#include "tao/x11/taox11_export.h" +#include "tao/x11/base/stddef.h" +#include "tao/x11/base/taox11_export.h" #include "tao/x11/object.h" #include "tao/x11/orb.h" #include "tao/x11/anyinsert_adapter.h" diff --git a/tao/x11/orbproxy.h b/tao/x11/orbproxy.h index f1ab5ae7..782cc7e2 100644 --- a/tao/x11/orbproxy.h +++ b/tao/x11/orbproxy.h @@ -14,7 +14,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/ORB.h" #include "tao/ORB_Core.h" #include "tao/SystemException.h" @@ -24,7 +24,7 @@ #include "tao/Objref_VarOut_T.h" #include "tao/VarOut_T.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/ort/object_reference_template.h b/tao/x11/ort/object_reference_template.h index 29054f86..97e7d41a 100644 --- a/tao/x11/ort/object_reference_template.h +++ b/tao/x11/ort/object_reference_template.h @@ -11,7 +11,7 @@ #pragma once -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/ort/taox11_ort_export.h" diff --git a/tao/x11/ort/taox11_ort_export.h b/tao/x11/ort/taox11_ort_export.h index 01c757c5..1147b808 100644 --- a/tao/x11/ort/taox11_ort_export.h +++ b/tao/x11/ort/taox11_ort_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_OBJREF_TEMPLATE_EXPORT_H #define TAOX11_OBJREF_TEMPLATE_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_OBJREF_TEMPLATE_HAS_DLL) # define TAOX11_OBJREF_TEMPLATE_HAS_DLL 0 diff --git a/tao/x11/pi/client_request_info.cpp b/tao/x11/pi/client_request_info.cpp index 3d184dde..adcf656a 100644 --- a/tao/x11/pi/client_request_info.cpp +++ b/tao/x11/pi/client_request_info.cpp @@ -8,7 +8,7 @@ */ // TAO namespace dependencies -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/objproxy.h" #include "tao/AnyTypeCode/DynamicC.h" diff --git a/tao/x11/pi/interceptor_proxy.h b/tao/x11/pi/interceptor_proxy.h index 32d60636..5e3aef13 100644 --- a/tao/x11/pi/interceptor_proxy.h +++ b/tao/x11/pi/interceptor_proxy.h @@ -10,7 +10,7 @@ #define TAOX11_PI_INTERCEPTOR_PROXY_H_INCLUDED #include "tao/x11/pi/taox11_pi_export.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/pi/tao_pi.h" #include "tao/x11/pi/pi.h" diff --git a/tao/x11/pi/orb_initializer_registry.cpp b/tao/x11/pi/orb_initializer_registry.cpp index f7833625..10ae198f 100644 --- a/tao/x11/pi/orb_initializer_registry.cpp +++ b/tao/x11/pi/orb_initializer_registry.cpp @@ -6,7 +6,7 @@ * * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/pi/tao_pi.h" #include "tao/ORBInitializer_Registry.h" diff --git a/tao/x11/pi/policyfactory_manager.h b/tao/x11/pi/policyfactory_manager.h index c78b24a9..b8979112 100644 --- a/tao/x11/pi/policyfactory_manager.h +++ b/tao/x11/pi/policyfactory_manager.h @@ -11,7 +11,7 @@ #pragma once -#include /**/ "tao/x11/pre.h" +#include /**/ "tao/x11/base/pre.h" #include "ace/Service_Config.h" #include "tao/x11/pi/taox11_pi_export.h" @@ -48,7 +48,7 @@ namespace TAOX11_NAMESPACE #endif -#include /**/ "tao/x11/post.h" +#include /**/ "tao/x11/base/post.h" #endif /* TAOX11_POLICYFACTORY_MANAGER_INCLUDED */ diff --git a/tao/x11/pi/request_info.cpp b/tao/x11/pi/request_info.cpp index 0cee8a30..3c45e70b 100644 --- a/tao/x11/pi/request_info.cpp +++ b/tao/x11/pi/request_info.cpp @@ -8,7 +8,7 @@ */ // TAO namespace dependencies -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/objproxy.h" #include "tao/x11/sequence_conversion_t.h" #include "tao/AnyTypeCode/DynamicC.h" diff --git a/tao/x11/pi/taox11_pi_export.h b/tao/x11/pi/taox11_pi_export.h index 41b65d7e..ba558a44 100644 --- a/tao/x11/pi/taox11_pi_export.h +++ b/tao/x11/pi/taox11_pi_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_PI_EXPORT_H #define TAOX11_PI_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_PI_HAS_DLL) # define TAOX11_PI_HAS_DLL 0 diff --git a/tao/x11/pi_server/pi_server.h b/tao/x11/pi_server/pi_server.h index cd334043..613ed2a3 100644 --- a/tao/x11/pi_server/pi_server.h +++ b/tao/x11/pi_server/pi_server.h @@ -11,7 +11,7 @@ #pragma once -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/pi_server/taox11_pi_server_export.h" namespace TAOX11_NAMESPACE diff --git a/tao/x11/pi_server/server_request_info.cpp b/tao/x11/pi_server/server_request_info.cpp index ac9a753c..ad318e7c 100644 --- a/tao/x11/pi_server/server_request_info.cpp +++ b/tao/x11/pi_server/server_request_info.cpp @@ -8,7 +8,7 @@ */ // TAO namespace dependencies -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/objproxy.h" #include "tao/x11/sequence_conversion_t.h" diff --git a/tao/x11/pi_server/server_request_interceptor_proxy_factory.cpp b/tao/x11/pi_server/server_request_interceptor_proxy_factory.cpp index a75863a5..baa714a8 100644 --- a/tao/x11/pi_server/server_request_interceptor_proxy_factory.cpp +++ b/tao/x11/pi_server/server_request_interceptor_proxy_factory.cpp @@ -8,7 +8,7 @@ */ // pull in TAO dependencies first -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/pi_server/tao_pi_server.h" // TAOX11 dependencies diff --git a/tao/x11/pi_server/taox11_pi_server_export.h b/tao/x11/pi_server/taox11_pi_server_export.h index c52cf689..80782a57 100644 --- a/tao/x11/pi_server/taox11_pi_server_export.h +++ b/tao/x11/pi_server/taox11_pi_server_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_PI_SERVER_EXPORT_H #define TAOX11_PI_SERVER_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_PI_SERVER_HAS_DLL) # define TAOX11_PI_SERVER_HAS_DLL 0 diff --git a/tao/x11/portable_server/basic_sargument_t.h b/tao/x11/portable_server/basic_sargument_t.h index b9c648f0..dc462776 100644 --- a/tao/x11/portable_server/basic_sargument_t.h +++ b/tao/x11/portable_server/basic_sargument_t.h @@ -13,8 +13,8 @@ #pragma once #include "tao/Argument.h" -#include "tao/x11/stddef.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/stddef.h" +#include "tao/x11/base/tao_corba.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/portable_server/operation_table_std_map.h b/tao/x11/portable_server/operation_table_std_map.h index a6acd383..1d804abb 100644 --- a/tao/x11/portable_server/operation_table_std_map.h +++ b/tao/x11/portable_server/operation_table_std_map.h @@ -13,7 +13,7 @@ #pragma once #include "tao/PortableServer/Operation_Table.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/portable_server/taox11_portableserver_export.h" #include diff --git a/tao/x11/portable_server/portableserver_proxies.h b/tao/x11/portable_server/portableserver_proxies.h index 513eeaf3..cb4a9804 100644 --- a/tao/x11/portable_server/portableserver_proxies.h +++ b/tao/x11/portable_server/portableserver_proxies.h @@ -17,12 +17,12 @@ #include "tao/PortableServer/ServantActivatorC.h" #include "tao/PortableServer/Non_Servant_Upcall.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #define TAO_PORTABLE_SERVER \ TAO_VERSIONED_NAMESPACE_NAME::PortableServer -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/portable_server/sarg_traits_t.h b/tao/x11/portable_server/sarg_traits_t.h index 1a6c92e4..a1cfb1a2 100644 --- a/tao/x11/portable_server/sarg_traits_t.h +++ b/tao/x11/portable_server/sarg_traits_t.h @@ -12,7 +12,7 @@ #pragma once -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" namespace TAOX11_NAMESPACE::PS { diff --git a/tao/x11/portable_server/servant_proxy.h b/tao/x11/portable_server/servant_proxy.h index ac846ccc..91d1fc6a 100644 --- a/tao/x11/portable_server/servant_proxy.h +++ b/tao/x11/portable_server/servant_proxy.h @@ -12,7 +12,7 @@ #pragma once -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/PortableServer/PortableServer.h" #include "tao/PortableServer/Servant_Base.h" #include "tao/operation_details.h" diff --git a/tao/x11/portable_server/servant_traits_t.h b/tao/x11/portable_server/servant_traits_t.h index a7311640..51b1cfad 100644 --- a/tao/x11/portable_server/servant_traits_t.h +++ b/tao/x11/portable_server/servant_traits_t.h @@ -13,7 +13,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/system_exception.h" namespace TAOX11_NAMESPACE diff --git a/tao/x11/portable_server/servantbase.cpp b/tao/x11/portable_server/servantbase.cpp index 507b64d6..88df8fe7 100644 --- a/tao/x11/portable_server/servantbase.cpp +++ b/tao/x11/portable_server/servantbase.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/ORB_Core.h" #include "tao/x11/portable_server/portableserver_proxies.h" diff --git a/tao/x11/portable_server/servantbase.h b/tao/x11/portable_server/servantbase.h index ff8667c7..610fd838 100644 --- a/tao/x11/portable_server/servantbase.h +++ b/tao/x11/portable_server/servantbase.h @@ -14,7 +14,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/portable_server/servant_traits_t.h" #include "tao/x11/portable_server/portableserver.h" #include "tao/x11/portable_server/servant_forward.h" diff --git a/tao/x11/portable_server/special_basic_sargument_t.h b/tao/x11/portable_server/special_basic_sargument_t.h index 1489e6dd..8269ad4a 100644 --- a/tao/x11/portable_server/special_basic_sargument_t.h +++ b/tao/x11/portable_server/special_basic_sargument_t.h @@ -13,8 +13,8 @@ #pragma once #include "tao/Argument.h" -#include "tao/x11/stddef.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/stddef.h" +#include "tao/x11/base/tao_corba.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/portable_server/taox11_portableserver_export.h b/tao/x11/portable_server/taox11_portableserver_export.h index bff9f20a..6201afc5 100644 --- a/tao/x11/portable_server/taox11_portableserver_export.h +++ b/tao/x11/portable_server/taox11_portableserver_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_PORTABLESERVER_EXPORT_H #define TAOX11_PORTABLESERVER_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_PORTABLESERVER_HAS_DLL) # define TAOX11_PORTABLESERVER_HAS_DLL 0 diff --git a/tao/x11/portable_server/upcall_command.h b/tao/x11/portable_server/upcall_command.h index ceb15342..cb8d837f 100644 --- a/tao/x11/portable_server/upcall_command.h +++ b/tao/x11/portable_server/upcall_command.h @@ -12,8 +12,8 @@ #pragma once -#include "tao/x11/tao_corba.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/tao_corba.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/portable_server/taox11_portableserver_export.h" #include "tao/PortableServer/Upcall_Command.h" diff --git a/tao/x11/sequence_cdr_t.h b/tao/x11/sequence_cdr_t.h index 5453bffd..ebdcf8da 100644 --- a/tao/x11/sequence_cdr_t.h +++ b/tao/x11/sequence_cdr_t.h @@ -10,10 +10,10 @@ #ifndef TAOX11_SEQUENCE_CDR_T_H_INCLUDED #define TAOX11_SEQUENCE_CDR_T_H_INCLUDED -#include "tao/x11/tao_corba.h" -#include "tao/x11/taox11_export.h" -#include "tao/x11/basic_traits.h" -#include "tao/x11/bounded_vector_t.h" +#include "tao/x11/base/tao_corba.h" +#include "tao/x11/base/taox11_export.h" +#include "tao/x11/base/basic_traits.h" +#include "tao/x11/base/bounded_vector_t.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/tao/x11/sequence_conversion_t.h b/tao/x11/sequence_conversion_t.h index 5c12bff3..0cdd8563 100644 --- a/tao/x11/sequence_conversion_t.h +++ b/tao/x11/sequence_conversion_t.h @@ -12,7 +12,7 @@ #pragma once -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "ace/Truncate.h" namespace TAOX11_NAMESPACE { diff --git a/tao/x11/special_basic_argument_t.h b/tao/x11/special_basic_argument_t.h index e5bbab8f..223496ba 100644 --- a/tao/x11/special_basic_argument_t.h +++ b/tao/x11/special_basic_argument_t.h @@ -13,8 +13,8 @@ #pragma once #include "tao/Argument.h" -#include "tao/x11/stddef.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/stddef.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/arg_traits_t.h" namespace TAOX11_NAMESPACE diff --git a/tao/x11/stub_arg_traits.h b/tao/x11/stub_arg_traits.h index 28f881b1..3d752b74 100644 --- a/tao/x11/stub_arg_traits.h +++ b/tao/x11/stub_arg_traits.h @@ -13,7 +13,7 @@ #pragma once #include "tao/CORBA_methods.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/arg_traits_t.h" #include "tao/x11/basic_argument_t.h" #include "tao/x11/anyinsert_policy_t.h" diff --git a/tao/x11/system_exception.cpp b/tao/x11/system_exception.cpp index 36926866..6cc792fa 100644 --- a/tao/x11/system_exception.cpp +++ b/tao/x11/system_exception.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/SystemException.h" #include "tao/x11/system_exception.h" diff --git a/tao/x11/taox11.mpc b/tao/x11/taox11.mpc index d8a538e1..697c2311 100644 --- a/tao/x11/taox11.mpc +++ b/tao/x11/taox11.mpc @@ -13,7 +13,7 @@ project(taox11_core_idl) : ridl_core_defaults, install, pidl_install { idlflags += -SS -Sorb -Gp -Gd -Gatc -o . \ -I $(TAO_ROOT) \ -Wb,export_macro=TAOX11_Export \ - -Wb,export_include=tao/x11/taox11_export.h \ + -Wb,export_include=tao/x11/base/taox11_export.h \ -Wb,anytypecode_export_macro=TAOX11_AnyTypeCode_Export \ -Wb,anytypecode_export_include=tao/x11/anytypecode/taox11_anytypecode_export.h @@ -49,7 +49,7 @@ project(taox11_core_idl) : ridl_core_defaults, install, pidl_install { IDL_Files { idlflags -= -Wb,export_macro=TAOX11_Export \ - -Wb,export_include=tao/x11/taox11_export.h + -Wb,export_include=tao/x11/base/taox11_export.h idlflags += -Sots \ -Wb,export_macro=TAOX11_AnyTypeCode_Export \ -Wb,export_include=tao/x11/anytypecode/taox11_anytypecode_export.h @@ -288,18 +288,18 @@ project(taox11) : taox11_defaults, taolib { array_cdr_t.h basic_argument_t.h basic_arguments.h - basic_traits.h - bounded_map_t.h + base/basic_traits.h + base/bounded_map_t.h bounded_string_t.h bounded_type_traits_t.h - bounded_vector_t.h + base/bounded_vector_t.h cdr_long_double.h corba.h dynamic_adapter.h exception.h exception_macros.h fixed_t.h - idl_traits_t.h + base/idl_traits_t.h ifr_client_adapter.h ifr_client_adapter_impl_base.h log.h @@ -325,20 +325,20 @@ project(taox11) : taox11_defaults, taolib { sequence_conversion_t.h special_basic_argument_t.h special_basic_arguments.h - stddef.h + base/stddef.h stub_arg_traits.h system_exception.h system_exception_x11.h - tao_corba.h - taox11_export.h + base/tao_corba.h + base/taox11_export.h typecode_factory_adapter.h user_exception.h user_exception_proxy_in_t.h user_exception_proxy_out.h valuefactory_manager_adapter.h valuetype_adapter.h - versioned_x11_namespace.h - versionx11.h + base/versioned_x11_namespace.h + base/versionx11.h wstringwchar_ostream.h } diff --git a/tao/x11/typecode_factory_adapter.h b/tao/x11/typecode_factory_adapter.h index 0a070aea..9a55c108 100644 --- a/tao/x11/typecode_factory_adapter.h +++ b/tao/x11/typecode_factory_adapter.h @@ -13,7 +13,7 @@ #pragma once #include "ace/Service_Object.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/object_traits_t.h" #include "tao/x11/orb_typesC.h" diff --git a/tao/x11/typecodefactory/taox11_typecodefactory_export.h b/tao/x11/typecodefactory/taox11_typecodefactory_export.h index 9fbb6b5f..805f3567 100644 --- a/tao/x11/typecodefactory/taox11_typecodefactory_export.h +++ b/tao/x11/typecodefactory/taox11_typecodefactory_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_TYPECODEFACTORY_EXPORT_H #define TAOX11_TYPECODEFACTORY_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_TYPECODEFACTORY_HAS_DLL) # define TAOX11_TYPECODEFACTORY_HAS_DLL 0 diff --git a/tao/x11/typecodefactory/typecodefactory.cpp b/tao/x11/typecodefactory/typecodefactory.cpp index bf05ea7e..42236edf 100644 --- a/tao/x11/typecodefactory/typecodefactory.cpp +++ b/tao/x11/typecodefactory/typecodefactory.cpp @@ -8,7 +8,7 @@ */ #include "tao/objectid.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "ace/Service_Config.h" #include "tao/x11/typecodefactory/typecodefactory.h" diff --git a/tao/x11/typecodefactory/typecodefactory.h b/tao/x11/typecodefactory/typecodefactory.h index ba75b5ed..db0047df 100644 --- a/tao/x11/typecodefactory/typecodefactory.h +++ b/tao/x11/typecodefactory/typecodefactory.h @@ -11,7 +11,7 @@ #pragma once -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/object_loader.h" #include "tao/x11/typecodefactory/taox11_typecodefactory_export.h" diff --git a/tao/x11/typecodefactory/typecodefactory_i.cpp b/tao/x11/typecodefactory/typecodefactory_i.cpp index cc106561..3d496026 100644 --- a/tao/x11/typecodefactory/typecodefactory_i.cpp +++ b/tao/x11/typecodefactory/typecodefactory_i.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/ORB_Core.h" #include "tao/TypeCodeFactory_Adapter.h" #include "tao/IFR_Client/IFR_BasicC.h" diff --git a/tao/x11/user_exception_proxy_in_t.h b/tao/x11/user_exception_proxy_in_t.h index 559a5cdf..c543debc 100644 --- a/tao/x11/user_exception_proxy_in_t.h +++ b/tao/x11/user_exception_proxy_in_t.h @@ -13,7 +13,7 @@ #pragma once #include "tao/x11/user_exception.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/UserException.h" // -------------------------------------------------------------- diff --git a/tao/x11/user_exception_proxy_out.h b/tao/x11/user_exception_proxy_out.h index abf90ae9..d4688803 100644 --- a/tao/x11/user_exception_proxy_out.h +++ b/tao/x11/user_exception_proxy_out.h @@ -13,7 +13,7 @@ #pragma once #include "tao/x11/user_exception.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/UserException.h" // -------------------------------------------------------------- diff --git a/tao/x11/valuefactory_manager_adapter.h b/tao/x11/valuefactory_manager_adapter.h index 3192719d..81d60932 100644 --- a/tao/x11/valuefactory_manager_adapter.h +++ b/tao/x11/valuefactory_manager_adapter.h @@ -13,7 +13,7 @@ #pragma once #include "ace/Service_Object.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/object_traits_t.h" namespace TAOX11_NAMESPACE diff --git a/tao/x11/valuetype/abstract_base.cpp b/tao/x11/valuetype/abstract_base.cpp index 768feb70..86842e35 100644 --- a/tao/x11/valuetype/abstract_base.cpp +++ b/tao/x11/valuetype/abstract_base.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/Stub.h" #include "tao/ORB_Core.h" #include "tao/CDR.h" diff --git a/tao/x11/valuetype/abstractbase_proxy.cpp b/tao/x11/valuetype/abstractbase_proxy.cpp index 3391f8a1..60750409 100644 --- a/tao/x11/valuetype/abstractbase_proxy.cpp +++ b/tao/x11/valuetype/abstractbase_proxy.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/anytypecode/typecode.h" #include "tao/x11/valuetype/abstractbase_proxy.h" diff --git a/tao/x11/valuetype/abstractbase_proxy.h b/tao/x11/valuetype/abstractbase_proxy.h index c26d8351..b0113c35 100644 --- a/tao/x11/valuetype/abstractbase_proxy.h +++ b/tao/x11/valuetype/abstractbase_proxy.h @@ -14,7 +14,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/Valuetype/AbstractBase.h" #include "tao/x11/valuetype/taox11_valuetype_export.h" #include "tao/x11/valuetype/abstract_base.h" diff --git a/tao/x11/valuetype/abstractbase_traits_t.h b/tao/x11/valuetype/abstractbase_traits_t.h index 069c7ee7..9d4e479d 100644 --- a/tao/x11/valuetype/abstractbase_traits_t.h +++ b/tao/x11/valuetype/abstractbase_traits_t.h @@ -13,7 +13,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/system_exception.h" #include "tao/x11/object_traits_t.h" #include "tao/x11/valuetype/valuetype_traits_t.h" diff --git a/tao/x11/valuetype/taox11_valuetype_export.h b/tao/x11/valuetype/taox11_valuetype_export.h index dc5d95d9..b9eb6f5d 100644 --- a/tao/x11/valuetype/taox11_valuetype_export.h +++ b/tao/x11/valuetype/taox11_valuetype_export.h @@ -9,7 +9,7 @@ #ifndef TAOX11_VALUETYPE_EXPORT_H #define TAOX11_VALUETYPE_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (TAOX11_VALUETYPE_HAS_DLL) # define TAOX11_VALUETYPE_HAS_DLL 0 diff --git a/tao/x11/valuetype/value_base.cpp b/tao/x11/valuetype/value_base.cpp index 2b551d54..f8ad42e8 100644 --- a/tao/x11/valuetype/value_base.cpp +++ b/tao/x11/valuetype/value_base.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/CDR.h" #include "tao/x11/anytypecode/typecode.h" diff --git a/tao/x11/valuetype/valuefactory_manager.cpp b/tao/x11/valuetype/valuefactory_manager.cpp index a41f4b32..65a38709 100644 --- a/tao/x11/valuetype/valuefactory_manager.cpp +++ b/tao/x11/valuetype/valuefactory_manager.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/orbproxy.h" #include "tao/x11/anytypecode/typecode.h" diff --git a/tao/x11/valuetype/valuetype_adapter_impl.cpp b/tao/x11/valuetype/valuetype_adapter_impl.cpp index c3fb5dbf..297241e9 100644 --- a/tao/x11/valuetype/valuetype_adapter_impl.cpp +++ b/tao/x11/valuetype/valuetype_adapter_impl.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/anytypecode/typecode.h" #include "tao/x11/valuetype/valuetype_adapter_impl.h" #include "tao/x11/valuetype/valuetype_proxies.h" diff --git a/tao/x11/valuetype/valuetype_proxies.cpp b/tao/x11/valuetype/valuetype_proxies.cpp index 9ebce3b7..bd28f7d1 100644 --- a/tao/x11/valuetype/valuetype_proxies.cpp +++ b/tao/x11/valuetype/valuetype_proxies.cpp @@ -7,7 +7,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/x11/anytypecode/typecode.h" #include "tao/x11/valuetype/valuetype_proxies.h" diff --git a/tao/x11/valuetype/valuetype_proxies.h b/tao/x11/valuetype/valuetype_proxies.h index 0875dff0..f51157e2 100644 --- a/tao/x11/valuetype/valuetype_proxies.h +++ b/tao/x11/valuetype/valuetype_proxies.h @@ -14,7 +14,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/tao_corba.h" +#include "tao/x11/base/tao_corba.h" #include "tao/Valuetype/AbstractBase.h" #include "tao/Valuetype/ValueBase.h" #include "tao/Valuetype/ValueFactory.h" diff --git a/tao/x11/valuetype/valuetype_traits_t.h b/tao/x11/valuetype/valuetype_traits_t.h index 42cf9679..ea5e0baa 100644 --- a/tao/x11/valuetype/valuetype_traits_t.h +++ b/tao/x11/valuetype/valuetype_traits_t.h @@ -13,7 +13,7 @@ #include /**/ "ace/config-all.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/system_exception.h" #include "tao/x11/valuetype/taox11_valuetype_export.h" diff --git a/tao/x11/valuetype_adapter.h b/tao/x11/valuetype_adapter.h index 985135a9..7b6f820d 100644 --- a/tao/x11/valuetype_adapter.h +++ b/tao/x11/valuetype_adapter.h @@ -14,7 +14,7 @@ #include "ace/Service_Object.h" -#include "tao/x11/stddef.h" +#include "tao/x11/base/stddef.h" #include "tao/x11/valuetype/abstractbase_traits_t.h" #include "tao/x11/valuetype/valuetype_traits_t.h" diff --git a/tests/ami_test/attr_raises/ami_test_ami_stub_export.h b/tests/ami_test/attr_raises/ami_test_ami_stub_export.h index 70aca21b..d8c6a222 100644 --- a/tests/ami_test/attr_raises/ami_test_ami_stub_export.h +++ b/tests/ami_test/attr_raises/ami_test_ami_stub_export.h @@ -9,7 +9,7 @@ #ifndef __RIDL_AMI_TEST_AMI_STUB_EXPORT_H_EXPORT_INCLUDED__ #define __RIDL_AMI_TEST_AMI_STUB_EXPORT_H_EXPORT_INCLUDED__ -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) && !defined (AMI_TEST_AMI_STUB_HAS_DLL) # define AMI_TEST_AMI_STUB_HAS_DLL 0 diff --git a/tests/custom_format/client.cpp b/tests/custom_format/client.cpp index 6068f6d1..664fcbeb 100644 --- a/tests/custom_format/client.cpp +++ b/tests/custom_format/client.cpp @@ -8,7 +8,7 @@ * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/idl_traits_t.h" +#include "tao/x11/base/idl_traits_t.h" // X11_FUZZ: disable check_taox11_namespaces namespace TAOX11_NAMESPACE diff --git a/tests/dynany/data.h b/tests/dynany/data.h index f2867d05..782bffcf 100644 --- a/tests/dynany/data.h +++ b/tests/dynany/data.h @@ -6,7 +6,7 @@ * * @copyright Copyright (c) Remedy IT Expertise BV */ -#include "tao/x11/basic_traits.h" +#include "tao/x11/base/basic_traits.h" #include "tao/x11/orb.h" #include "tao/x11/object.h" diff --git a/tests/obv/factory/client.cpp b/tests/obv/factory/client.cpp index 61ac56d8..c21440ae 100644 --- a/tests/obv/factory/client.cpp +++ b/tests/obv/factory/client.cpp @@ -12,7 +12,7 @@ #include "ace/Get_Opt.h" #include "testlib/taox11_testlog.h" -#include "tao/x11/basic_traits.h" +#include "tao/x11/base/basic_traits.h" #include "tao/x11/corba.h" #include "tao/x11/orb.h" #include "tao/x11/object.h" diff --git a/tests/poa/generic_servant/generic_servant_export.h b/tests/poa/generic_servant/generic_servant_export.h index c7b0bbfc..939d69cc 100644 --- a/tests/poa/generic_servant/generic_servant_export.h +++ b/tests/poa/generic_servant/generic_servant_export.h @@ -7,7 +7,7 @@ #ifndef GENERIC_SERVANT_EXPORT_H #define GENERIC_SERVANT_EXPORT_H -#include "tao/x11/taox11_export_macros.h" +#include "tao/x11/base/taox11_export_macros.h" #if defined (TAOX11_AS_STATIC_LIBS) # if !defined (GENERIC_SERVANT_HAS_DLL) diff --git a/tests/typelib/test.idl b/tests/typelib/test.idl index cc9a405e..c4f4cd30 100644 --- a/tests/typelib/test.idl +++ b/tests/typelib/test.idl @@ -19,6 +19,7 @@ module Test { short my1; }; + typedef string<6> b_string; enum Color { COLOR_RED, From 41c60d79c260eebe14651109103925838d013635 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 11 Apr 2024 16:23:37 +0200 Subject: [PATCH 86/94] Move change * ridlbe/c++11/writers/stubheader.rb: --- ridlbe/c++11/writers/stubheader.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index fa21e6bb..8474475b 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -483,7 +483,7 @@ def visit_typedef(node) check_idl_type(idl_type.basetype) when IDL::Type::String, IDL::Type::WString - add_include('tao/x11/bounded_string_t.h') if idl_type.size.to_i.positive? + add_include('tao/x11/base/bounded_string_t.h') if idl_type.size.to_i.positive? add_include('tao/x11/base/bounded_type_traits_t.h') if idl_type.size.to_i.positive? check_idl_type(idl_type) end From a6a16ada7ff308d27752638feceb9a5714aac764 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 12 Apr 2024 10:57:43 +0200 Subject: [PATCH 87/94] Path updates * tao/x11/taox11.mpc: --- tao/x11/taox11.mpc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tao/x11/taox11.mpc b/tao/x11/taox11.mpc index 697c2311..c30e661d 100644 --- a/tao/x11/taox11.mpc +++ b/tao/x11/taox11.mpc @@ -290,8 +290,8 @@ project(taox11) : taox11_defaults, taolib { basic_arguments.h base/basic_traits.h base/bounded_map_t.h - bounded_string_t.h - bounded_type_traits_t.h + base/bounded_string_t.h + base/bounded_type_traits_t.h base/bounded_vector_t.h cdr_long_double.h corba.h From 1a959893c6adb451d5cb6eba5095301dc4912b36 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 12 Apr 2024 11:12:09 +0200 Subject: [PATCH 88/94] Move file * tao/x11/wstringwchar_ostream.h -> tao/x11/base/wstringwchar_ostream.h: Moved. * ridlbe/c++11/writers/anytypecodehdr.rb: * ridlbe/c++11/writers/stubheader.rb: * tao/x11/taox11.mpc: * tests/typelib/test.idl: --- ridlbe/c++11/writers/anytypecodehdr.rb | 2 +- ridlbe/c++11/writers/stubheader.rb | 2 +- tao/x11/{ => base}/wstringwchar_ostream.h | 0 tao/x11/taox11.mpc | 2 +- tests/typelib/test.idl | 1 + 5 files changed, 4 insertions(+), 3 deletions(-) rename tao/x11/{ => base}/wstringwchar_ostream.h (100%) diff --git a/ridlbe/c++11/writers/anytypecodehdr.rb b/ridlbe/c++11/writers/anytypecodehdr.rb index d44e7de0..dc4126dc 100644 --- a/ridlbe/c++11/writers/anytypecodehdr.rb +++ b/ridlbe/c++11/writers/anytypecodehdr.rb @@ -153,7 +153,7 @@ def check_idl_type(idl_type) add_post_include('tao/x11/valuetype/abstract_base.h') when IDL::Type::WString, IDL::Type::WChar - add_post_include('tao/x11/wstringwchar_ostream.h') if params[:gen_ostream_operators] + add_post_include('tao/x11/base/wstringwchar_ostream.h') if params[:gen_ostream_operators] end end diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index 2f7924d1..bc04deb2 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -501,7 +501,7 @@ def check_idl_type(idl_type) add_post_include('tao/x11/valuetype/abstract_base.h') when IDL::Type::WString, IDL::Type::WChar - add_post_include('tao/x11/wstringwchar_ostream.h') if params[:gen_ostream_operators] + add_post_include('tao/x11/base/wstringwchar_ostream.h') if params[:gen_ostream_operators] end end diff --git a/tao/x11/wstringwchar_ostream.h b/tao/x11/base/wstringwchar_ostream.h similarity index 100% rename from tao/x11/wstringwchar_ostream.h rename to tao/x11/base/wstringwchar_ostream.h diff --git a/tao/x11/taox11.mpc b/tao/x11/taox11.mpc index c30e661d..b29487de 100644 --- a/tao/x11/taox11.mpc +++ b/tao/x11/taox11.mpc @@ -339,7 +339,7 @@ project(taox11) : taox11_defaults, taolib { valuetype_adapter.h base/versioned_x11_namespace.h base/versionx11.h - wstringwchar_ostream.h + base/wstringwchar_ostream.h } Header_Files { diff --git a/tests/typelib/test.idl b/tests/typelib/test.idl index c4f4cd30..6a9ce5f6 100644 --- a/tests/typelib/test.idl +++ b/tests/typelib/test.idl @@ -20,6 +20,7 @@ module Test short my1; }; typedef string<6> b_string; + typedef wstring<6> b_wstring; enum Color { COLOR_RED, From 207dbc8bbb6bb581001272192b8f905757da9c89 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 12 Apr 2024 11:52:20 +0200 Subject: [PATCH 89/94] Add std::wstring_view ostream insertion * tao/x11/base/wstringwchar_ostream.h: --- tao/x11/base/wstringwchar_ostream.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tao/x11/base/wstringwchar_ostream.h b/tao/x11/base/wstringwchar_ostream.h index 6db609e2..f85f2a53 100644 --- a/tao/x11/base/wstringwchar_ostream.h +++ b/tao/x11/base/wstringwchar_ostream.h @@ -25,6 +25,14 @@ namespace std return _os << "\"" << conv.to_bytes(_v) << "\""; } + /// std::wstring_view to ostream insertion + inline std::ostream& + operator<< (std::ostream& _os, const std::wstring_view& _v) + { + std::wstring_convert> conv; + return _os << "\"" << conv.to_bytes(_v.data()) << "\""; + } + /// wchar_t to ostream insertion inline std::ostream& operator<< (std::ostream& _os, const wchar_t& _v) From 3140db1c5633d82490b025f9d095ed7987f7b05c Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 18 Apr 2024 14:56:57 +0200 Subject: [PATCH 90/94] Add test * bin/taox11_tests.lst: --- bin/taox11_tests.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/taox11_tests.lst b/bin/taox11_tests.lst index f79389b5..0175b9d2 100644 --- a/bin/taox11_tests.lst +++ b/bin/taox11_tests.lst @@ -178,6 +178,7 @@ tests/timebase/run_test.pl: tests/typecode/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO tests/typecode_adapter/orb_create/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO tests/typecode_adapter/resolve_ref/run_test.pl: !CORBA_E_COMPACT !CORBA_E_MICRO +tests/typelib/nocpp/run_test.pl: tests/typelib/shared/run_test.pl: tests/typelib/stdlib/run_test.pl: tests/typelib/taox11/run_test.pl: From a8821ea86aa905b6b3268b4469f361d67fa969b7 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Thu, 18 Apr 2024 16:33:47 +0200 Subject: [PATCH 91/94] Removed commented out code * ridlbe/c++11/writers/stubheader.rb: --- ridlbe/c++11/writers/stubheader.rb | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ridlbe/c++11/writers/stubheader.rb b/ridlbe/c++11/writers/stubheader.rb index bc04deb2..4d00747a 100644 --- a/ridlbe/c++11/writers/stubheader.rb +++ b/ridlbe/c++11/writers/stubheader.rb @@ -322,15 +322,6 @@ def visit_typedef(node) end def visit_includes(parser) - # unless params[:gen_anytypecode_header] - # writer(AnyTypeCodeHeaderIncludeWriter, - # { default_pre_includes: @default_pre_includes, - # default_post_includes: @default_post_includes }) do |w| - # w.visit_nodes(parser) - # @default_pre_includes = w.default_pre_includes - # @default_post_includes = w.default_post_includes - # end - # end writer(StubHeaderIncludeWriter, { default_pre_includes: @default_pre_includes, default_post_includes: @default_post_includes }) do |w| From 3ac7c7ee3d164c7b31891e6f8d69e91cae91ab61 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 19 Apr 2024 10:41:27 +0200 Subject: [PATCH 92/94] More condensed code * ridlbe/c++11/templates/cli/src/typedef_anyop.erb: --- .../c++11/templates/cli/src/typedef_anyop.erb | 27 +++---------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/ridlbe/c++11/templates/cli/src/typedef_anyop.erb b/ridlbe/c++11/templates/cli/src/typedef_anyop.erb index 6ecc6043..0304ec6e 100644 --- a/ridlbe/c++11/templates/cli/src/typedef_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/typedef_anyop.erb @@ -4,37 +4,16 @@ void _any_cp_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any& any, <%= scoped_cxx_in_type %> _val) { - TAOX11_NAMESPACE::Any_Dual_Impl_T< - IDL::traits<<%= scoped_cxxname %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::insert_copy (any, <%= scoped_cxx_typecode %>, _val); + TAOX11_NAMESPACE::Any_Dual_Impl_T>, <% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert_copy (any, <%= scoped_cxx_typecode %>, _val); } void _any_mv_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any& any, <%= scoped_cxx_move_type %> _val) { - Any_Dual_Impl_T< - IDL::traits<<%= scoped_cxxname %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); + Any_Dual_Impl_T>, <% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); } bool _any_out_<%= scoped_cxxname.scope_to_cxxname %> (const TAOX11_CORBA::Any& any, <%= scoped_cxx_out_type %> _val) { - return Any_Dual_Impl_T< - IDL::traits<<%= scoped_cxxname %>>, -% if is_local? - TAOX11_NAMESPACE::NULL_Marshal_Policy -% else - TAOX11_NAMESPACE::CDR_Marshal_Policy -% end - >::extract (any, <%= scoped_cxx_typecode %>, _val); + return Any_Dual_Impl_T>, <% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::extract (any, <%= scoped_cxx_typecode %>, _val); } #endif // _ALIAS_ANYOP_<%= scoped_cxxname.scope_to_cxxname %>_IMPL_ From d34ed9937113a6b3a2a098a1afc9c2d7add747f6 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 19 Apr 2024 10:44:07 +0200 Subject: [PATCH 93/94] Removed redundant whitespace * ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb: --- ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb b/ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb index 8fd5c0f2..0f87f75b 100644 --- a/ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb +++ b/ridlbe/c++11/templates/cli/hdr/typedef_anyop.erb @@ -7,9 +7,9 @@ #define _ALIAS_ANYOP_<%= alias_md5 %>_DECL_ #define _ALIAS_ANYOP_<%= scoped_cxxname.scope_to_cxxname %>_IMPL_ -<%= anytypecode_export_macro %> void _any_cp_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any&, <%= scoped_cxx_in_type %>); -<%= anytypecode_export_macro %> void _any_mv_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any&, <%= scoped_cxx_move_type %>); -<%= anytypecode_export_macro %> bool _any_out_<%= scoped_cxxname.scope_to_cxxname %> (const TAOX11_CORBA::Any&, <%= scoped_cxx_out_type %>); +<%= anytypecode_export_macro %>void _any_cp_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any&, <%= scoped_cxx_in_type %>); +<%= anytypecode_export_macro %>void _any_mv_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any&, <%= scoped_cxx_move_type %>); +<%= anytypecode_export_macro %>bool _any_out_<%= scoped_cxxname.scope_to_cxxname %> (const TAOX11_CORBA::Any&, <%= scoped_cxx_out_type %>); /// Copying any insertion operator inline void operator<<= (TAOX11_CORBA::Any& any, <%= scoped_cxx_in_type %> _val) From 80b1065030102069d698985a0ef65751cbc822cd Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 19 Apr 2024 10:46:20 +0200 Subject: [PATCH 94/94] Condensed code * ridlbe/c++11/templates/cli/src/typedef_anyop.erb: --- ridlbe/c++11/templates/cli/src/typedef_anyop.erb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ridlbe/c++11/templates/cli/src/typedef_anyop.erb b/ridlbe/c++11/templates/cli/src/typedef_anyop.erb index 0304ec6e..27ce6d9c 100644 --- a/ridlbe/c++11/templates/cli/src/typedef_anyop.erb +++ b/ridlbe/c++11/templates/cli/src/typedef_anyop.erb @@ -1,18 +1,15 @@ // generated from <%= ridl_template_path %> #if defined(_ALIAS_ANYOP_<%= scoped_cxxname.scope_to_cxxname %>_IMPL_) -void -_any_cp_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any& any, <%= scoped_cxx_in_type %> _val) +void _any_cp_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any& any, <%= scoped_cxx_in_type %> _val) { TAOX11_NAMESPACE::Any_Dual_Impl_T>, <% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert_copy (any, <%= scoped_cxx_typecode %>, _val); } -void -_any_mv_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any& any, <%= scoped_cxx_move_type %> _val) +void _any_mv_in_<%= scoped_cxxname.scope_to_cxxname %> (TAOX11_CORBA::Any& any, <%= scoped_cxx_move_type %> _val) { Any_Dual_Impl_T>, <% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::insert (any, <%= scoped_cxx_typecode %>, std::move(_val)); } -bool -_any_out_<%= scoped_cxxname.scope_to_cxxname %> (const TAOX11_CORBA::Any& any, <%= scoped_cxx_out_type %> _val) +bool _any_out_<%= scoped_cxxname.scope_to_cxxname %> (const TAOX11_CORBA::Any& any, <%= scoped_cxx_out_type %> _val) { return Any_Dual_Impl_T>, <% if is_local? %>TAOX11_NAMESPACE::NULL_Marshal_Policy<% else %>TAOX11_NAMESPACE::CDR_Marshal_Policy<% end %>>::extract (any, <%= scoped_cxx_typecode %>, _val); }