diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-04-21 12:32:03 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2010-04-21 12:32:03 +0000 |
commit | 22dd98277fa7f55e7d7ee10244245d9b47924b18 (patch) | |
tree | 3102f586d19caaa5e9f3378a1274517cc7cc8361 | |
parent | 3152042057ff888b2fb712c6e3616d66082e16bf (diff) | |
download | ATCD-22dd98277fa7f55e7d7ee10244245d9b47924b18.tar.gz |
Wed Apr 21 12:27:44 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* TAO_IDL/be/be_visitor_component/servant_svh.cpp:
* TAO_IDL/be/be_visitor_component/servant_svs.cpp:
At construction time we populate the port tables and than
at runtime we than don't have to try to populate them again
-rw-r--r-- | TAO/ChangeLog | 45 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp | 14 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp | 78 |
3 files changed, 45 insertions, 92 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index cd3d0fa439d..9bc735cff8a 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,8 +1,15 @@ +Wed Apr 21 12:27:44 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl> + + * TAO_IDL/be/be_visitor_component/servant_svh.cpp: + * TAO_IDL/be/be_visitor_component/servant_svs.cpp: + At construction time we populate the port tables and than + at runtime we than don't have to try to populate them again + Tue Apr 20 18:45:25 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/fe/y.tab.cpp: * TAO_IDL/fe/idl.yy: - + Added check for local interface as return type of operation in non-local interface, similar to the check already in place for the operation parameters. @@ -11,15 +18,15 @@ Tue Apr 20 17:33:16 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/be/be_component.cpp: * TAO_IDL/be_include/be_component.h: - + Added additional members to count the facets and receptacles having non-local interface types, the associated accessor methods, and the logic to maintain them. - + * TAO_IDL/be/be_visitor_component/servant_svh.cpp: * TAO_IDL/be/be_visitor_component/servant_svs.cpp: - + Changed check for decision to generate populate_port_tables() to use the new non-remote facet count described above. @@ -27,19 +34,19 @@ Tue Apr 20 14:25:34 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/be/be_visitor_interface/ami4ccm_rh_ex_idl.cpp: * TAO_IDL/be_include/be_visitor_interface/ami4ccm_rh_ex_idl.h: - - Changed logic in decision to generate a comma between + + Changed logic in decision to generate a comma between parameters of an AMI4CCM reply handler IDL operation. Mon Apr 19 18:27:48 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/be/be_visitor_component\servant_svh.cpp: * TAO_IDL/be/be_visitor_component\servant_svs.cpp: - + Changed logic of code generation for get_all_receptacles() get_all_pulishers() and get_all_emitters() to generate method in the class except when LwCCM flag is present. - Otherwise if the component has no ports of the + Otherwise if the component has no ports of the given kind, the method returns a sequence (of port descriptors) of length 0. This change in logic means that these methods can be totally removed from the @@ -52,20 +59,20 @@ Mon Apr 19 18:27:48 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> Mon Apr 19 10:24:12 UTC 2010 Martin Corino <mcorino@remedy.nl> - * orbsvcs/tests/Notify/Timeout/run_test.pl: + * orbsvcs/tests/Notify/Timeout/run_test.pl: - Fixed missing library path customization for test target. + Fixed missing library path customization for test target. Mon Apr 19 07:47:12 UTC 2010 Martin Corino <mcorino@remedy.nl> - * tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl: + * tests/CSD_Strategy_Tests/TP_Test_Static/run_test.pl: - Fixed missing library path customization for client processes. + Fixed missing library path customization for client processes. Fri Apr 16 20:11:12 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp(visit_constant): - + This method uses the reifying visitor to fetch the AST node created from the template argument. Since for constants, this node was created from a parsed literal, the expression @@ -85,7 +92,7 @@ Fri Apr 16 20:11:12 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> Thu Apr 15 18:59:01 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/be/be_type.cpp: - + Changed boolean flag to be used with 'true' and 'false' instead of 1 and 0. @@ -93,11 +100,11 @@ Wed Apr 14 19:04:12 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/be/be_visitor_component/servant_svh.cpp: * TAO_IDL/be/be/be_visitor_component_scope.cpp: - + Cosmetic changes and corrections to comments. - + * TAO_IDL/be/util/utl_global.cpp(create_uses_multiple_stuff): - + When creating the AST node for the xxxConnection struct, specifically the 'objref' field, changed the argument from the result of calling uses_type() on the receptacle node @@ -112,7 +119,7 @@ Wed Apr 14 19:04:12 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> Wed Apr 14 13:55:32 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/be/be_visitor_interface/ami4ccm_sendc_ex_idl.cpp: - + Fixed bug in code generation of AMI4CCM executor IDL. Thanks to Marijke Hengstmengel <mhengstmengel at remedy dot nl> for reporting the bug. @@ -486,7 +493,7 @@ Fri Apr 2 15:32:26 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> Fri Apr 02 10:50:48 CEST 2010 Johnny Willemsen <jwillemsen@remedy.nl> - * TAO version 1.7.8 released. + * TAO version 1.7.8 released. Wed Mar 31 15:22:16 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> diff --git a/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp b/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp index 422931348a7..752c2aa6868 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/servant_svh.cpp @@ -147,13 +147,13 @@ be_visitor_servant_svh::visit_provides (be_provides *node) os_ << be_uidt_nl << be_nl << "public:" << be_idt_nl << "virtual ::" << obj_name << "_ptr" << be_nl - << "provide_" << port_name << " (void);" - << be_uidt_nl << be_nl; + << "provide_" << port_name << " (void);"; } - os_ << "private:" << be_idt_nl - << "::CORBA::Object_ptr" << be_nl - << "provide_" << port_name << "_i (void);" + os_ << be_uidt_nl << be_nl + << "private:" << be_idt_nl + << "void" << be_nl + << "setup_" << port_name << "_i (void);" << be_uidt_nl << be_nl; os_ << "private:" << be_idt_nl @@ -340,8 +340,8 @@ be_visitor_servant_svh::visit_consumes (be_consumes *node) os_ << be_uidt_nl << be_nl << "private:" << be_idt_nl; - os_ << "::Components::EventConsumerBase_ptr" << be_nl - << "get_consumer_" << port_name << "_i (void);"; + os_ << "void" << be_nl + << "setup_consumer_" << port_name << "_i (void);"; os_ << be_uidt_nl << be_nl << "private:" << be_idt_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp index 1da892faf13..05c0ce3948f 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/servant_svs.cpp @@ -207,16 +207,6 @@ be_visitor_servant_svs::visit_component (be_component *node) << "_Servant::populate_port_tables (void)" << be_nl << "{" << be_idt_nl; - if (this->node_->n_remote_provides () > 0UL) - { - os_ << "::CORBA::Object_var obj_var;" << be_nl; - } - - if (this->node_->n_consumes () > 0UL) - { - os_ << "::Components::EventConsumerBase_var ecb_var;" << be_nl; - } - be_visitor_populate_port_tables ppt_visitor (this->ctx_); if (ppt_visitor.visit_component_scope (node) == -1) @@ -304,18 +294,6 @@ be_visitor_servant_svs::visit_provides (be_provides *node) << port_name << " (void)" << be_nl << "{" << be_idt_nl; - os_ << "if ( ::CORBA::is_nil (this->provide_" - << port_name << "_.in ()))" << be_idt_nl - << "{" << be_idt_nl - << "::CORBA::Object_var obj =" << be_idt_nl - << "this->provide_" << port_name << "_i ();" - << be_uidt_nl << be_nl - << "::" << obj_name << "_var fo =" << be_idt_nl - << "::" << obj_name << "::_narrow (obj.in ());" - << be_uidt_nl << be_nl - << "this->provide_" << port_name << "_ = fo;" << be_uidt_nl - << "}" << be_uidt_nl << be_nl; - os_ << "return" << be_idt_nl << "::" << obj_name << "::_duplicate (this->provide_" << port_name << "_.in ());" << be_uidt << be_uidt_nl @@ -323,17 +301,10 @@ be_visitor_servant_svs::visit_provides (be_provides *node) } os_ << be_nl << be_nl - << "::CORBA::Object_ptr" << be_nl - << node_->local_name () << "_Servant::provide_" + << "void" << be_nl + << node_->local_name () << "_Servant::setup_" << port_name << "_i (void)" << be_nl << "{" << be_idt_nl - << "::CORBA::Object_ptr ret =" << be_idt_nl - << "this->lookup_facet (\"" << port_name << "\");" - << be_uidt_nl << be_nl - << "if (! ::CORBA::is_nil (ret))" << be_idt_nl - << "{" << be_idt_nl - << "return ret;" << be_uidt_nl - << "}" << be_uidt_nl << be_nl << "typedef" << be_idt_nl << "::CIAO::Port_Activator_T<" << be_idt_nl << "::CIAO_FACET" << prefix_connector @@ -360,11 +331,9 @@ be_visitor_servant_svs::visit_provides (be_provides *node) << "::CIAO::Servant_Activator_var sa =" << be_idt_nl << "this->container_->ports_servant_activator ();" << be_uidt_nl << be_nl - << "if (! sa->register_port_activator (pa._retn ()))" + << "if (sa->register_port_activator (pa._retn ()))" << be_idt_nl << "{" << be_idt_nl - << "return ::" << obj_name << "::_nil ();" << be_uidt_nl - << "}" << be_uidt_nl << be_nl << "::CORBA::Object_var obj =" << be_idt_nl << "this->container_->generate_reference (" << be_idt_nl << "obj_id.c_str ()," << be_nl @@ -372,8 +341,8 @@ be_visitor_servant_svs::visit_provides (be_provides *node) << "::CIAO::Container_Types::FACET_CONSUMER_t);" << be_uidt_nl << be_uidt_nl << "this->add_facet (\"" << port_name << "\", obj.in ());" - << be_nl << be_nl - << "return obj._retn ();" << be_uidt_nl + << be_uidt_nl + << "}" << be_uidt_nl << "}"; return 0; @@ -599,20 +568,6 @@ be_visitor_servant_svs::visit_consumes (be_consumes *node) << node_->local_name () << "_Servant::get_consumer_" << port_name << " (void)" << be_nl << "{" << be_idt_nl - << "if (! ::CORBA::is_nil (this->consumes_" << port_name - << "_.in ()))" << be_idt_nl - << "{" << be_idt_nl - << "return ::" << fname - << "Consumer::_duplicate (this->consumes_" - << port_name << "_.in ());" << be_uidt_nl - << "}" << be_uidt_nl << be_nl - << "::Components::EventConsumerBase_var obj =" << be_idt_nl - << "this->get_consumer_" << port_name << "_i ();" - << be_uidt_nl << be_nl - << "::" << fname << "Consumer_var eco =" << be_idt_nl - << "::" << fname << "Consumer::_narrow (obj.in ());" - << be_uidt_nl << be_nl - << "this->consumes_" << port_name << "_ = eco;" << be_nl << "return" << be_idt_nl << "::" << fname << "Consumer::_duplicate (" << be_idt_nl << "this->consumes_" << port_name << "_.in ());" @@ -620,17 +575,10 @@ be_visitor_servant_svs::visit_consumes (be_consumes *node) << "}"; os_ << be_nl << be_nl - << "::Components::EventConsumerBase_ptr" << be_nl - << node_->local_name () << "_Servant::get_consumer_" + << "void" << be_nl + << node_->local_name () << "_Servant::setup_consumer_" << port_name << "_i (void)" << be_nl << "{" << be_idt_nl - << "::Components::EventConsumerBase_ptr ret =" << be_idt_nl - << "this->lookup_consumer (\"" << port_name << "\");" - << be_uidt_nl << be_nl - << "if (! ::CORBA::is_nil (ret))" << be_idt_nl - << "{" << be_idt_nl - << "return ret;" << be_uidt_nl - << "}" << be_uidt_nl << be_nl << "typedef" << be_idt_nl << "::CIAO::Port_Activator_T<" << be_idt_nl << node_->local_name () << "_Servant::" << lname @@ -658,11 +606,9 @@ be_visitor_servant_svs::visit_consumes (be_consumes *node) << "::CIAO::Servant_Activator_var sa =" << be_idt_nl << "this->container_->ports_servant_activator ();" << be_uidt_nl << be_nl - << "if (! sa->register_port_activator (pa._retn ()))" + << "if (sa->register_port_activator (pa._retn ()))" << be_idt_nl << "{" << be_idt_nl - << "return ::" << fname << "Consumer::_nil ();" << be_uidt_nl - << "}" << be_uidt_nl << be_nl << "::CORBA::Object_var obj =" << be_idt_nl << "this->container_->generate_reference (" << be_idt_nl << "obj_id.c_str ()," << be_nl @@ -681,8 +627,8 @@ be_visitor_servant_svs::visit_consumes (be_consumes *node) << "::Components::EventConsumerBase::_narrow (obj.in ());" << be_uidt_nl << be_nl << "this->add_consumer (\"" << port_name << "\", ecb.in ());" - << be_nl << be_nl - << "return ecb._retn ();" << be_uidt_nl + << be_uidt_nl + << "}" << be_uidt_nl << "}"; return 0; @@ -1613,7 +1559,7 @@ be_visitor_populate_port_tables::visit_provides ( const char *port_name = prefix.c_str (); os_ << be_nl - << "obj_var = this->provide_" + << "this->setup_" << port_name << "_i ();"; return 0; @@ -1624,7 +1570,7 @@ be_visitor_populate_port_tables::visit_consumes ( be_consumes *node) { os_ << be_nl - << "ecb_var = this->get_consumer_" + << "this->setup_consumer_" << node->local_name ()->get_string () << "_i ();"; return 0; |