diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-11-19 17:49:55 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-11-19 17:49:55 +0000 |
commit | 2f4994291a26f259bb1f882fc5500cba67c22237 (patch) | |
tree | 2fc2300575f111313d866f9236021779076877ac /TAO/CIAO/DAnCE/examples | |
parent | f3f09ea5829362eefd76d3895f18ed2a85a32bcb (diff) | |
download | ATCD-2f4994291a26f259bb1f882fc5500cba67c22237.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/CIAO/DAnCE/examples')
9 files changed, 1 insertions, 3164 deletions
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.no-connections b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.no-connections deleted file mode 100644 index ade8f64fff2..00000000000 --- a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.no-connections +++ /dev/null @@ -1,317 +0,0 @@ -// $Id$ -// -// **** Code generated by the **** -// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** -// CIAO has been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// CIDL Compiler has been developed by: -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about CIAO is available at: -// http://www.dre.vanderbilt.edu/CIAO - -#include "Receiver_svnt.h" -#include "Cookies.h" -#include "ciao/Servant_Activator.h" -#include "ciao/Port_Activator_T.h" - -namespace Receiver_Impl -{ - namespace CIAO_GLUE_Hello - { - Receiver_Context::Receiver_Context ( - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c, - Receiver_Servant *sv) - : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)), - ctx_svnt_base (home, c, sv) - { - } - - Receiver_Context::~Receiver_Context (void) - { - } - - // Operations for Receiver receptacles and event sources, - // defined in ::Hello::CCM_Receiver_Context. - - // CIAO-specific. - - Receiver_Context * - Receiver_Context::_narrow ( - ::Components::SessionContext_ptr p - ACE_ENV_ARG_DECL_NOT_USED) - { - return dynamic_cast<Receiver_Context *> (p); - } - } - - namespace CIAO_GLUE_Hello - { - Receiver_Servant::Receiver_Servant ( - ::Hello::CCM_Receiver_ptr exe, - ::Components::CCMHome_ptr h, - ::CIAO::Swapping_Container *c) - : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (c)), - comp_svnt_base (exe, c) - { - this->context_ = new Receiver_Context (h, c, this); - - ACE_TRY_NEW_ENV - { - ::Components::SessionComponent_var scom = - ::Components::SessionComponent::_narrow ( - exe - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (! ::CORBA::is_nil (scom.in ())) - { - scom->set_session_context ( - this->context_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - this->populate_port_tables ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - ACE_CATCHANY - { - } - - ACE_ENDTRY; - } - - Receiver_Servant::~Receiver_Servant (void) - { - } - - void - Receiver_Servant::set_attributes ( - const ::Components::ConfigValues &descr - ACE_ENV_ARG_DECL_NOT_USED) - { - for (CORBA::ULong i = 0; - i < descr.length (); - ++i) - { - const char *descr_name = descr[i]->name (); - ::CORBA::Any &descr_value = descr[i]->value (); - - ACE_UNUSED_ARG (descr_name); - ACE_UNUSED_ARG (descr_value); - } - } - - ::Components::Cookie * - Receiver_Servant::connect ( - const char *name, - ::CORBA::Object_ptr connection - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::AlreadyConnected, - ::Components::ExceededConnectionLimit)) - { - // If the component has no receptacles, this will be unused. - ACE_UNUSED_ARG (connection); - - if (name == 0) - { - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - CORBA::Object_ptr - Receiver_Servant::disconnect ( - const char *name, - ::Components::Cookie * ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::CookieRequired, - ::Components::NoConnection)) - { - if (name == 0) - { - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::CORBA::Object::_nil ()); - } - - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::CORBA::Object::_nil ()); - - ACE_UNUSED_ARG (ck); - } - - void - Receiver_Servant::connect_consumer ( - const char * emitter_name, - ::Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)) - { - if (emitter_name == 0) - { - ACE_THROW (::CORBA::BAD_PARAM ()); - } - - ACE_UNUSED_ARG (consumer); - ACE_THROW (::Components::InvalidName ()); - } - - ::Components::Cookie * - Receiver_Servant::subscribe ( - const char *publisher_name, - ::Components::EventConsumerBase_ptr subscribe - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::ExceededConnectionLimit)) - { - // Just in case there are no if blocks - ACE_UNUSED_ARG (subscribe); - - if (publisher_name == 0) - { - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - ::Components::EventConsumerBase_ptr - Receiver_Servant::unsubscribe ( - const char *publisher_name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection)) - { - // Just in case there are no if blocks - ACE_UNUSED_ARG (ck); - - if (publisher_name == 0) - { - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::Components::EventConsumerBase::_nil ()); - } - - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::Components::EventConsumerBase::_nil ()); - } - - CORBA::Object_ptr - Receiver_Servant::get_facet_executor (const char *name - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException)) - { - if (name == 0) - { - ACE_THROW_RETURN ( - ::CORBA::BAD_PARAM (), - ::CORBA::Object::_nil ()); - } - - return CORBA::Object::_nil (); - } - - // Supported operations. - - // Component attribute operations. - - // Private method to populate the port tables. - void - Receiver_Servant::populate_port_tables ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_ENV_ARG_NOT_USED; - ::CORBA::Object_var obj_var; - ::Components::EventConsumerBase_var ecb_var; - } - } - - namespace CIAO_GLUE_Hello - { - ReceiverHome_Servant::ReceiverHome_Servant ( - ::Hello::CCM_ReceiverHome_ptr exe, - ::CIAO::Swapping_Container *c) - : ACE_NESTED_CLASS (CIAO, Swapping_Servant_Home_Impl_Base (c)), - home_svnt_base (exe, c, "Receiver_Impl_Hello_Receiver", - "Receiver_Impl_Hello_Receiver") - { - } - - ReceiverHome_Servant::~ReceiverHome_Servant (void) - { - } - - // Home operations. - - // Home supported interface operations. - - // Home factory and finder operations. - - // Home attribute operations. - } - - extern "C" RECEIVER_SVNT_Export ::PortableServer::Servant - createReceiverHome_Servant ( - ::Components::HomeExecutorBase_ptr p, - CIAO::Swapping_Container *c - ACE_ENV_ARG_DECL) - { - if (p == 0) - { - return 0; - } - - ::Hello::CCM_ReceiverHome_var x = - ::Hello::CCM_ReceiverHome::_narrow ( - p - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (::CORBA::is_nil (x.in ())) - { - return 0; - } - - return new - CIAO_GLUE_Hello::ReceiverHome_Servant ( - x.in (), - c); - } -} - diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections deleted file mode 100644 index 38d5c07e003..00000000000 --- a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.cpp.with-connections +++ /dev/null @@ -1,585 +0,0 @@ -// $Id$ -// -// **** Code generated by the **** -// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** -// CIAO has been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// CIDL Compiler has been developed by: -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about CIAO is available at: -// http://www.dre.vanderbilt.edu/CIAO - -#include "Receiver_svnt.h" -#include "Cookies.h" -#include "ciao/Servant_Activator.h" -#include "ciao/Port_Activator_T.h" - -namespace Receiver_Impl -{ - namespace CIAO_GLUE_Hello - { - Receiver_Context::Receiver_Context ( - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c, - Receiver_Servant *sv) - : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)), - ctx_svnt_base (home, c, sv) - { - } - - Receiver_Context::~Receiver_Context (void) - { - } - - // Operations for Receiver receptacles and event sources, - // defined in ::Hello::CCM_Receiver_Context. - - ::Hello::ReadMessage_ptr - Receiver_Context::get_connection_read_message ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - return ::Hello::ReadMessage::_duplicate ( - this->ciao_uses_read_message_.in ()); - } - - void - Receiver_Context::connect_read_message ( - ::Hello::ReadMessage_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)) - { - if (!CORBA::is_nil (this->ciao_uses_read_message_.in ())) - { - ACE_THROW (::Components::AlreadyConnected ()); - } - - if (CORBA::is_nil (c)) - { - ACE_THROW (::Components::InvalidConnection ()); - } - - this->ciao_uses_read_message_ = - ::Hello::ReadMessage::_duplicate (c); - } - - ::Hello::ReadMessage_ptr - Receiver_Context::disconnect_read_message ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::NoConnection)) - { - if (CORBA::is_nil (this->ciao_uses_read_message_.in ())) - { - ACE_THROW_RETURN ( - ::Components::NoConnection (), - ::Hello::ReadMessage::_nil ()); - } - - return this->ciao_uses_read_message_._retn (); - } - - // CIAO-specific. - - Receiver_Context * - Receiver_Context::_narrow ( - ::Components::SessionContext_ptr p - ACE_ENV_ARG_DECL_NOT_USED) - { - return dynamic_cast<Receiver_Context *> (p); - } - } - - namespace CIAO_GLUE_Hello - { - Receiver_Servant::Receiver_Servant ( - ::Hello::CCM_Receiver_ptr exe, - ::Components::CCMHome_ptr h, - ::CIAO::Swapping_Container *c) - : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (c)), - comp_svnt_base (exe, c) - { - this->context_ = new Receiver_Context (h, c, this); - - CIAO_REGISTER_OBV_FACTORY ( - ::Hello::TimeOut_init, - ::Hello::TimeOut); - - ACE_TRY_NEW_ENV - { - ::Components::SessionComponent_var scom = - ::Components::SessionComponent::_narrow ( - exe - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (! ::CORBA::is_nil (scom.in ())) - { - scom->set_session_context ( - this->context_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - this->populate_port_tables ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - ACE_CATCHANY - { - } - - ACE_ENDTRY; - } - - Receiver_Servant::~Receiver_Servant (void) - { - } - - void - Receiver_Servant::set_attributes ( - const ::Components::ConfigValues &descr - ACE_ENV_ARG_DECL_NOT_USED) - { - for (CORBA::ULong i = 0; - i < descr.length (); - ++i) - { - const char *descr_name = descr[i]->name (); - ::CORBA::Any &descr_value = descr[i]->value (); - - ACE_UNUSED_ARG (descr_name); - ACE_UNUSED_ARG (descr_value); - } - } - - Receiver_Servant::TimeOutConsumer_click_in_Servant::TimeOutConsumer_click_in_Servant ( - ::Hello::CCM_Receiver_ptr executor, - ::Hello::CCM_Receiver_Context_ptr c) - : executor_ (::Hello::CCM_Receiver::_duplicate (executor)), - ctx_ (::Hello::CCM_Receiver_Context::_duplicate (c)) - { - } - - Receiver_Servant::TimeOutConsumer_click_in_Servant::~TimeOutConsumer_click_in_Servant (void) - { - } - - CORBA::Object_ptr - Receiver_Servant::TimeOutConsumer_click_in_Servant::_get_component ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - return this->ctx_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER); - } - - void - Receiver_Servant::TimeOutConsumer_click_in_Servant::push_TimeOut ( - ::Hello::TimeOut *evt - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - this->executor_->push_click_in ( - evt - ACE_ENV_ARG_PARAMETER); - } - - // Inherited from ::Components::EventConsumerBase. - void - Receiver_Servant::TimeOutConsumer_click_in_Servant::push_event ( - ::Components::EventBase *ev - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::BadEventType)) - { - ::Hello::TimeOut_var ev_type = - ::Hello::TimeOut::_downcast (ev); - - if (ev_type.in () != 0) - { - this->push_TimeOut ( - ev_type.in () - ACE_ENV_ARG_PARAMETER); - - return; - } - - ACE_THROW (::Components::BadEventType ()); - } - - ::Hello::TimeOutConsumer_ptr - Receiver_Servant::get_consumer_click_in ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - if (! ::CORBA::is_nil (this->consumes_click_in_.in ())) - { - return ::Hello::TimeOutConsumer::_duplicate (this->consumes_click_in_.in ()); - } - - ::Components::EventConsumerBase_var obj = - this->get_consumer_click_in_i ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ()); - - ::Hello::TimeOutConsumer_var eco = - ::Hello::TimeOutConsumer::_narrow ( - obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ()); - - this->consumes_click_in_ = eco; - return ::Hello::TimeOutConsumer::_duplicate (this->consumes_click_in_.in ()); - } - - ::Components::EventConsumerBase_ptr - Receiver_Servant::get_consumer_click_in_i ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ::Components::EventConsumerBase_ptr ret = - this->lookup_consumer ("click_in"); - - if (! ::CORBA::is_nil (ret)) - { - return ret; - } - - CIAO::Port_Activator_T< - Receiver_Servant::TimeOutConsumer_click_in_Servant, - ::Hello::CCM_Receiver, - ::Hello::CCM_Receiver_Context, - Receiver_Servant > *tmp = 0; - - typedef CIAO::Port_Activator_T< - Receiver_Servant::TimeOutConsumer_click_in_Servant, - ::Hello::CCM_Receiver, - ::Hello::CCM_Receiver_Context, - Receiver_Servant > - MACRO_MADNESS_TYPEDEF; - - - ACE_NEW_THROW_EX ( - tmp, - MACRO_MADNESS_TYPEDEF ( - "Hello_Receiver_click_in", - "click_in", - CIAO::Port_Activator::Sink, - this->executor_.in (), - this->context_, - this), - CORBA::NO_MEMORY ()); - - - CIAO::Servant_Activator *sa = - this->container_->ports_servant_activator (); - - if (!sa->register_port_activator (tmp)) - { - return 0; - } - - ::CORBA::Object_var obj = - this->container_->generate_reference ( - "Hello_Receiver_click_in", - "IDL:Hello/TimeOutConsumer:1.0", - CIAO::Container::Facet_Consumer - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ()); - - ::Components::EventConsumerBase_var ecb = - ::Components::EventConsumerBase::_narrow ( - obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (::Hello::TimeOutConsumer::_nil ()); - - this->add_consumer ( - "click_in", - ecb.in ()); - - return ecb._retn (); - } - - ::Components::Cookie * - Receiver_Servant::connect ( - const char *name, - ::CORBA::Object_ptr connection - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::AlreadyConnected, - ::Components::ExceededConnectionLimit)) - { - // If the component has no receptacles, this will be unused. - ACE_UNUSED_ARG (connection); - - if (name == 0) - { - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - if (ACE_OS::strcmp (name, "read_message") == 0) - { - ::Hello::ReadMessage_var _ciao_conn = - ::Hello::ReadMessage::_narrow ( - connection - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (::CORBA::is_nil (_ciao_conn.in ())) - { - ACE_THROW_RETURN (::Components::InvalidConnection (), 0); - } - - // Simplex connect. - this->connect_read_message ( - _ciao_conn.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - return 0; - } - - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - CORBA::Object_ptr - Receiver_Servant::disconnect ( - const char *name, - ::Components::Cookie * ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::CookieRequired, - ::Components::NoConnection)) - { - if (name == 0) - { - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::CORBA::Object::_nil ()); - } - - if (ACE_OS::strcmp (name, "read_message") == 0) - { - // Simplex disconnect. - return this->disconnect_read_message (ACE_ENV_SINGLE_ARG_PARAMETER); - } - - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::CORBA::Object::_nil ()); - - ACE_UNUSED_ARG (ck); - } - - void - Receiver_Servant::connect_read_message ( - ::Hello::ReadMessage_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)) - { - this->context_->connect_read_message ( - c - ACE_ENV_ARG_PARAMETER); - } - - ::Hello::ReadMessage_ptr - Receiver_Servant::disconnect_read_message ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::NoConnection)) - { - return this->context_->disconnect_read_message ( - ACE_ENV_SINGLE_ARG_PARAMETER); - } - - ::Hello::ReadMessage_ptr - Receiver_Servant::get_connection_read_message ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - return this->context_->get_connection_read_message ( - ACE_ENV_SINGLE_ARG_PARAMETER); - } - - void - Receiver_Servant::connect_consumer ( - const char * emitter_name, - ::Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)) - { - if (emitter_name == 0) - { - ACE_THROW (::CORBA::BAD_PARAM ()); - } - - ACE_UNUSED_ARG (consumer); - ACE_THROW (::Components::InvalidName ()); - } - - ::Components::Cookie * - Receiver_Servant::subscribe ( - const char *publisher_name, - ::Components::EventConsumerBase_ptr subscribe - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::ExceededConnectionLimit)) - { - // Just in case there are no if blocks - ACE_UNUSED_ARG (subscribe); - - if (publisher_name == 0) - { - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - ::Components::EventConsumerBase_ptr - Receiver_Servant::unsubscribe ( - const char *publisher_name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection)) - { - // Just in case there are no if blocks - ACE_UNUSED_ARG (ck); - - if (publisher_name == 0) - { - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::Components::EventConsumerBase::_nil ()); - } - - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::Components::EventConsumerBase::_nil ()); - } - - CORBA::Object_ptr - Receiver_Servant::get_facet_executor (const char *name - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException)) - { - if (name == 0) - { - ACE_THROW_RETURN ( - ::CORBA::BAD_PARAM (), - ::CORBA::Object::_nil ()); - } - - return CORBA::Object::_nil (); - } - - // Supported operations. - - // Component attribute operations. - - // Private method to populate the port tables. - void - Receiver_Servant::populate_port_tables ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_ENV_ARG_NOT_USED; - ::CORBA::Object_var obj_var; - ::Components::EventConsumerBase_var ecb_var; - - ecb_var = - this->get_consumer_click_in_i ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - } - - namespace CIAO_GLUE_Hello - { - ReceiverHome_Servant::ReceiverHome_Servant ( - ::Hello::CCM_ReceiverHome_ptr exe, - ::CIAO::Swapping_Container *c) - : ACE_NESTED_CLASS (CIAO, Swapping_Servant_Home_Impl_Base (c)), - home_svnt_base (exe, c, "Receiver_Impl_Hello_Receiver", - "Receiver_Impl_Hello_Receiver") - { - } - - ReceiverHome_Servant::~ReceiverHome_Servant (void) - { - } - - // Home operations. - - // Home supported interface operations. - - // Home factory and finder operations. - - // Home attribute operations. - } - - extern "C" RECEIVER_SVNT_Export ::PortableServer::Servant - createReceiverHome_Servant ( - ::Components::HomeExecutorBase_ptr p, - CIAO::Swapping_Container *c - ACE_ENV_ARG_DECL) - { - if (p == 0) - { - return 0; - } - - ::Hello::CCM_ReceiverHome_var x = - ::Hello::CCM_ReceiverHome::_narrow ( - p - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (::CORBA::is_nil (x.in ())) - { - return 0; - } - - return new - CIAO_GLUE_Hello::ReceiverHome_Servant ( - x.in (), - c); - } -} - diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.no-connections b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.no-connections deleted file mode 100644 index ed3cd72fcad..00000000000 --- a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.no-connections +++ /dev/null @@ -1,258 +0,0 @@ -// $Id$ -// -// **** Code generated by the **** -// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** -// CIAO has been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// CIDL Compiler has been developed by: -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about CIAO is available at: -// http://www.dre.vanderbilt.edu/CIAO - -#ifndef CIAO_GLUE_SESSION_RECEIVER_SVNT_H -#define CIAO_GLUE_SESSION_RECEIVER_SVNT_H - -#include /**/ "ace/pre.h" - -#include "ReceiverEC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ciao/Container_Base.h" -#include "ciao/Swapping_Container.h" -#include "ciao/Servant_Impl_T.h" -#include "ciao/Context_Impl_T.h" -#include "ciao/Home_Servant_Impl_T.h" -#include "ciao/Swapping_Servant_Home_Impl_T.h" -#include "ace/Active_Map_Manager_T.h" - -#include "ReceiverS.h" - -namespace Receiver_Impl -{ - namespace CIAO_GLUE_Hello - { - class Receiver_Servant; - - class RECEIVER_SVNT_Export Receiver_Context - : public virtual CIAO::Context_Impl< - ::Hello::CCM_Receiver_Context, - Receiver_Servant, - ::Hello::Receiver, - ::Hello::Receiver_var - > - { - public: - // We will allow the servant glue code we generate to access our state. - friend class Receiver_Servant; - - /// Hack for VC6. - typedef CIAO::Context_Impl< - ::Hello::CCM_Receiver_Context, - Receiver_Servant, - ::Hello::Receiver, - ::Hello::Receiver_var - > ctx_svnt_base; - - Receiver_Context ( - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c, - Receiver_Servant *sv); - - virtual ~Receiver_Context (void); - - // Operations for Receiver receptacles and event sources, - // defined in ::Hello::CCM_Receiver_Context. - - // CIAO-specific. - - static Receiver_Context * - _narrow ( - ::Components::SessionContext_ptr p - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - protected: - // Methods that manage this component's connections and consumers. - - protected: - }; - } - - namespace CIAO_GLUE_Hello - { - class RECEIVER_SVNT_Export Receiver_Servant - : public virtual CIAO::Servant_Impl< - POA_Hello::Receiver, - ::Hello::CCM_Receiver, - ::Hello::CCM_Receiver_var, - Receiver_Context - > - { - public: - /// Hack for VC6. - typedef CIAO::Servant_Impl< - POA_Hello::Receiver, - ::Hello::CCM_Receiver, - ::Hello::CCM_Receiver_var, - Receiver_Context - > comp_svnt_base; - - Receiver_Servant ( - ::Hello::CCM_Receiver_ptr executor, - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c); - - virtual ~Receiver_Servant (void); - - virtual void - set_attributes ( - const ::Components::ConfigValues &descr - ACE_ENV_ARG_DECL); - - // Supported operations. - - // Public port operations. - - // Component attribute operations. - - // Operations for Receptacles interface. - - virtual ::Components::Cookie * - connect ( - const char *name, - CORBA::Object_ptr connection - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::AlreadyConnected, - ::Components::ExceededConnectionLimit)); - - virtual CORBA::Object_ptr - disconnect ( - const char *name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::CookieRequired, - ::Components::NoConnection)); - - // Operations for Events interface. - - virtual ::Components::Cookie * - subscribe ( - const char *publisher_name, - ::Components::EventConsumerBase_ptr subscriber - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::ExceededConnectionLimit)); - - virtual ::Components::EventConsumerBase_ptr - unsubscribe ( - const char *publisher_name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection)); - - virtual void - connect_consumer ( - const char *emitter_name, - ::Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)); - - // CIAO specific operations on the servant - CORBA::Object_ptr - get_facet_executor (const char *name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException)); - - private: - - private: - - void - populate_port_tables ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - }; - } - - namespace CIAO_GLUE_Hello - { - class RECEIVER_SVNT_Export ReceiverHome_Servant - : public virtual CIAO::Swapping_Servant_Home_Impl< - POA_Hello::ReceiverHome, - ::Hello::CCM_ReceiverHome, - ::Hello::CCM_ReceiverHome_var, - ::Hello::Receiver, - ::Hello::Receiver_var, - ::Hello::CCM_Receiver, - ::Hello::CCM_Receiver_var, - Receiver_Servant - > - { - public: - /// Hack for VC6. - typedef CIAO::Swapping_Servant_Home_Impl< - POA_Hello::ReceiverHome, - ::Hello::CCM_ReceiverHome, - ::Hello::CCM_ReceiverHome_var, - ::Hello::Receiver, - ::Hello::Receiver_var, - ::Hello::CCM_Receiver, - ::Hello::CCM_Receiver_var, - Receiver_Servant - > home_svnt_base; - - ReceiverHome_Servant ( - ::Hello::CCM_ReceiverHome_ptr exe, - ::CIAO::Swapping_Container *c); - - virtual ~ReceiverHome_Servant (void); - - // Home operations. - - // Home factory and finder operations. - - // Attribute operations. - }; - - extern "C" RECEIVER_SVNT_Export ::PortableServer::Servant - createReceiverHome_Servant ( - ::Components::HomeExecutorBase_ptr p, - CIAO::Swapping_Container *c - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - } -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_GLUE_SESSION_RECEIVER_SVNT_H */ - diff --git a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections deleted file mode 100644 index 48adda24d03..00000000000 --- a/TAO/CIAO/DAnCE/examples/Hello/Receiver/Receiver_svnt.h.with-connections +++ /dev/null @@ -1,356 +0,0 @@ -// $Id$ -// -// **** Code generated by the **** -// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** -// CIAO has been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// CIDL Compiler has been developed by: -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about CIAO is available at: -// http://www.dre.vanderbilt.edu/CIAO - -#ifndef CIAO_GLUE_SESSION_RECEIVER_SVNT_H -#define CIAO_GLUE_SESSION_RECEIVER_SVNT_H - -#include /**/ "ace/pre.h" - -#include "ReceiverEC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ciao/Container_Base.h" -#include "ciao/Swapping_Container.h" -#include "ciao/Servant_Impl_T.h" -#include "ciao/Context_Impl_T.h" -#include "ciao/Home_Servant_Impl_T.h" -#include "ciao/Swapping_Servant_Home_Impl_T.h" -#include "ace/Active_Map_Manager_T.h" - -#include "ReceiverS.h" - -namespace Receiver_Impl -{ - namespace CIAO_GLUE_Hello - { - class Receiver_Servant; - - class RECEIVER_SVNT_Export Receiver_Context - : public virtual CIAO::Context_Impl< - ::Hello::CCM_Receiver_Context, - Receiver_Servant, - ::Hello::Receiver, - ::Hello::Receiver_var - > - { - public: - // We will allow the servant glue code we generate to access our state. - friend class Receiver_Servant; - - /// Hack for VC6. - typedef CIAO::Context_Impl< - ::Hello::CCM_Receiver_Context, - Receiver_Servant, - ::Hello::Receiver, - ::Hello::Receiver_var - > ctx_svnt_base; - - Receiver_Context ( - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c, - Receiver_Servant *sv); - - virtual ~Receiver_Context (void); - - // Operations for Receiver receptacles and event sources, - // defined in ::Hello::CCM_Receiver_Context. - - virtual ::Hello::ReadMessage_ptr - get_connection_read_message ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // CIAO-specific. - - static Receiver_Context * - _narrow ( - ::Components::SessionContext_ptr p - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - protected: - // Methods that manage this component's connections and consumers. - - virtual void - connect_read_message ( - ::Hello::ReadMessage_ptr - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)); - - virtual ::Hello::ReadMessage_ptr - disconnect_read_message ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::NoConnection)); - - protected: - // Simplex read_message connection. - ::Hello::ReadMessage_var - ciao_uses_read_message_; - }; - } - - namespace CIAO_GLUE_Hello - { - class RECEIVER_SVNT_Export Receiver_Servant - : public virtual CIAO::Servant_Impl< - POA_Hello::Receiver, - ::Hello::CCM_Receiver, - ::Hello::CCM_Receiver_var, - Receiver_Context - > - { - public: - /// Hack for VC6. - typedef CIAO::Servant_Impl< - POA_Hello::Receiver, - ::Hello::CCM_Receiver, - ::Hello::CCM_Receiver_var, - Receiver_Context - > comp_svnt_base; - - Receiver_Servant ( - ::Hello::CCM_Receiver_ptr executor, - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c); - - virtual ~Receiver_Servant (void); - - virtual void - set_attributes ( - const ::Components::ConfigValues &descr - ACE_ENV_ARG_DECL); - - // Supported operations. - - // Public port operations. - - virtual void - connect_read_message ( - ::Hello::ReadMessage_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)); - - virtual ::Hello::ReadMessage_ptr - disconnect_read_message ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::NoConnection)); - - virtual ::Hello::ReadMessage_ptr - get_connection_read_message ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // Servant class for the click_in consumer. - class RECEIVER_SVNT_Export TimeOutConsumer_click_in_Servant - : public virtual POA_Hello::TimeOutConsumer, - public virtual PortableServer::RefCountServantBase - { - public: - TimeOutConsumer_click_in_Servant ( - ::Hello::CCM_Receiver_ptr executor, - ::Hello::CCM_Receiver_Context_ptr c); - - virtual ~TimeOutConsumer_click_in_Servant (void); - - virtual void - push_TimeOut ( - ::Hello::TimeOut *evt - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // Inherited from ::Components::EventConsumerBase. - virtual void - push_event (::Components::EventBase *ev - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::BadEventType)); - - // Get component implementation. - virtual CORBA::Object_ptr - _get_component ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - protected: - ::Hello::CCM_Receiver_var - executor_; - - ::Hello::CCM_Receiver_Context_var - ctx_; - }; - - virtual ::Hello::TimeOutConsumer_ptr - get_consumer_click_in ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // Component attribute operations. - - // Operations for Receptacles interface. - - virtual ::Components::Cookie * - connect ( - const char *name, - CORBA::Object_ptr connection - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::AlreadyConnected, - ::Components::ExceededConnectionLimit)); - - virtual CORBA::Object_ptr - disconnect ( - const char *name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::CookieRequired, - ::Components::NoConnection)); - - // Operations for Events interface. - - virtual ::Components::Cookie * - subscribe ( - const char *publisher_name, - ::Components::EventConsumerBase_ptr subscriber - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::ExceededConnectionLimit)); - - virtual ::Components::EventConsumerBase_ptr - unsubscribe ( - const char *publisher_name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection)); - - virtual void - connect_consumer ( - const char *emitter_name, - ::Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)); - - // CIAO specific operations on the servant - CORBA::Object_ptr - get_facet_executor (const char *name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException)); - - private: - - ::Hello::TimeOutConsumer_var - consumes_click_in_; - - private: - - void - populate_port_tables ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - ::Components::EventConsumerBase_ptr - get_consumer_click_in_i ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - }; - } - - namespace CIAO_GLUE_Hello - { - class RECEIVER_SVNT_Export ReceiverHome_Servant - : public virtual CIAO::Swapping_Servant_Home_Impl< - POA_Hello::ReceiverHome, - ::Hello::CCM_ReceiverHome, - ::Hello::CCM_ReceiverHome_var, - ::Hello::Receiver, - ::Hello::Receiver_var, - ::Hello::CCM_Receiver, - ::Hello::CCM_Receiver_var, - Receiver_Servant - > - { - public: - /// Hack for VC6. - typedef CIAO::Swapping_Servant_Home_Impl< - POA_Hello::ReceiverHome, - ::Hello::CCM_ReceiverHome, - ::Hello::CCM_ReceiverHome_var, - ::Hello::Receiver, - ::Hello::Receiver_var, - ::Hello::CCM_Receiver, - ::Hello::CCM_Receiver_var, - Receiver_Servant - > home_svnt_base; - - ReceiverHome_Servant ( - ::Hello::CCM_ReceiverHome_ptr exe, - ::CIAO::Swapping_Container *c); - - virtual ~ReceiverHome_Servant (void); - - // Home operations. - - // Home factory and finder operations. - - // Attribute operations. - }; - - extern "C" RECEIVER_SVNT_Export ::PortableServer::Servant - createReceiverHome_Servant ( - ::Components::HomeExecutorBase_ptr p, - CIAO::Swapping_Container *c - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - } -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_GLUE_SESSION_RECEIVER_SVNT_H */ - diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.no-connections b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.no-connections deleted file mode 100644 index 94723a55331..00000000000 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.no-connections +++ /dev/null @@ -1,354 +0,0 @@ -// $Id$ -// -// **** Code generated by the **** -// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** -// CIAO has been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// CIDL Compiler has been developed by: -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about CIAO is available at: -// http://www.dre.vanderbilt.edu/CIAO - -#include "Sender_svnt.h" -#include "Cookies.h" -#include "ciao/Servant_Activator.h" -#include "ciao/Port_Activator_T.h" - -namespace Sender_Impl -{ - namespace CIAO_GLUE_Hello - { - Sender_Context::Sender_Context ( - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c, - Sender_Servant *sv) - : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)), - ctx_svnt_base (home, c, sv) - { - } - - Sender_Context::~Sender_Context (void) - { - } - - // Operations for Sender receptacles and event sources, - // defined in ::Hello::CCM_Sender_Context. - - // CIAO-specific. - - Sender_Context * - Sender_Context::_narrow ( - ::Components::SessionContext_ptr p - ACE_ENV_ARG_DECL_NOT_USED) - { - return dynamic_cast<Sender_Context *> (p); - } - } - - namespace CIAO_GLUE_Hello - { - Sender_Servant::Sender_Servant ( - ::Hello::CCM_Sender_ptr exe, - ::Components::CCMHome_ptr h, - ::CIAO::Swapping_Container *c) - : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (c)), - comp_svnt_base (exe, c) - { - this->context_ = new Sender_Context (h, c, this); - - ACE_TRY_NEW_ENV - { - ::Components::SessionComponent_var scom = - ::Components::SessionComponent::_narrow ( - exe - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (! ::CORBA::is_nil (scom.in ())) - { - scom->set_session_context ( - this->context_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - this->populate_port_tables ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - ACE_CATCHANY - { - } - - ACE_ENDTRY; - } - - Sender_Servant::~Sender_Servant (void) - { - } - - void - Sender_Servant::set_attributes ( - const ::Components::ConfigValues &descr - ACE_ENV_ARG_DECL_NOT_USED) - { - for (CORBA::ULong i = 0; - i < descr.length (); - ++i) - { - const char *descr_name = descr[i]->name (); - ::CORBA::Any &descr_value = descr[i]->value (); - - if (ACE_OS::strcmp (descr_name, "local_message") == 0) - { - const char * _ciao_extract_val = 0; - descr_value >>= _ciao_extract_val; - this->local_message (_ciao_extract_val); - continue; - } - - ACE_UNUSED_ARG (descr_name); - ACE_UNUSED_ARG (descr_value); - } - } - - ::Components::Cookie * - Sender_Servant::connect ( - const char *name, - ::CORBA::Object_ptr connection - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::AlreadyConnected, - ::Components::ExceededConnectionLimit)) - { - // If the component has no receptacles, this will be unused. - ACE_UNUSED_ARG (connection); - - if (name == 0) - { - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - CORBA::Object_ptr - Sender_Servant::disconnect ( - const char *name, - ::Components::Cookie * ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::CookieRequired, - ::Components::NoConnection)) - { - if (name == 0) - { - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::CORBA::Object::_nil ()); - } - - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::CORBA::Object::_nil ()); - - ACE_UNUSED_ARG (ck); - } - - void - Sender_Servant::connect_consumer ( - const char * emitter_name, - ::Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)) - { - if (emitter_name == 0) - { - ACE_THROW (::CORBA::BAD_PARAM ()); - } - - ACE_UNUSED_ARG (consumer); - ACE_THROW (::Components::InvalidName ()); - } - - ::Components::Cookie * - Sender_Servant::subscribe ( - const char *publisher_name, - ::Components::EventConsumerBase_ptr subscribe - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::ExceededConnectionLimit)) - { - // Just in case there are no if blocks - ACE_UNUSED_ARG (subscribe); - - if (publisher_name == 0) - { - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - ::Components::EventConsumerBase_ptr - Sender_Servant::unsubscribe ( - const char *publisher_name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection)) - { - // Just in case there are no if blocks - ACE_UNUSED_ARG (ck); - - if (publisher_name == 0) - { - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::Components::EventConsumerBase::_nil ()); - } - - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::Components::EventConsumerBase::_nil ()); - } - - CORBA::Object_ptr - Sender_Servant::get_facet_executor (const char *name - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException)) - { - if (name == 0) - { - ACE_THROW_RETURN ( - ::CORBA::BAD_PARAM (), - ::CORBA::Object::_nil ()); - } - - return CORBA::Object::_nil (); - } - - // Supported operations. - - void - Sender_Servant::start ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - this->executor_->start ( - ACE_ENV_SINGLE_ARG_PARAMETER); - } - - // Component attribute operations. - - char * - Sender_Servant::local_message ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - return this->executor_->local_message ( - ACE_ENV_SINGLE_ARG_PARAMETER); - } - - void - Sender_Servant::local_message ( - const char * local_message - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - this->executor_->local_message ( - local_message - ACE_ENV_ARG_PARAMETER); - } - - // Private method to populate the port tables. - void - Sender_Servant::populate_port_tables ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_ENV_ARG_NOT_USED; - ::CORBA::Object_var obj_var; - ::Components::EventConsumerBase_var ecb_var; - } - } - - namespace CIAO_GLUE_Hello - { - SenderHome_Servant::SenderHome_Servant ( - ::Hello::CCM_SenderHome_ptr exe, - ::CIAO::Swapping_Container *c) - : ACE_NESTED_CLASS (CIAO, Swapping_Servant_Home_Impl_Base (c)), - home_svnt_base (exe, c, "Sender_Impl_Hello_Sender", - "Sender_Impl_Hello_Sender") - { - } - - SenderHome_Servant::~SenderHome_Servant (void) - { - } - - // Home operations. - - // Home supported interface operations. - - // Home factory and finder operations. - - // Home attribute operations. - } - - extern "C" SENDER_SVNT_Export ::PortableServer::Servant - createSenderHome_Servant ( - ::Components::HomeExecutorBase_ptr p, - CIAO::Swapping_Container *c - ACE_ENV_ARG_DECL) - { - if (p == 0) - { - return 0; - } - - ::Hello::CCM_SenderHome_var x = - ::Hello::CCM_SenderHome::_narrow ( - p - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (::CORBA::is_nil (x.in ())) - { - return 0; - } - - return new - CIAO_GLUE_Hello::SenderHome_Servant ( - x.in (), - c); - } -} - diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections deleted file mode 100644 index a04d2e3d79a..00000000000 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.cpp.with-connections +++ /dev/null @@ -1,654 +0,0 @@ -// $Id$ -// -// **** Code generated by the **** -// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** -// CIAO has been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// CIDL Compiler has been developed by: -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about CIAO is available at: -// http://www.dre.vanderbilt.edu/CIAO - -#include "Sender_svnt.h" -#include "Cookies.h" -#include "ciao/Servant_Activator.h" -#include "ciao/Dynamic_Component_Activator.h" -#include "ciao/Port_Activator_T.h" - -namespace Sender_Impl -{ - namespace CIAO_GLUE_Hello - { - template <typename T> - ReadMessage_Servant_T<T>::ReadMessage_Servant_T ( - ::Hello::CCM_ReadMessage_ptr executor, - ::Components::CCMContext_ptr c) - : executor_ (::Hello::CCM_ReadMessage::_duplicate (executor)), - ctx_ (::Components::CCMContext::_duplicate (c)) - { - } - - template <typename T> - ReadMessage_Servant_T<T>::~ReadMessage_Servant_T (void) - { - } - - template <typename T> - char * - ReadMessage_Servant_T<T>::get_message ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - return this->executor_->get_message ( - ACE_ENV_SINGLE_ARG_PARAMETER); - } - - template <typename T> - CORBA::Object_ptr - ReadMessage_Servant_T<T>::_get_component ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ::Components::SessionContext_var sc = - ::Components::SessionContext::_narrow ( - this->ctx_.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - if (! CORBA::is_nil (sc.in ())) - { - return sc->get_CCM_object ( - ACE_ENV_SINGLE_ARG_PARAMETER); - } - - ::Components::EntityContext_var ec = - ::Components::EntityContext::_narrow ( - this->ctx_.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - if (! CORBA::is_nil (ec.in ())) - { - return ec->get_CCM_object ( - ACE_ENV_SINGLE_ARG_PARAMETER); - } - - ACE_THROW_RETURN (CORBA::INTERNAL (), 0); - } - } - - namespace CIAO_GLUE_Hello - { - Sender_Context::Sender_Context ( - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c, - Sender_Servant *sv) - : ACE_NESTED_CLASS (CIAO, Context_Impl_Base (home, c)), - ctx_svnt_base (home, c, sv) - { - } - - Sender_Context::~Sender_Context (void) - { - } - - // Operations for Sender receptacles and event sources, - // defined in ::Hello::CCM_Sender_Context. - - void - Sender_Context::push_click_out ( - ::Hello::TimeOut *ev - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_Active_Map_Manager< - ::Hello::TimeOutConsumer_var>::iterator end = - this->ciao_publishes_click_out_map_.end (); - - for (ACE_Active_Map_Manager< - ::Hello::TimeOutConsumer_var>::iterator iter = - this->ciao_publishes_click_out_map_.begin (); - iter != end; - ++iter) - { - ACE_Active_Map_Manager< - ::Hello::TimeOutConsumer_var>::ENTRY &entry = *iter; - - ::Hello::TimeOutConsumer_var c = - ::Hello::TimeOutConsumer::_narrow ( - entry.int_id_.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - entry.int_id_->push_TimeOut ( - ev - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - } - - ::Components::Cookie * - Sender_Context::subscribe_click_out ( - ::Hello::TimeOutConsumer_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::ExceededConnectionLimit)) - { - if (CORBA::is_nil (c)) - { - ACE_THROW_RETURN (CORBA::BAD_PARAM (), 0); - } - - ::Hello::TimeOutConsumer_var sub = - ::Hello::TimeOutConsumer::_duplicate (c); - - ACE_Active_Map_Manager_Key key; - this->ciao_publishes_click_out_map_.bind (sub.in (), key); - sub._retn (); - - ::Components::Cookie_var retv = new ::CIAO::Map_Key_Cookie (key); - return retv._retn (); - } - - ::Hello::TimeOutConsumer_ptr - Sender_Context::unsubscribe_click_out ( - ::Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidConnection)) - { - ::Hello::TimeOutConsumer_var retv; - ACE_Active_Map_Manager_Key key; - - if (ck == 0 || ::CIAO::Map_Key_Cookie::extract (ck, key) == false) - { - ACE_THROW_RETURN ( - ::Components::InvalidConnection (), - ::Hello::TimeOutConsumer::_nil ()); - } - - if (this->ciao_publishes_click_out_map_.unbind (key, retv) != 0) - { - ACE_THROW_RETURN ( - ::Components::InvalidConnection (), - ::Hello::TimeOutConsumer::_nil ()); - } - - return retv._retn (); - } - - // CIAO-specific. - - Sender_Context * - Sender_Context::_narrow ( - ::Components::SessionContext_ptr p - ACE_ENV_ARG_DECL_NOT_USED) - { - return dynamic_cast<Sender_Context *> (p); - } - } - - namespace CIAO_GLUE_Hello - { - Sender_Servant::Sender_Servant ( - ::Hello::CCM_Sender_ptr exe, - ::Components::CCMHome_ptr h, - ::CIAO::Swapping_Container *c) - : ACE_NESTED_CLASS (CIAO, Servant_Impl_Base (c)), - comp_svnt_base (exe, c) - { - this->context_ = new Sender_Context (h, c, this); - - ACE_TRY_NEW_ENV - { - ::Components::SessionComponent_var scom = - ::Components::SessionComponent::_narrow ( - exe - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (! ::CORBA::is_nil (scom.in ())) - { - scom->set_session_context ( - this->context_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - this->populate_port_tables ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - ACE_CATCHANY - { - } - - ACE_ENDTRY; - } - - Sender_Servant::~Sender_Servant (void) - { - } - - void - Sender_Servant::set_attributes ( - const ::Components::ConfigValues &descr - ACE_ENV_ARG_DECL_NOT_USED) - { - for (CORBA::ULong i = 0; - i < descr.length (); - ++i) - { - const char *descr_name = descr[i]->name (); - ::CORBA::Any &descr_value = descr[i]->value (); - - if (ACE_OS::strcmp (descr_name, "local_message") == 0) - { - const char * _ciao_extract_val = 0; - descr_value >>= _ciao_extract_val; - this->local_message (_ciao_extract_val); - continue; - } - - ACE_UNUSED_ARG (descr_name); - ACE_UNUSED_ARG (descr_value); - } - } - - ::Hello::ReadMessage_ptr - Sender_Servant::provide_push_message ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - if (! ::CORBA::is_nil (this->provide_push_message_.in ())) - { - return ::Hello::ReadMessage::_duplicate (this->provide_push_message_.in ()); - } - - ::CORBA::Object_var obj = - this->provide_push_message_i (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (::Hello::ReadMessage::_nil ()); - - ::Hello::ReadMessage_var fo = - ::Hello::ReadMessage::_narrow ( - obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (::Hello::ReadMessage::_nil ()); - - this->provide_push_message_ = fo; - return ::Hello::ReadMessage::_duplicate (this->provide_push_message_.in ()); - } - - ::CORBA::Object_ptr - Sender_Servant::provide_push_message_i ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ::CORBA::Object_ptr ret = - this->lookup_facet ("push_message"); - - if (! ::CORBA::is_nil (ret)) - { - return ret; - } - - ACE_DEBUG ((LM_DEBUG, "looked up the facet correctly\n")); - - CIAO::Port_Activator_T< - CIAO_GLUE_Hello::ReadMessage_Servant, - ::Hello::CCM_ReadMessage, - ::Components::CCMContext, - Sender_Servant - > *tmp = 0; - - typedef CIAO::Port_Activator_T< - CIAO_GLUE_Hello::ReadMessage_Servant, - ::Hello::CCM_ReadMessage, - ::Components::CCMContext, - Sender_Servant - > - MACRO_MADNESS_TYPEDEF; - - ACE_NEW_THROW_EX ( - tmp, - MACRO_MADNESS_TYPEDEF ( - "Hello_Sender_push_message", - "push_message", - CIAO::Port_Activator::Facet, - 0, - this->context_, - this), - CORBA::NO_MEMORY ()); - - ACE_DEBUG ((LM_DEBUG, "created the port activator\n")); - - CIAO::Servant_Activator *sa = - this->container_->ports_servant_activator (); - - ACE_DEBUG ((LM_DEBUG, "got the servant activator\n")); - - if (!sa->register_port_activator (tmp)) - { - return 0; - } - - ACE_DEBUG ((LM_DEBUG, "registered the port activator\n")); - - ::CORBA::Object_var obj = - this->container_->generate_reference ( - "Hello_Sender_push_message", - "IDL:Hello/ReadMessage:1.0", - CIAO::Container::Facet_Consumer - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (::Hello::ReadMessage::_nil ()); - - this->add_facet ( - "push_message", - obj.in ()); - - return obj._retn (); - } - - ::Components::Cookie * - Sender_Servant::subscribe_click_out ( - ::Hello::TimeOutConsumer_ptr c - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::ExceededConnectionLimit)) - { - return this->context_->subscribe_click_out ( - c - ACE_ENV_ARG_PARAMETER); - } - - ::Hello::TimeOutConsumer_ptr - Sender_Servant::unsubscribe_click_out ( - ::Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidConnection)) - { - return this->context_->unsubscribe_click_out ( - ck - ACE_ENV_ARG_PARAMETER); - } - - ::Components::Cookie * - Sender_Servant::connect ( - const char *name, - ::CORBA::Object_ptr connection - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::AlreadyConnected, - ::Components::ExceededConnectionLimit)) - { - // If the component has no receptacles, this will be unused. - ACE_UNUSED_ARG (connection); - - if (name == 0) - { - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - CORBA::Object_ptr - Sender_Servant::disconnect ( - const char *name, - ::Components::Cookie * ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::CookieRequired, - ::Components::NoConnection)) - { - if (name == 0) - { - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::CORBA::Object::_nil ()); - } - - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::CORBA::Object::_nil ()); - - ACE_UNUSED_ARG (ck); - } - - void - Sender_Servant::connect_consumer ( - const char * emitter_name, - ::Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)) - { - if (emitter_name == 0) - { - ACE_THROW (::CORBA::BAD_PARAM ()); - } - - ACE_UNUSED_ARG (consumer); - ACE_THROW (::Components::InvalidName ()); - } - - ::Components::Cookie * - Sender_Servant::subscribe ( - const char *publisher_name, - ::Components::EventConsumerBase_ptr subscribe - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::ExceededConnectionLimit)) - { - // Just in case there are no if blocks - ACE_UNUSED_ARG (subscribe); - - if (publisher_name == 0) - { - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - if (ACE_OS::strcmp (publisher_name, "click_out") == 0) - { - ::Hello::TimeOutConsumer_var _ciao_consumer = - ::Hello::TimeOutConsumer::_narrow ( - subscribe - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (::CORBA::is_nil (_ciao_consumer.in ())) - { - ACE_THROW_RETURN (::Components::InvalidConnection (), 0); - } - - return this->subscribe_click_out ( - _ciao_consumer.in () - ACE_ENV_ARG_PARAMETER); - } - - ACE_THROW_RETURN (::Components::InvalidName (), 0); - } - - ::Components::EventConsumerBase_ptr - Sender_Servant::unsubscribe ( - const char *publisher_name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection)) - { - // Just in case there are no if blocks - ACE_UNUSED_ARG (ck); - - if (publisher_name == 0) - { - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::Components::EventConsumerBase::_nil ()); - } - - if (ACE_OS::strcmp (publisher_name, "click_out") == 0) - { - return this->unsubscribe_click_out ( - ck - ACE_ENV_ARG_PARAMETER); - } - - ACE_THROW_RETURN ( - ::Components::InvalidName (), - ::Components::EventConsumerBase::_nil ()); - } - - CORBA::Object_ptr - Sender_Servant::get_facet_executor (const char *name - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - ::CORBA::SystemException)) - { - if (name == 0) - { - ACE_THROW_RETURN ( - ::CORBA::BAD_PARAM (), - ::CORBA::Object::_nil ()); - } - - if (ACE_OS::strcmp (name, "push_message") == 0) - { - return this->executor_->get_push_message (ACE_ENV_SINGLE_ARG_PARAMETER); - } - - return CORBA::Object::_nil (); - } - - // Supported operations. - - void - Sender_Servant::start ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - this->executor_->start ( - ACE_ENV_SINGLE_ARG_PARAMETER); - } - - // Component attribute operations. - - char * - Sender_Servant::local_message ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - return this->executor_->local_message ( - ACE_ENV_SINGLE_ARG_PARAMETER); - } - - void - Sender_Servant::local_message ( - const char * local_message - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - this->executor_->local_message ( - local_message - ACE_ENV_ARG_PARAMETER); - } - - // Private method to populate the port tables. - void - Sender_Servant::populate_port_tables ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_ENV_ARG_NOT_USED; - ::CORBA::Object_var obj_var; - ::Components::EventConsumerBase_var ecb_var; - - obj_var = - this->provide_push_message_i ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - } - - namespace CIAO_GLUE_Hello - { - SenderHome_Servant::SenderHome_Servant ( - ::Hello::CCM_SenderHome_ptr exe, - ::CIAO::Swapping_Container *c) - : ACE_NESTED_CLASS (CIAO, Swapping_Servant_Home_Impl_Base (c)), - home_svnt_base (exe, c, "Sender_Impl_Hello_Sender", - "Sender_Impl_Hello_Sender") - { - } - - SenderHome_Servant::~SenderHome_Servant (void) - { - } - - // Home operations. - - // Home supported interface operations. - - // Home factory and finder operations. - - // Home attribute operations. - } - - extern "C" SENDER_SVNT_Export ::PortableServer::Servant - createSenderHome_Servant ( - ::Components::HomeExecutorBase_ptr p, - CIAO::Swapping_Container *c - ACE_ENV_ARG_DECL) - { - if (p == 0) - { - return 0; - } - - ::Hello::CCM_SenderHome_var x = - ::Hello::CCM_SenderHome::_narrow ( - p - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - if (::CORBA::is_nil (x.in ())) - { - return 0; - } - - return new - CIAO_GLUE_Hello::SenderHome_Servant ( - x.in (), - c); - } -} - diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.no-connections b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.no-connections deleted file mode 100644 index 597f19e8b23..00000000000 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.no-connections +++ /dev/null @@ -1,274 +0,0 @@ -// $Id$ -// -// **** Code generated by the **** -// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** -// CIAO has been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// CIDL Compiler has been developed by: -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about CIAO is available at: -// http://www.dre.vanderbilt.edu/CIAO - -#ifndef CIAO_GLUE_SESSION_SENDER_SVNT_H -#define CIAO_GLUE_SESSION_SENDER_SVNT_H - -#include /**/ "ace/pre.h" - -#include "SenderEC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ciao/Container_Base.h" -#include "ciao/Swapping_Container.h" -#include "ciao/Servant_Impl_T.h" -#include "ciao/Context_Impl_T.h" -#include "ciao/Home_Servant_Impl_T.h" -#include "ciao/Swapping_Servant_Home_Impl_T.h" -#include "ace/Active_Map_Manager_T.h" - -#include "SenderS.h" - -namespace Sender_Impl -{ - namespace CIAO_GLUE_Hello - { - class Sender_Servant; - - class SENDER_SVNT_Export Sender_Context - : public virtual CIAO::Context_Impl< - ::Hello::CCM_Sender_Context, - Sender_Servant, - ::Hello::Sender, - ::Hello::Sender_var - > - { - public: - // We will allow the servant glue code we generate to access our state. - friend class Sender_Servant; - - /// Hack for VC6. - typedef CIAO::Context_Impl< - ::Hello::CCM_Sender_Context, - Sender_Servant, - ::Hello::Sender, - ::Hello::Sender_var - > ctx_svnt_base; - - Sender_Context ( - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c, - Sender_Servant *sv); - - virtual ~Sender_Context (void); - - // Operations for Sender receptacles and event sources, - // defined in ::Hello::CCM_Sender_Context. - - // CIAO-specific. - - static Sender_Context * - _narrow ( - ::Components::SessionContext_ptr p - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - protected: - // Methods that manage this component's connections and consumers. - - protected: - }; - } - - namespace CIAO_GLUE_Hello - { - class SENDER_SVNT_Export Sender_Servant - : public virtual CIAO::Servant_Impl< - POA_Hello::Sender, - ::Hello::CCM_Sender, - ::Hello::CCM_Sender_var, - Sender_Context - > - { - public: - /// Hack for VC6. - typedef CIAO::Servant_Impl< - POA_Hello::Sender, - ::Hello::CCM_Sender, - ::Hello::CCM_Sender_var, - Sender_Context - > comp_svnt_base; - - Sender_Servant ( - ::Hello::CCM_Sender_ptr executor, - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c); - - virtual ~Sender_Servant (void); - - virtual void - set_attributes ( - const ::Components::ConfigValues &descr - ACE_ENV_ARG_DECL); - - // Supported operations. - - virtual void - start ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // Public port operations. - - // Component attribute operations. - - virtual char * - local_message ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void - local_message ( - const char * - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // Operations for Receptacles interface. - - virtual ::Components::Cookie * - connect ( - const char *name, - CORBA::Object_ptr connection - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::AlreadyConnected, - ::Components::ExceededConnectionLimit)); - - virtual CORBA::Object_ptr - disconnect ( - const char *name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::CookieRequired, - ::Components::NoConnection)); - - // Operations for Events interface. - - virtual ::Components::Cookie * - subscribe ( - const char *publisher_name, - ::Components::EventConsumerBase_ptr subscriber - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::ExceededConnectionLimit)); - - virtual ::Components::EventConsumerBase_ptr - unsubscribe ( - const char *publisher_name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection)); - - virtual void - connect_consumer ( - const char *emitter_name, - ::Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)); - - // CIAO specific operations on the servant - CORBA::Object_ptr - get_facet_executor (const char *name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException)); - - private: - - private: - - void - populate_port_tables ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - }; - } - - namespace CIAO_GLUE_Hello - { - class SENDER_SVNT_Export SenderHome_Servant - : public virtual CIAO::Swapping_Servant_Home_Impl< - POA_Hello::SenderHome, - ::Hello::CCM_SenderHome, - ::Hello::CCM_SenderHome_var, - ::Hello::Sender, - ::Hello::Sender_var, - ::Hello::CCM_Sender, - ::Hello::CCM_Sender_var, - Sender_Servant - > - { - public: - /// Hack for VC6. - typedef CIAO::Swapping_Servant_Home_Impl< - POA_Hello::SenderHome, - ::Hello::CCM_SenderHome, - ::Hello::CCM_SenderHome_var, - ::Hello::Sender, - ::Hello::Sender_var, - ::Hello::CCM_Sender, - ::Hello::CCM_Sender_var, - Sender_Servant - > home_svnt_base; - - SenderHome_Servant ( - ::Hello::CCM_SenderHome_ptr exe, - ::CIAO::Swapping_Container *c); - - virtual ~SenderHome_Servant (void); - - // Home operations. - - // Home factory and finder operations. - - // Attribute operations. - }; - - extern "C" SENDER_SVNT_Export ::PortableServer::Servant - createSenderHome_Servant ( - ::Components::HomeExecutorBase_ptr p, - CIAO::Swapping_Container *c - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - } -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_GLUE_SESSION_SENDER_SVNT_H */ - diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections b/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections deleted file mode 100644 index ae87dc17a60..00000000000 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/Sender_svnt.h.with-connections +++ /dev/null @@ -1,366 +0,0 @@ -// $Id$ -// -// **** Code generated by the **** -// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** -// CIAO has been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// CIDL Compiler has been developed by: -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about CIAO is available at: -// http://www.dre.vanderbilt.edu/CIAO - -#ifndef CIAO_GLUE_SESSION_SENDER_SVNT_H -#define CIAO_GLUE_SESSION_SENDER_SVNT_H - -#include /**/ "ace/pre.h" - -#include "SenderEC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ciao/Container_Base.h" -#include "ciao/Swapping_Container.h" -#include "ciao/Servant_Impl_T.h" -#include "ciao/Context_Impl_T.h" -#include "ciao/Home_Servant_Impl_T.h" -#include "ciao/Swapping_Servant_Home_Impl_T.h" -#include "ace/Active_Map_Manager_T.h" - -#include "SenderS.h" - -namespace Sender_Impl -{ - namespace CIAO_GLUE_Hello - { - template <typename T> - class ReadMessage_Servant_T - : public virtual POA_Hello::ReadMessage, - public virtual PortableServer::RefCountServantBase - { - public: - ReadMessage_Servant_T ( - ::Hello::CCM_ReadMessage_ptr executor, - ::Components::CCMContext_ptr ctx); - - virtual ~ReadMessage_Servant_T (void); - - virtual char * - get_message ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - - // Get component implementation. - virtual CORBA::Object_ptr - _get_component ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - - protected: - // Facet executor. - ::Hello::CCM_ReadMessage_var executor_; - - // Context object. - ::Components::CCMContext_var ctx_; - }; - - typedef SENDER_SVNT_Export ReadMessage_Servant_T<int> ReadMessage_Servant; - } - - namespace CIAO_GLUE_Hello - { - class Sender_Servant; - - class SENDER_SVNT_Export Sender_Context - : public virtual CIAO::Context_Impl< - ::Hello::CCM_Sender_Context, - Sender_Servant, - ::Hello::Sender, - ::Hello::Sender_var - > - { - public: - // We will allow the servant glue code we generate to access our state. - friend class Sender_Servant; - - /// Hack for VC6. - typedef CIAO::Context_Impl< - ::Hello::CCM_Sender_Context, - Sender_Servant, - ::Hello::Sender, - ::Hello::Sender_var - > ctx_svnt_base; - - Sender_Context ( - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c, - Sender_Servant *sv); - - virtual ~Sender_Context (void); - - // Operations for Sender receptacles and event sources, - // defined in ::Hello::CCM_Sender_Context. - - virtual void - push_click_out ( - ::Hello::TimeOut *ev - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // CIAO-specific. - - static Sender_Context * - _narrow ( - ::Components::SessionContext_ptr p - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - protected: - // Methods that manage this component's connections and consumers. - - virtual ::Components::Cookie * - subscribe_click_out ( - ::Hello::TimeOutConsumer_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::ExceededConnectionLimit)); - - virtual ::Hello::TimeOutConsumer_ptr - unsubscribe_click_out ( - ::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidConnection)); - - protected: - ACE_Active_Map_Manager< - ::Hello::TimeOutConsumer_var> - ciao_publishes_click_out_map_; - }; - } - - namespace CIAO_GLUE_Hello - { - class SENDER_SVNT_Export Sender_Servant - : public virtual CIAO::Servant_Impl< - POA_Hello::Sender, - ::Hello::CCM_Sender, - ::Hello::CCM_Sender_var, - Sender_Context - > - { - public: - /// Hack for VC6. - typedef CIAO::Servant_Impl< - POA_Hello::Sender, - ::Hello::CCM_Sender, - ::Hello::CCM_Sender_var, - Sender_Context - > comp_svnt_base; - - Sender_Servant ( - ::Hello::CCM_Sender_ptr executor, - ::Components::CCMHome_ptr home, - ::CIAO::Swapping_Container *c); - - virtual ~Sender_Servant (void); - - virtual void - set_attributes ( - const ::Components::ConfigValues &descr - ACE_ENV_ARG_DECL); - - // Supported operations. - - virtual void - start ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // Public port operations. - - virtual ::Hello::ReadMessage_ptr - provide_push_message ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::Cookie * - subscribe_click_out ( - ::Hello::TimeOutConsumer_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::ExceededConnectionLimit)); - - virtual ::Hello::TimeOutConsumer_ptr - unsubscribe_click_out ( - ::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidConnection)); - - // Component attribute operations. - - virtual char * - local_message ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void - local_message ( - const char * - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // Operations for Receptacles interface. - - virtual ::Components::Cookie * - connect ( - const char *name, - CORBA::Object_ptr connection - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::AlreadyConnected, - ::Components::ExceededConnectionLimit)); - - virtual CORBA::Object_ptr - disconnect ( - const char *name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::CookieRequired, - ::Components::NoConnection)); - - // Operations for Events interface. - - virtual ::Components::Cookie * - subscribe ( - const char *publisher_name, - ::Components::EventConsumerBase_ptr subscriber - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection, - ::Components::ExceededConnectionLimit)); - - virtual ::Components::EventConsumerBase_ptr - unsubscribe ( - const char *publisher_name, - ::Components::Cookie *ck - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection)); - - virtual void - connect_consumer ( - const char *emitter_name, - ::Components::EventConsumerBase_ptr consumer - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::InvalidName, - ::Components::AlreadyConnected, - ::Components::InvalidConnection)); - - // CIAO specific operations on the servant - CORBA::Object_ptr - get_facet_executor (const char *name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException)); - - private: - - ::Hello::ReadMessage_var - provide_push_message_; - - private: - - void - populate_port_tables ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - ::CORBA::Object_ptr - provide_push_message_i ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - }; - } - - namespace CIAO_GLUE_Hello - { - class SENDER_SVNT_Export SenderHome_Servant - : public virtual CIAO::Swapping_Servant_Home_Impl< - POA_Hello::SenderHome, - ::Hello::CCM_SenderHome, - ::Hello::CCM_SenderHome_var, - ::Hello::Sender, - ::Hello::Sender_var, - ::Hello::CCM_Sender, - ::Hello::CCM_Sender_var, - Sender_Servant - > - { - public: - /// Hack for VC6. - typedef CIAO::Swapping_Servant_Home_Impl< - POA_Hello::SenderHome, - ::Hello::CCM_SenderHome, - ::Hello::CCM_SenderHome_var, - ::Hello::Sender, - ::Hello::Sender_var, - ::Hello::CCM_Sender, - ::Hello::CCM_Sender_var, - Sender_Servant - > home_svnt_base; - - SenderHome_Servant ( - ::Hello::CCM_SenderHome_ptr exe, - ::CIAO::Swapping_Container *c); - - virtual ~SenderHome_Servant (void); - - // Home operations. - - // Home factory and finder operations. - - // Attribute operations. - }; - - extern "C" SENDER_SVNT_Export ::PortableServer::Servant - createSenderHome_Servant ( - ::Components::HomeExecutorBase_ptr p, - CIAO::Swapping_Container *c - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - } -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_GLUE_SESSION_SENDER_SVNT_H */ - diff --git a/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp b/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp index abfd90aaa3e..2351d71dadc 100644 --- a/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp +++ b/TAO/CIAO/DAnCE/examples/Hello/Sender/starter.cpp @@ -7,6 +7,7 @@ const char * ior = 0; const char * message = "starters message"; + int parse_args (int argc, char *argv[]) { |