diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-09-28 09:02:04 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-09-28 09:02:04 +0200 |
commit | 2c74ffc0559e66fa4ef0f290d4caac328441b768 (patch) | |
tree | e17ad377a87e89486b59ece7d59f045bb51b0986 /TAO | |
parent | 9b8796fa89a7d2da4b1f682253be06d7ab1f8dbe (diff) | |
download | ATCD-2c74ffc0559e66fa4ef0f290d4caac328441b768.tar.gz |
Make use of default and more condensed code generation
* TAO/TAO_IDL/be/be_visitor_arg_traits.cpp:
* TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp:
* TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp:
* TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp:
* TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp:
* TAO/TAO_IDL/be/be_visitor_traits.cpp:
* TAO/tests/MT_Server/README:
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_arg_traits.cpp | 5 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp | 11 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp | 25 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_traits.cpp | 13 | ||||
-rw-r--r-- | TAO/tests/MT_Server/README | 2 |
7 files changed, 21 insertions, 43 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp index c759000c029..e064a19a8f7 100644 --- a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp @@ -156,7 +156,7 @@ be_visitor_arg_traits::visit_interface (be_interface *node) << "class " << " " << this->S_ << "Arg_Traits< ::" << node->name () << ">" << be_idt_nl - << ": public" << be_idt << be_idt_nl + << ": public " << "Object_" << this->S_ << "Arg_Traits_T<" << be_idt << be_idt_nl << "::" << node->name () << "_ptr," << be_nl << "::" << node->name () << "_var," << be_nl @@ -169,8 +169,7 @@ be_visitor_arg_traits::visit_interface (be_interface *node) } *os << "," << be_nl << this->insert_policy () - << be_uidt_nl - << ">" << be_uidt << be_uidt << be_uidt << be_uidt_nl + << ">" << be_uidt << be_uidt << be_uidt_nl << "{" << be_nl << "};"; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp index 102a7c67036..888f12fd2fb 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp @@ -188,7 +188,6 @@ be_visitor_interface_ch::visit_interface (be_interface *node) { // Generate the "protected" constructor so that users cannot // instantiate us. - if (! node->is_abstract ()) { *os << "// Concrete interface only." << be_nl @@ -218,10 +217,10 @@ be_visitor_interface_ch::visit_interface (be_interface *node) if (! node->is_abstract ()) { *os << "// Concrete non-local interface only." << be_nl - << node->local_name () << " (" << be_idt << be_idt_nl - << "::IOP::IOR *ior," << be_nl - << "TAO_ORB_Core *orb_core);" << be_uidt - << be_uidt_nl << be_nl; + << node->local_name () << " (" + << "::IOP::IOR *ior, " + << "TAO_ORB_Core *orb_core);" + << be_nl << be_nl; } *os << "// Non-local interface only." << be_nl @@ -243,7 +242,7 @@ be_visitor_interface_ch::visit_interface (be_interface *node) // Protected destructor. *os << be_nl_2 - << "virtual ~" << node->local_name () << " ();"; + << "virtual ~" << node->local_name () << " () = default;"; // Private copy constructor and assignment operator. These are not // allowed, hence they are private. diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index 072a877ecad..597b9ef62a8 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -55,8 +55,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) *os << be_nl_2 << node->name () << "_ptr" << be_nl << "TAO::Objref_Traits<" << node->name () << ">::duplicate (" - << be_idt << be_idt_nl - << node->name () << "_ptr p)" << be_uidt << be_uidt_nl + << node->name () << "_ptr p)" << be_nl << "{" << be_idt_nl << "return " << node->name () << "::_duplicate (p);" << be_uidt_nl << "}"; @@ -64,8 +63,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) *os << be_nl_2 << "void" << be_nl << "TAO::Objref_Traits<" << node->name () << ">::release (" - << be_idt << be_idt_nl - << node->name () << "_ptr p)" << be_uidt << be_uidt_nl + << node->name () << "_ptr p)" << be_nl << "{" << be_idt_nl; // Workaround for broken HP V7.4-004 on OpenVMS IA83 @@ -92,9 +90,8 @@ be_visitor_interface_cs::visit_interface (be_interface *node) *os << be_nl_2 << "::CORBA::Boolean" << be_nl << "TAO::Objref_Traits<" << node->name () << ">::marshal (" - << be_idt << be_idt_nl - << "const " << node->name () << "_ptr p," << be_nl - << "TAO_OutputCDR & cdr)" << be_uidt << be_uidt_nl + << "const " << node->name () << "_ptr p," + << "TAO_OutputCDR & cdr)" << be_nl << "{" << be_idt_nl << "return "; @@ -200,15 +197,9 @@ be_visitor_interface_cs::visit_interface (be_interface *node) << " ()" << be_nl; *os << "{" << be_nl; - - *os << "}"; + *os << "}" << be_nl; } - *os << be_nl_2 - << node->name () << "::~" << node->local_name () - << " ()" << be_nl; - *os << "{" << be_nl << "}" << be_nl_2; - bool gen_any_destructor = be_global->any_support () && (!node->is_local () @@ -415,8 +406,7 @@ be_visitor_interface_cs::gen_xxx_narrow (const char *pre, TAO_OutStream *os = this->ctx_->stream (); *os << node->full_name () << "_ptr" << be_nl - << node->full_name () << "::_" << pre << " (" - << be_idt << be_idt_nl; + << node->full_name () << "::_" << pre << " ("; if (node->is_abstract ()) { @@ -428,8 +418,7 @@ be_visitor_interface_cs::gen_xxx_narrow (const char *pre, } *os << " _tao_objref)" - << be_uidt - << be_uidt_nl + << be_nl << "{" << be_idt_nl; if (node->is_local ()) diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp index 0dd4c94accc..2f7ba2b769b 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp @@ -117,7 +117,7 @@ be_visitor_interface_sh::visit_interface (be_interface *node) // Copy constructor and destructor. *os << class_name.c_str () << " (const " << class_name.c_str () << "& rhs);" << be_nl - << "virtual ~" << class_name.c_str () << " ();" << be_nl_2; + << "virtual ~" << class_name.c_str () << " () = default;" << be_nl_2; // _is_a *os << "virtual ::CORBA::Boolean _is_a (const char* logical_type_id);" << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp index 81256400f5f..1594aa5db45 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -141,12 +141,6 @@ be_visitor_interface_ss::visit_interface (be_interface *node) << "{" << be_nl << "}" << be_nl_2; - *os << full_skel_name << "::~" - << local_name_prefix << node_local_name - << " ()" << be_nl; - *os << "{" << be_nl; - *os << "}" << be_nl; - // Generate code for elements in the scope (e.g., operations). if (this->visit_scope (node) == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_traits.cpp b/TAO/TAO_IDL/be/be_visitor_traits.cpp index ae8161b414b..976f1e16dc3 100644 --- a/TAO/TAO_IDL/be/be_visitor_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_traits.cpp @@ -128,14 +128,13 @@ be_visitor_traits::visit_interface (be_interface *node) << " ::" << fname << ">" << be_nl << "{" << be_idt_nl << "static ::" << fname << "_ptr duplicate (" - << be_idt << be_idt_nl - << "::" << fname << "_ptr p);" << be_uidt << be_uidt_nl - << "static void release (" << be_idt << be_idt_nl - << "::" << fname << "_ptr p);" << be_uidt << be_uidt_nl + << "::" << fname << "_ptr p);" << be_nl + << "static void release (" + << "::" << fname << "_ptr p);" << be_nl << "static ::" << fname << "_ptr nil ();" << be_nl - << "static ::CORBA::Boolean marshal (" << be_idt << be_idt_nl - << "const ::" << fname << "_ptr p," << be_nl - << "TAO_OutputCDR & cdr);" << be_uidt << be_uidt << be_uidt_nl + << "static ::CORBA::Boolean marshal (" + << "const ::" << fname << "_ptr p," + << "TAO_OutputCDR & cdr);" << be_uidt_nl << "};"; os->gen_endif (); diff --git a/TAO/tests/MT_Server/README b/TAO/tests/MT_Server/README index ef81d9ddd33..d5f969fd709 100644 --- a/TAO/tests/MT_Server/README +++ b/TAO/tests/MT_Server/README @@ -1,5 +1,3 @@ - - Description: This is a simple test for a thread-pool server. It creates a |