summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-28 01:07:17 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-09-28 01:07:17 +0000
commit3977ab3509584f4626ad8114703f46aada5c11da (patch)
tree311105bfd3b95bfd583fd180b831f38a7aa7614d
parent90b36bb3dc6946e0e4a910e5ee5e4faab94210c6 (diff)
downloadATCD-3977ab3509584f4626ad8114703f46aada5c11da.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.cpp874
-rw-r--r--TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.h447
-rw-r--r--TAO/CIAO/DAnCE/examples/BasicSP/BMDevice/BMDevice_svnt.cpp1240
-rw-r--r--TAO/CIAO/DAnCE/examples/BasicSP/BMDevice/BMDevice_svnt.h618
-rw-r--r--TAO/CIAO/DAnCE/examples/BasicSP/BMDisplay/BMDisplay_svnt.cpp1048
-rw-r--r--TAO/CIAO/DAnCE/examples/BasicSP/BMDisplay/BMDisplay_svnt.h569
-rw-r--r--TAO/CIAO/DAnCE/examples/BasicSP/EC/EC_svnt.cpp992
-rw-r--r--TAO/CIAO/DAnCE/examples/BasicSP/EC/EC_svnt.h539
-rw-r--r--TAO/CIAO/DAnCE/examples/EC_Benchmark/Consumer/Consumer_svnt.cpp937
-rw-r--r--TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.cpp922
-rw-r--r--TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.h514
11 files changed, 0 insertions, 8700 deletions
diff --git a/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.cpp b/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.cpp
deleted file mode 100644
index 0370b023005..00000000000
--- a/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.cpp
+++ /dev/null
@@ -1,874 +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 "BMClosedED_svnt.h"
-#include "Cookies.h"
-#include "ciao/Servant_Activator.h"
-#include "ciao/Port_Activator_T.h"
-
-namespace BMClosedED_Impl
-{
- namespace CIAO_GLUE_BasicSP
- {
- template <typename T>
- ReadData_Servant_T<T>::ReadData_Servant_T (
- ::BasicSP::CCM_ReadData_ptr executor,
- ::Components::CCMContext_ptr c)
- : executor_ (::BasicSP::CCM_ReadData::_duplicate (executor)),
- ctx_ (::Components::CCMContext::_duplicate (c))
- {
- }
-
- template <typename T>
- ReadData_Servant_T<T>::~ReadData_Servant_T (void)
- {
- }
-
- template <typename T>
- char *
- ReadData_Servant_T<T>::get_data (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return this->executor_->get_data (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- template <typename T>
- CORBA::Object_ptr
- ReadData_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_BasicSP
- {
- BMClosedED_Context::BMClosedED_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- BMClosedED_Servant *sv)
- : Context_Impl_Base (home, c),
- ctx_svnt_base (home, c, sv)
- {
- }
-
- BMClosedED_Context::~BMClosedED_Context (void)
- {
- }
-
- // Operations for BMClosedED receptacles and event sources,
- // defined in ::BasicSP::CCM_BMClosedED_Context.
-
- ::BasicSP::ReadData_ptr
- BMClosedED_Context::get_connection_datain (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return ::BasicSP::ReadData::_duplicate (
- this->ciao_uses_datain_.in ());
- }
-
- void
- BMClosedED_Context::connect_datain (
- ::BasicSP::ReadData_ptr c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::AlreadyConnected,
- ::Components::InvalidConnection))
- {
- if (!CORBA::is_nil (this->ciao_uses_datain_.in ()))
- {
- ACE_THROW (::Components::AlreadyConnected ());
- }
-
- if (CORBA::is_nil (c))
- {
- ACE_THROW (::Components::InvalidConnection ());
- }
-
- this->ciao_uses_datain_ =
- ::BasicSP::ReadData::_duplicate (c);
- }
-
- ::BasicSP::ReadData_ptr
- BMClosedED_Context::disconnect_datain (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::NoConnection))
- {
- if (CORBA::is_nil (this->ciao_uses_datain_.in ()))
- {
- ACE_THROW_RETURN (
- ::Components::NoConnection (),
- ::BasicSP::ReadData::_nil ());
- }
-
- return this->ciao_uses_datain_._retn ();
- }
-
- void
- BMClosedED_Context::push_out_avail (
- ::BasicSP::DataAvailable *ev
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_Active_Map_Manager<
- ::BasicSP::DataAvailableConsumer_var>::iterator end =
- this->ciao_publishes_out_avail_map_.end ();
-
- for (ACE_Active_Map_Manager<
- ::BasicSP::DataAvailableConsumer_var>::iterator iter =
- this->ciao_publishes_out_avail_map_.begin ();
- iter != end;
- ++iter)
- {
- ACE_Active_Map_Manager<
- ::BasicSP::DataAvailableConsumer_var>::ENTRY &entry = *iter;
-
- ::BasicSP::DataAvailableConsumer_var c =
- ::BasicSP::DataAvailableConsumer::_narrow (
- entry.int_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- entry.int_id_->push_DataAvailable (
- ev
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-
- ::Components::Cookie *
- BMClosedED_Context::subscribe_out_avail (
- ::BasicSP::DataAvailableConsumer_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);
- }
-
- ::BasicSP::DataAvailableConsumer_var sub =
- ::BasicSP::DataAvailableConsumer::_duplicate (c);
-
- ACE_Active_Map_Manager_Key key;
- this->ciao_publishes_out_avail_map_.bind (sub.in (), key);
- sub._retn ();
-
- ::Components::Cookie_var retv = new ::CIAO::Map_Key_Cookie (key);
- return retv._retn ();
- }
-
- ::BasicSP::DataAvailableConsumer_ptr
- BMClosedED_Context::unsubscribe_out_avail (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection))
- {
- ::BasicSP::DataAvailableConsumer_var retv;
- ACE_Active_Map_Manager_Key key;
-
- if (ck == 0 || ::CIAO::Map_Key_Cookie::extract (ck, key) == false)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidConnection (),
- ::BasicSP::DataAvailableConsumer::_nil ());
- }
-
- if (this->ciao_publishes_out_avail_map_.unbind (key, retv) != 0)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidConnection (),
- ::BasicSP::DataAvailableConsumer::_nil ());
- }
-
- return retv._retn ();
- }
-
- // CIAO-specific.
-
- BMClosedED_Context *
- BMClosedED_Context::_narrow (
- ::Components::SessionContext_ptr p
- ACE_ENV_ARG_DECL_NOT_USED)
- {
- return dynamic_cast<BMClosedED_Context *> (p);
- }
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- BMClosedED_Servant::BMClosedED_Servant (
- ::BasicSP::CCM_BMClosedED_ptr exe,
- ::Components::CCMHome_ptr h,
- ::CIAO::Session_Container *c)
- : Servant_Impl_Base (c),
- comp_svnt_base (exe, c)
- {
- this->context_ = new BMClosedED_Context (h, c, this);
-
- CIAO_REGISTER_OBV_FACTORY (
- ::BasicSP::DataAvailable_init,
- ::BasicSP::DataAvailable);
-
- 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;
- }
-
- BMClosedED_Servant::~BMClosedED_Servant (void)
- {
- }
-
- void
- BMClosedED_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);
- }
- }
-
- ::BasicSP::ReadData_ptr
- BMClosedED_Servant::provide_dataout (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- if (! ::CORBA::is_nil (this->provide_dataout_.in ()))
- {
- return ::BasicSP::ReadData::_duplicate (this->provide_dataout_.in ());
- }
-
- ::CORBA::Object_var obj =
- this->provide_dataout_i (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::ReadData::_nil ());
-
- ::BasicSP::ReadData_var fo =
- ::BasicSP::ReadData::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::ReadData::_nil ());
-
- this->provide_dataout_ = fo;
- return ::BasicSP::ReadData::_duplicate (this->provide_dataout_.in ());
- }
-
- ::CORBA::Object_ptr
- BMClosedED_Servant::provide_dataout_i (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_ptr ret =
- this->lookup_facet ("dataout");
-
- if (! ::CORBA::is_nil (ret))
- {
- return ret;
- }
-
- CIAO::Port_Activator_T<
- CIAO_GLUE_BasicSP::ReadData_Servant,
- ::BasicSP::CCM_ReadData,
- ::Components::CCMContext,
- BMClosedED_Servant
- > *tmp = 0;
-
- typedef CIAO::Port_Activator_T<
- CIAO_GLUE_BasicSP::ReadData_Servant,
- ::BasicSP::CCM_ReadData,
- ::Components::CCMContext,
- BMClosedED_Servant
- >
- MACRO_MADNESS_TYPEDEF;
-
- ACE_NEW_THROW_EX (
- tmp,
- MACRO_MADNESS_TYPEDEF (
- "BasicSP_BMClosedED_dataout",
- "dataout",
- CIAO::Port_Activator::Facet,
- 0,
- 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 (
- "BasicSP_BMClosedED_dataout",
- "IDL:BasicSP/ReadData:1.0",
- CIAO::Container::Facet_Consumer
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::ReadData::_nil ());
-
- this->add_facet (
- "dataout",
- obj.in ());
-
- return obj._retn ();
- }
-
- ::Components::Cookie *
- BMClosedED_Servant::subscribe_out_avail (
- ::BasicSP::DataAvailableConsumer_ptr c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit))
- {
- return this->context_->subscribe_out_avail (
- c
- ACE_ENV_ARG_PARAMETER);
- }
-
- ::BasicSP::DataAvailableConsumer_ptr
- BMClosedED_Servant::unsubscribe_out_avail (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection))
- {
- return this->context_->unsubscribe_out_avail (
- ck
- ACE_ENV_ARG_PARAMETER);
- }
-
- BMClosedED_Servant::DataAvailableConsumer_in_avail_Servant::DataAvailableConsumer_in_avail_Servant (
- ::BasicSP::CCM_BMClosedED_ptr executor,
- ::BasicSP::CCM_BMClosedED_Context_ptr c)
- : executor_ (::BasicSP::CCM_BMClosedED::_duplicate (executor)),
- ctx_ (::BasicSP::CCM_BMClosedED_Context::_duplicate (c))
- {
- }
-
- BMClosedED_Servant::DataAvailableConsumer_in_avail_Servant::~DataAvailableConsumer_in_avail_Servant (void)
- {
- }
-
- CORBA::Object_ptr
- BMClosedED_Servant::DataAvailableConsumer_in_avail_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
- BMClosedED_Servant::DataAvailableConsumer_in_avail_Servant::push_DataAvailable (
- ::BasicSP::DataAvailable *evt
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->executor_->push_in_avail (
- evt
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Inherited from ::Components::EventConsumerBase.
- void
- BMClosedED_Servant::DataAvailableConsumer_in_avail_Servant::push_event (
- ::Components::EventBase *ev
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::BadEventType))
- {
- ::BasicSP::DataAvailable_var ev_type =
- ::BasicSP::DataAvailable::_downcast (ev);
-
- if (ev_type != 0)
- {
- this->push_DataAvailable (
- ev_type.in ()
- ACE_ENV_ARG_PARAMETER);
-
- return;
- }
-
- ACE_THROW (::Components::BadEventType ());
- }
-
- ::BasicSP::DataAvailableConsumer_ptr
- BMClosedED_Servant::get_consumer_in_avail (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- if (! ::CORBA::is_nil (this->consumes_in_avail_.in ()))
- {
- return ::BasicSP::DataAvailableConsumer::_duplicate (this->consumes_in_avail_.in ());
- }
-
- ::Components::EventConsumerBase_var obj =
- this->get_consumer_in_avail_i (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::DataAvailableConsumer::_nil ());
-
- ::BasicSP::DataAvailableConsumer_var eco =
- ::BasicSP::DataAvailableConsumer::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::DataAvailableConsumer::_nil ());
-
- this->consumes_in_avail_ = eco;
- return ::BasicSP::DataAvailableConsumer::_duplicate (this->consumes_in_avail_.in ());
- }
-
- ::Components::EventConsumerBase_ptr
- BMClosedED_Servant::get_consumer_in_avail_i (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::Components::EventConsumerBase_ptr ret =
- this->lookup_consumer ("in_avail");
-
- if (! ::CORBA::is_nil (ret))
- {
- return ret;
- }
-
- CIAO::Port_Activator_T<
- BMClosedED_Servant::DataAvailableConsumer_in_avail_Servant,
- ::BasicSP::CCM_BMClosedED,
- ::BasicSP::CCM_BMClosedED_Context,
- BMClosedED_Servant > *tmp = 0;
-
- typedef CIAO::Port_Activator_T<
- BMClosedED_Servant::DataAvailableConsumer_in_avail_Servant,
- ::BasicSP::CCM_BMClosedED,
- ::BasicSP::CCM_BMClosedED_Context,
- BMClosedED_Servant >
- MACRO_MADNESS_TYPEDEF;
-
-
- ACE_NEW_THROW_EX (
- tmp,
- MACRO_MADNESS_TYPEDEF (
- "BasicSP_BMClosedED_in_avail",
- "in_avail",
- 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 (
- "BasicSP_BMClosedED_in_avail",
- "IDL:BasicSP/DataAvailableConsumer:1.0",
- CIAO::Container::Facet_Consumer
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::DataAvailableConsumer::_nil ());
-
- ::Components::EventConsumerBase_var ecb =
- ::Components::EventConsumerBase::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::DataAvailableConsumer::_nil ());
-
- this->add_consumer (
- "in_avail",
- ecb.in ());
-
- return ecb._retn ();
- }
-
- ::Components::Cookie *
- BMClosedED_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, "datain") == 0)
- {
- ::BasicSP::ReadData_var _ciao_conn =
- ::BasicSP::ReadData::_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_datain (
- _ciao_conn.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return 0;
- }
-
- ACE_THROW_RETURN (::Components::InvalidName (), 0);
- }
-
- CORBA::Object_ptr
- BMClosedED_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, "datain") == 0)
- {
- // Simplex disconnect.
- return this->disconnect_datain (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::CORBA::Object::_nil ());
-
- ACE_UNUSED_ARG (ck);
- }
-
- void
- BMClosedED_Servant::connect_datain (
- ::BasicSP::ReadData_ptr c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::AlreadyConnected,
- ::Components::InvalidConnection))
- {
- this->context_->connect_datain (
- c
- ACE_ENV_ARG_PARAMETER);
- }
-
- ::BasicSP::ReadData_ptr
- BMClosedED_Servant::disconnect_datain (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::NoConnection))
- {
- return this->context_->disconnect_datain (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ::BasicSP::ReadData_ptr
- BMClosedED_Servant::get_connection_datain (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return this->context_->get_connection_datain (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- void
- BMClosedED_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 *
- BMClosedED_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, "out_avail") == 0)
- {
- ::BasicSP::DataAvailableConsumer_var _ciao_consumer =
- ::BasicSP::DataAvailableConsumer::_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_out_avail (
- _ciao_consumer.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (::Components::InvalidName (), 0);
- }
-
- ::Components::EventConsumerBase_ptr
- BMClosedED_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, "out_avail") == 0)
- {
- return this->unsubscribe_out_avail (
- ck
- ACE_ENV_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- CORBA::Object_ptr
- BMClosedED_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, "dataout") == 0)
- {
- return this->executor_->get_dataout (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- return CORBA::Object::_nil ();
- }
-
- // Supported operations.
-
- // Component attribute operations.
-
- // Private method to populate the port tables.
- void
- BMClosedED_Servant::populate_port_tables (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var obj_var;
- ::Components::EventConsumerBase_var ecb_var;
-
- obj_var =
- this->provide_dataout_i (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ecb_var =
- this->get_consumer_in_avail_i (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- BMClosedEDHome_Servant::BMClosedEDHome_Servant (
- ::BasicSP::CCM_BMClosedEDHome_ptr exe,
- ::CIAO::Session_Container *c)
- : CIAO::Home_Servant_Impl_Base (c),
- home_svnt_base (exe, c)
- {
- }
-
- BMClosedEDHome_Servant::~BMClosedEDHome_Servant (void)
- {
- }
-
- // Home operations.
-
- // Home supported interface operations.
-
- // Home factory and finder operations.
-
- // Home attribute operations.
- }
-
- extern "C" BMCLOSEDED_SVNT_Export ::PortableServer::Servant
- createBMClosedEDHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL)
- {
- if (p == 0)
- {
- return 0;
- }
-
- ::BasicSP::CCM_BMClosedEDHome_var x =
- ::BasicSP::CCM_BMClosedEDHome::_narrow (
- p
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (::CORBA::is_nil (x.in ()))
- {
- return 0;
- }
-
- return new
- CIAO_GLUE_BasicSP::BMClosedEDHome_Servant (
- x.in (),
- c);
- }
-}
-
diff --git a/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.h b/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.h
deleted file mode 100644
index e88c33f8c63..00000000000
--- a/TAO/CIAO/DAnCE/examples/BasicSP/BMClosedED/BMClosedED_svnt.h
+++ /dev/null
@@ -1,447 +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_BMCLOSEDED_SVNT_H
-#define CIAO_GLUE_SESSION_BMCLOSEDED_SVNT_H
-
-#include /**/ "ace/pre.h"
-
-#include "BMClosedEDEC.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ciao/Container_Base.h"
-#include "ciao/Servant_Impl_T.h"
-#include "ciao/Context_Impl_T.h"
-#include "ciao/Home_Servant_Impl_T.h"
-#include "ace/Active_Map_Manager_T.h"
-
-#include "../BasicSPS.h"
-#include "BMClosedEDS.h"
-
-namespace BMClosedED_Impl
-{
- namespace CIAO_GLUE_BasicSP
- {
- template <typename T>
- class ReadData_Servant_T
- : public virtual POA_BasicSP::ReadData,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- ReadData_Servant_T (
- ::BasicSP::CCM_ReadData_ptr executor,
- ::Components::CCMContext_ptr ctx);
-
- virtual ~ReadData_Servant_T (void);
-
- virtual char *
- get_data (
- 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.
- ::BasicSP::CCM_ReadData_var executor_;
-
- // Context object.
- ::Components::CCMContext_var ctx_;
- };
-
- typedef BMCLOSEDED_SVNT_Export ReadData_Servant_T<int> ReadData_Servant;
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- class BMClosedED_Servant;
-
- class BMCLOSEDED_SVNT_Export BMClosedED_Context
- : public virtual CIAO::Context_Impl<
- ::BasicSP::CCM_BMClosedED_Context,
- BMClosedED_Servant,
- ::BasicSP::BMClosedED,
- ::BasicSP::BMClosedED_var
- >
- {
- public:
- // We will allow the servant glue code we generate to access our state.
- friend class BMClosedED_Servant;
-
- /// Hack for VC6.
- typedef CIAO::Context_Impl<
- ::BasicSP::CCM_BMClosedED_Context,
- BMClosedED_Servant,
- ::BasicSP::BMClosedED,
- ::BasicSP::BMClosedED_var
- > ctx_svnt_base;
-
- BMClosedED_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- BMClosedED_Servant *sv);
-
- virtual ~BMClosedED_Context (void);
-
- // Operations for BMClosedED receptacles and event sources,
- // defined in ::BasicSP::CCM_BMClosedED_Context.
-
- virtual ::BasicSP::ReadData_ptr
- get_connection_datain (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- push_out_avail (
- ::BasicSP::DataAvailable *ev
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // CIAO-specific.
-
- static BMClosedED_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_datain (
- ::BasicSP::ReadData_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::AlreadyConnected,
- ::Components::InvalidConnection));
-
- virtual ::BasicSP::ReadData_ptr
- disconnect_datain (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::NoConnection));
-
- virtual ::Components::Cookie *
- subscribe_out_avail (
- ::BasicSP::DataAvailableConsumer_ptr c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit));
-
- virtual ::BasicSP::DataAvailableConsumer_ptr
- unsubscribe_out_avail (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection));
-
- protected:
- // Simplex datain connection.
- ::BasicSP::ReadData_var
- ciao_uses_datain_;
-
- ACE_Active_Map_Manager<
- ::BasicSP::DataAvailableConsumer_var>
- ciao_publishes_out_avail_map_;
- };
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- class BMCLOSEDED_SVNT_Export BMClosedED_Servant
- : public virtual CIAO::Servant_Impl<
- POA_BasicSP::BMClosedED,
- ::BasicSP::CCM_BMClosedED,
- ::BasicSP::CCM_BMClosedED_var,
- BMClosedED_Context
- >
- {
- public:
- /// Hack for VC6.
- typedef CIAO::Servant_Impl<
- POA_BasicSP::BMClosedED,
- ::BasicSP::CCM_BMClosedED,
- ::BasicSP::CCM_BMClosedED_var,
- BMClosedED_Context
- > comp_svnt_base;
-
- BMClosedED_Servant (
- ::BasicSP::CCM_BMClosedED_ptr executor,
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c);
-
- virtual ~BMClosedED_Servant (void);
-
- virtual void
- set_attributes (
- const ::Components::ConfigValues &descr
- ACE_ENV_ARG_DECL);
-
- // Supported operations.
-
- // Public port operations.
-
- virtual ::BasicSP::ReadData_ptr
- provide_dataout (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- connect_datain (
- ::BasicSP::ReadData_ptr c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::AlreadyConnected,
- ::Components::InvalidConnection));
-
- virtual ::BasicSP::ReadData_ptr
- disconnect_datain (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::NoConnection));
-
- virtual ::BasicSP::ReadData_ptr
- get_connection_datain (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::Cookie *
- subscribe_out_avail (
- ::BasicSP::DataAvailableConsumer_ptr c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit));
-
- virtual ::BasicSP::DataAvailableConsumer_ptr
- unsubscribe_out_avail (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection));
-
- // Servant class for the in_avail consumer.
- class BMCLOSEDED_SVNT_Export DataAvailableConsumer_in_avail_Servant
- : public virtual POA_BasicSP::DataAvailableConsumer,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- DataAvailableConsumer_in_avail_Servant (
- ::BasicSP::CCM_BMClosedED_ptr executor,
- ::BasicSP::CCM_BMClosedED_Context_ptr c);
-
- virtual ~DataAvailableConsumer_in_avail_Servant (void);
-
- virtual void
- push_DataAvailable (
- ::BasicSP::DataAvailable *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:
- ::BasicSP::CCM_BMClosedED_var
- executor_;
-
- ::BasicSP::CCM_BMClosedED_Context_var
- ctx_;
- };
-
- virtual ::BasicSP::DataAvailableConsumer_ptr
- get_consumer_in_avail (
- 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:
-
- ::BasicSP::ReadData_var
- provide_dataout_;
-
- ::BasicSP::DataAvailableConsumer_var
- consumes_in_avail_;
-
- private:
-
- void
- populate_port_tables (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- ::CORBA::Object_ptr
- provide_dataout_i (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- ::Components::EventConsumerBase_ptr
- get_consumer_in_avail_i (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- };
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- class BMCLOSEDED_SVNT_Export BMClosedEDHome_Servant
- : public virtual CIAO::Home_Servant_Impl<
- POA_BasicSP::BMClosedEDHome,
- ::BasicSP::CCM_BMClosedEDHome,
- ::BasicSP::CCM_BMClosedEDHome_var,
- ::BasicSP::BMClosedED,
- ::BasicSP::BMClosedED_var,
- ::BasicSP::CCM_BMClosedED,
- ::BasicSP::CCM_BMClosedED_var,
- BMClosedED_Servant
- >
- {
- public:
- /// Hack for VC6.
- typedef CIAO::Home_Servant_Impl<
- POA_BasicSP::BMClosedEDHome,
- ::BasicSP::CCM_BMClosedEDHome,
- ::BasicSP::CCM_BMClosedEDHome_var,
- ::BasicSP::BMClosedED,
- ::BasicSP::BMClosedED_var,
- ::BasicSP::CCM_BMClosedED,
- ::BasicSP::CCM_BMClosedED_var,
- BMClosedED_Servant
- > home_svnt_base;
-
- BMClosedEDHome_Servant (
- ::BasicSP::CCM_BMClosedEDHome_ptr exe,
- ::CIAO::Session_Container *c);
-
- virtual ~BMClosedEDHome_Servant (void);
-
- // Home operations.
-
- // Home factory and finder operations.
-
- // Attribute operations.
- };
-
- extern "C" BMCLOSEDED_SVNT_Export ::PortableServer::Servant
- createBMClosedEDHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- }
-}
-
-#include /**/ "ace/post.h"
-
-#endif /* CIAO_GLUE_SESSION_BMCLOSEDED_SVNT_H */
-
diff --git a/TAO/CIAO/DAnCE/examples/BasicSP/BMDevice/BMDevice_svnt.cpp b/TAO/CIAO/DAnCE/examples/BasicSP/BMDevice/BMDevice_svnt.cpp
deleted file mode 100644
index 527fc86d5f7..00000000000
--- a/TAO/CIAO/DAnCE/examples/BasicSP/BMDevice/BMDevice_svnt.cpp
+++ /dev/null
@@ -1,1240 +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 "BMDevice_svnt.h"
-#include "Cookies.h"
-#include "ciao/Servant_Activator.h"
-#include "ciao/Port_Activator_T.h"
-
-namespace BMDevice_Impl
-{
- namespace CIAO_GLUE_BasicSP
- {
- template <typename T>
- ReadData_Servant_T<T>::ReadData_Servant_T (
- ::BasicSP::CCM_ReadData_ptr executor,
- ::Components::CCMContext_ptr c)
- : executor_ (::BasicSP::CCM_ReadData::_duplicate (executor)),
- ctx_ (::Components::CCMContext::_duplicate (c))
- {
- }
-
- template <typename T>
- ReadData_Servant_T<T>::~ReadData_Servant_T (void)
- {
- }
-
- template <typename T>
- char *
- ReadData_Servant_T<T>::get_data (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return this->executor_->get_data (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- template <typename T>
- CORBA::Object_ptr
- ReadData_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_BasicSP
- {
- BMDevice_Context::BMDevice_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- BMDevice_Servant *sv)
- : home_ (::Components::CCMHome::_duplicate (home)),
- container_ (c),
- servant_ (sv)
- {
- }
-
- BMDevice_Context::~BMDevice_Context (void)
- {
- }
-
- // Operations from ::Components::CCMContext.
-
- ::Components::Principal_ptr
- BMDevice_Context::get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Principal::_nil ());
- }
-
- ::Components::CCMHome_ptr
- BMDevice_Context::get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return ::Components::CCMHome::_duplicate (this->home_.in ());
- }
-
- CORBA::Boolean
- BMDevice_Context::get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Transaction::UserTransaction_ptr
- BMDevice_Context::get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Transaction::UserTransaction::_nil ());
- }
-
- CORBA::Boolean
- BMDevice_Context::is_caller_in_role (
- const char * /* role */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- void
- BMDevice_Context::set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW (CORBA::NO_IMPLEMENT ());
- }
-
- // Operations from ::Components::SessionContextinterface.
-
- CORBA::Object_ptr
- BMDevice_Context::get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- if (CORBA::is_nil (this->component_.in ()))
- {
- CORBA::Object_var obj =
- this->container_->get_objref (
- this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- this->component_ =
- ::BasicSP::BMDevice::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- if (CORBA::is_nil (this->component_.in ()))
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::CORBA::Object::_nil ());
- }
- }
-
- return ::BasicSP::BMDevice::_duplicate (
- this->component_.in ());
- }
-
- // Operations for BMDevice receptacles and event sources,
- // defined in ::BasicSP::CCM_BMDevice_Context.
-
- void
- BMDevice_Context::push_data_available (
- ::BasicSP::DataAvailable *ev
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_CString my_uuid = this->servant_->component_UUID (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- my_uuid += "_data_available_publisher";
-
- this->container_->push_event (ev,
- my_uuid.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- /*
- ACE_Active_Map_Manager<
- ::BasicSP::DataAvailableConsumer_var>::iterator end =
- this->ciao_publishes_data_available_map_.end ();
-
- for (ACE_Active_Map_Manager<
- ::BasicSP::DataAvailableConsumer_var>::iterator iter =
- this->ciao_publishes_data_available_map_.begin ();
- iter != end;
- ++iter)
- {
- ACE_Active_Map_Manager<
- ::BasicSP::DataAvailableConsumer_var>::ENTRY &entry = *iter;
-
- ::BasicSP::DataAvailableConsumer_var c =
- ::BasicSP::DataAvailableConsumer::_narrow (
- entry.int_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- entry.int_id_->push_DataAvailable (
- ev
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- */
- }
-
- ::Components::Cookie *
- BMDevice_Context::subscribe_data_available (
- ::BasicSP::DataAvailableConsumer_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);
- }
-
- ::BasicSP::DataAvailableConsumer_var sub =
- ::BasicSP::DataAvailableConsumer::_duplicate (c);
-
- ACE_Active_Map_Manager_Key key;
- this->ciao_publishes_data_available_map_.bind (sub.in (), key);
- sub._retn ();
-
- ::Components::Cookie_var retv = new ::CIAO::Map_Key_Cookie (key);
- return retv._retn ();
- }
-
- ::BasicSP::DataAvailableConsumer_ptr
- BMDevice_Context::unsubscribe_data_available (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection))
- {
- ::BasicSP::DataAvailableConsumer_var retv;
- ACE_Active_Map_Manager_Key key;
-
- if (ck == 0 || ::CIAO::Map_Key_Cookie::extract (ck, key) == false)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidConnection (),
- ::BasicSP::DataAvailableConsumer::_nil ());
- }
-
- if (this->ciao_publishes_data_available_map_.unbind (key, retv) != 0)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidConnection (),
- ::BasicSP::DataAvailableConsumer::_nil ());
- }
-
- return retv._retn ();
- }
-
- // CIAO-specific.
-
- ::CIAO::Session_Container *
- BMDevice_Context::_ciao_the_Container (void) const
- {
- return this->container_;
- }
-
- BMDevice_Context *
- BMDevice_Context::_narrow (
- ::Components::SessionContext_ptr p
- ACE_ENV_ARG_DECL_NOT_USED)
- {
- return dynamic_cast<BMDevice_Context *> (p);
- }
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- BMDevice_Servant::BMDevice_Servant (
- ::BasicSP::CCM_BMDevice_ptr exe,
- ::Components::CCMHome_ptr h,
- ::CIAO::Session_Container *c)
- : our_base (exe, c)
- {
- this->context_ = new BMDevice_Context (h, c, this);
-
- CIAO_REGISTER_OBV_FACTORY (
- ::BasicSP::TimeOut_init,
- ::BasicSP::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;
- }
-
- BMDevice_Servant::~BMDevice_Servant (void)
- {
- }
-
- void
- BMDevice_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);
- }
- }
-
- ::BasicSP::ReadData_ptr
- BMDevice_Servant::provide_data_read (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- if (! ::CORBA::is_nil (this->provide_data_read_.in ()))
- {
- return ::BasicSP::ReadData::_duplicate (this->provide_data_read_.in ());
- }
-
- ::CORBA::Object_var obj =
- this->provide_data_read_i (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::ReadData::_nil ());
-
- ::BasicSP::ReadData_var fo =
- ::BasicSP::ReadData::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::ReadData::_nil ());
-
- this->provide_data_read_ = fo;
- return ::BasicSP::ReadData::_duplicate (this->provide_data_read_.in ());
- }
-
- ::CORBA::Object_ptr
- BMDevice_Servant::provide_data_read_i (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_ptr ret =
- this->lookup_facet ("data_read");
-
- if (! ::CORBA::is_nil (ret))
- {
- return ret;
- }
-
- CIAO::Port_Activator_T< CIAO_GLUE_BasicSP::ReadData_Servant,
- ::BasicSP::CCM_ReadData,
- ::Components::CCMContext,
- BMDevice_Servant > *tmp = 0;
-
- typedef CIAO::Port_Activator_T<
- CIAO_GLUE_BasicSP::ReadData_Servant,
- ::BasicSP::CCM_ReadData,
- ::Components::CCMContext,
- BMDevice_Servant >
- MACRO_MADNESS_TYPEDEF;
-
-
- ACE_NEW_THROW_EX (
- tmp,
- MACRO_MADNESS_TYPEDEF (
- "BasicSP_BMDevice_data_read",
- "data_read",
- CIAO::Port_Activator::Facet,
- 0,
- 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 (
- "BasicSP_BMDevice_data_read",
- "IDL:BasicSP/ReadData:1.0",
- CIAO::Container::Facet_Consumer
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::ReadData::_nil ());
-
- this->add_facet (
- "data_read",
- obj.in ());
-
- return obj._retn ();
- }
-
- // Operations for Navigation interface.
-
- CORBA::Object_ptr
- BMDevice_Servant::provide_facet (
- const char *name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (name == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::BAD_PARAM (),
- ::CORBA::Object::_nil ());
- }
-
- if (ACE_OS::strcmp (name, "data_read") == 0)
- {
- return this->provide_data_read (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::CORBA::Object::_nil ());
- }
-
- ::Components::FacetDescriptions *
- BMDevice_Servant::get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- BMDevice_Servant::get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- BMDevice_Servant::get_named_emitters (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Cookie *
- BMDevice_Servant::subscribe_data_available (
- ::BasicSP::DataAvailableConsumer_ptr c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit))
- {
- return this->context_->subscribe_data_available (
- c
- ACE_ENV_ARG_PARAMETER);
- }
-
- ::BasicSP::DataAvailableConsumer_ptr
- BMDevice_Servant::unsubscribe_data_available (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection))
- {
- return this->context_->unsubscribe_data_available (
- ck
- ACE_ENV_ARG_PARAMETER);
- }
-
- BMDevice_Servant::TimeOutConsumer_timeout_Servant::TimeOutConsumer_timeout_Servant (
- ::BasicSP::CCM_BMDevice_ptr executor,
- ::BasicSP::CCM_BMDevice_Context_ptr c)
- : executor_ (::BasicSP::CCM_BMDevice::_duplicate (executor)),
- ctx_ (::BasicSP::CCM_BMDevice_Context::_duplicate (c))
- {
- }
-
- BMDevice_Servant::TimeOutConsumer_timeout_Servant::~TimeOutConsumer_timeout_Servant (void)
- {
- }
-
- CORBA::Object_ptr
- BMDevice_Servant::TimeOutConsumer_timeout_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
- BMDevice_Servant::TimeOutConsumer_timeout_Servant::push_TimeOut (
- ::BasicSP::TimeOut *evt
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->executor_->push_timeout (
- evt
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Inherited from ::Components::EventConsumerBase.
- void
- BMDevice_Servant::TimeOutConsumer_timeout_Servant::push_event (
- ::Components::EventBase *ev
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::BadEventType))
- {
- ::BasicSP::TimeOut_var ev_type =
- ::BasicSP::TimeOut::_downcast (ev);
-
- if (ev_type != 0)
- {
- this->push_TimeOut (
- ev_type.in ()
- ACE_ENV_ARG_PARAMETER);
-
- return;
- }
-
- ACE_THROW (::Components::BadEventType ());
- }
-
- ::BasicSP::TimeOutConsumer_ptr
- BMDevice_Servant::get_consumer_timeout (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- if (! ::CORBA::is_nil (this->consumes_timeout_.in ()))
- {
- return ::BasicSP::TimeOutConsumer::_duplicate (this->consumes_timeout_.in ());
- }
-
- ::Components::EventConsumerBase_var obj =
- this->get_consumer_timeout_i (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::TimeOutConsumer::_nil ());
-
- ::BasicSP::TimeOutConsumer_var eco =
- ::BasicSP::TimeOutConsumer::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::TimeOutConsumer::_nil ());
-
- this->consumes_timeout_ = eco;
- return ::BasicSP::TimeOutConsumer::_duplicate (this->consumes_timeout_.in ());
- }
-
- ::Components::EventConsumerBase_ptr
- BMDevice_Servant::get_consumer_timeout_i (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::Components::EventConsumerBase_ptr ret =
- this->lookup_consumer ("timeout");
-
- if (! ::CORBA::is_nil (ret))
- {
- return ret;
- }
-
- CIAO::Port_Activator_T<
- BMDevice_Servant::TimeOutConsumer_timeout_Servant,
- ::BasicSP::CCM_BMDevice,
- ::BasicSP::CCM_BMDevice_Context,
- BMDevice_Servant > *tmp = 0;
-
- typedef CIAO::Port_Activator_T<
- BMDevice_Servant::TimeOutConsumer_timeout_Servant,
- ::BasicSP::CCM_BMDevice,
- ::BasicSP::CCM_BMDevice_Context,
- BMDevice_Servant >
- MACRO_MADNESS_TYPEDEF;
-
-
- ACE_NEW_THROW_EX (
- tmp,
- MACRO_MADNESS_TYPEDEF (
- "BasicSP_BMDevice_timeout",
- "timeout",
- 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 (
- "BasicSP_BMDevice_timeout",
- "IDL:BasicSP/TimeOutConsumer:1.0",
- CIAO::Container::Facet_Consumer
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::TimeOutConsumer::_nil ());
-
- ::Components::EventConsumerBase_var ecb =
- ::Components::EventConsumerBase::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::TimeOutConsumer::_nil ());
-
- this->add_consumer (
- "timeout",
- ecb.in ());
-
- return ecb._retn ();
- }
-
- ::Components::Cookie *
- BMDevice_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
- BMDevice_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);
- }
-
- ::Components::ConnectionDescriptions *
- BMDevice_Servant::get_connections (
- const char * /* name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- BMDevice_Servant::get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- BMDevice_Servant::get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EventConsumerBase_ptr
- BMDevice_Servant::get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (sink_name == 0)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- if (ACE_OS::strcmp (sink_name, "timeout") == 0)
- {
- return this->get_consumer_timeout (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- void
- BMDevice_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::EventConsumerBase_ptr
- BMDevice_Servant::disconnect_consumer (
- const char * /* source_name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ConsumerDescriptions *
- BMDevice_Servant::get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Cookie *
- BMDevice_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, "data_available") == 0)
- {
- ::BasicSP::DataAvailableConsumer_var _ciao_consumer =
- ::BasicSP::DataAvailableConsumer::_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_data_available (
- _ciao_consumer.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (::Components::InvalidName (), 0);
- }
-
- ::Components::EventConsumerBase_ptr
- BMDevice_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, "data_available") == 0)
- {
- return this->unsubscribe_data_available (
- ck
- ACE_ENV_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- ::Components::PublisherDescriptions *
- BMDevice_Servant::get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::PublisherDescriptions *
- BMDevice_Servant::get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- // Operations for CCMObject interface.
-
- void
- BMDevice_Servant::component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->component_UUID_ = new_component_UUID;
- }
-
- CIAO::CONNECTION_ID
- BMDevice_Servant::component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::string_dup (this->component_UUID_.c_str ());
- }
-
- CORBA::IRObject_ptr
- BMDevice_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- BMDevice_Servant::configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration))
- {
- // CIAO to-do
- }
-
- void
- BMDevice_Servant::remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- // CIAO to-do
- }
-
- CORBA::Object_ptr
- BMDevice_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, "data_read") == 0)
- {
- return this->executor_->get_data_read (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- return CORBA::Object::_nil ();
- }
-
- // Supported operations.
-
- // Component attribute operations.
-
- // Private method to populate the port tables.
- void
- BMDevice_Servant::populate_port_tables (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var obj_var;
- ::Components::EventConsumerBase_var ecb_var;
-
- obj_var =
- this->provide_data_read_i (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- ecb_var =
- this->get_consumer_timeout_i (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- BMDeviceHome_Servant::BMDeviceHome_Servant (
- ::BasicSP::CCM_BMDeviceHome_ptr exe,
- ::CIAO::Session_Container *c)
- : executor_ (::BasicSP::CCM_BMDeviceHome::_duplicate (exe)),
- container_ (c)
- {
- }
-
- BMDeviceHome_Servant::~BMDeviceHome_Servant (void)
- {
- }
-
- // Home operations.
-
- // Home supported interface operations.
-
- // Home factory and finder operations.
-
- // Home attribute operations.
-
- // Operations for keyless home interface.
-
- ::Components::CCMObject_ptr
- BMDeviceHome_Servant::create_component (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- return this->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- // Operations for implicit home interface.
-
- ::BasicSP::BMDevice_ptr
- BMDeviceHome_Servant::create (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- if (this->executor_.in () == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::BasicSP::BMDevice::_nil ());
- }
-
- ::Components::EnterpriseComponent_var _ciao_ec =
- this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDevice::_nil ());
-
- ::BasicSP::CCM_BMDevice_var _ciao_comp =
- ::BasicSP::CCM_BMDevice::_narrow (
- _ciao_ec.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDevice::_nil ());
-
- return this->_ciao_activate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Operations for CCMHome interface.
-
- ::CORBA::IRObject_ptr
- BMDeviceHome_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- ::CORBA::IRObject_ptr
- BMDeviceHome_Servant::get_home_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- BMDeviceHome_Servant::remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- ::BasicSP::BMDevice_var _ciao_comp =
- ::BasicSP::BMDevice::_narrow (
- comp
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (_ciao_comp.in ()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- _ciao_comp->remove (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->_ciao_passivate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // CIAO-specific operations.
-
- ::BasicSP::BMDevice_ptr
- BMDeviceHome_Servant::_ciao_activate_component (
- ::BasicSP::CCM_BMDevice_ptr exe
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var hobj =
- this->container_->get_objref (
- this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDevice::_nil ());
-
- ::Components::CCMHome_var home =
- ::Components::CCMHome::_narrow (
- hobj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDevice::_nil ());
-
- BMDevice_Servant *svt =
- new BMDevice_Servant (
- exe,
- home.in (),
- this->container_);
-
- PortableServer::ServantBase_var safe (svt);
- PortableServer::ObjectId_var oid;
-
- CORBA::Object_var objref =
- this->container_->install_component (
- svt,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDevice::_nil ());
-
- ::BasicSP::BMDevice_var ho =
- ::BasicSP::BMDevice::_narrow (
- objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDevice::_nil ());
-
- if (this->component_map_.bind (oid.in (), svt) == 0)
- {
- safe._retn ();
- }
-
- return ho._retn ();
- }
-
- void
- BMDeviceHome_Servant::_ciao_passivate_component (
- ::BasicSP::BMDevice_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- PortableServer::ObjectId_var oid;
-
- this->container_->uninstall_component (
- comp,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- BMDevice_Servant *servant = 0;
-
- if (this->component_map_.unbind (oid.in (), servant) == 0)
- {
- PortableServer::ServantBase_var safe (servant);
-
- servant->_ciao_passivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
- }
-
- extern "C" BMDEVICE_SVNT_Export ::PortableServer::Servant
- createBMDeviceHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL)
- {
- if (p == 0)
- {
- return 0;
- }
-
- ::BasicSP::CCM_BMDeviceHome_var x =
- ::BasicSP::CCM_BMDeviceHome::_narrow (
- p
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (::CORBA::is_nil (x.in ()))
- {
- return 0;
- }
-
- return new
- CIAO_GLUE_BasicSP::BMDeviceHome_Servant (
- x.in (),
- c);
- }
-}
-
diff --git a/TAO/CIAO/DAnCE/examples/BasicSP/BMDevice/BMDevice_svnt.h b/TAO/CIAO/DAnCE/examples/BasicSP/BMDevice/BMDevice_svnt.h
deleted file mode 100644
index c5c3e2f506e..00000000000
--- a/TAO/CIAO/DAnCE/examples/BasicSP/BMDevice/BMDevice_svnt.h
+++ /dev/null
@@ -1,618 +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_BMDEVICE_SVNT_H
-#define CIAO_GLUE_SESSION_BMDEVICE_SVNT_H
-
-#include /**/ "ace/pre.h"
-
-#include "BMDeviceEC.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ciao/Container_Base.h"
-#include "ciao/Servant_Impl_T.h"
-#include "tao/LocalObject.h"
-#include "tao/PortableServer/Key_Adapters.h"
-#include "ace/Active_Map_Manager_T.h"
-
-#include "../BasicSPS.h"
-#include "BMDeviceS.h"
-
-namespace BMDevice_Impl
-{
- namespace CIAO_GLUE_BasicSP
- {
- template <typename T>
- class ReadData_Servant_T
- : public virtual POA_BasicSP::ReadData,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- ReadData_Servant_T (
- ::BasicSP::CCM_ReadData_ptr executor,
- ::Components::CCMContext_ptr ctx);
-
- virtual ~ReadData_Servant_T (void);
-
- virtual char *
- get_data (
- 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.
- ::BasicSP::CCM_ReadData_var executor_;
-
- // Context object.
- ::Components::CCMContext_var ctx_;
- };
-
- typedef BMDEVICE_SVNT_Export ReadData_Servant_T<int> ReadData_Servant;
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- class BMDEVICE_SVNT_Export BMDevice_Context
- : public virtual ::BasicSP::CCM_BMDevice_Context,
- public virtual TAO_Local_RefCounted_Object
- {
- public:
- // We will allow the servant glue code we generate to access our state.
- friend class BMDevice_Servant;
-
- BMDevice_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- BMDevice_Servant *sv);
-
- virtual ~BMDevice_Context (void);
-
- // Operations from ::Components::CCMContext.
-
- virtual ::Components::Principal_ptr
- get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::CCMHome_ptr
- get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Boolean
- get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- virtual ::Components::Transaction::UserTransaction_ptr
- get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- virtual CORBA::Boolean
- is_caller_in_role (
- const char *role
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- // Operations from ::Components::SessionContext interface.
-
- virtual CORBA::Object_ptr
- get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- // Operations for BMDevice receptacles and event sources,
- // defined in ::BasicSP::CCM_BMDevice_Context.
-
- virtual void
- push_data_available (
- ::BasicSP::DataAvailable *ev
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // CIAO-specific.
-
- ::CIAO::Session_Container *
- _ciao_the_Container (void) const;
-
- static BMDevice_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_data_available (
- ::BasicSP::DataAvailableConsumer_ptr c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit));
-
- virtual ::BasicSP::DataAvailableConsumer_ptr
- unsubscribe_data_available (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection));
-
- protected:
- ACE_Active_Map_Manager<
- ::BasicSP::DataAvailableConsumer_var>
- ciao_publishes_data_available_map_;
-
- ::Components::CCMHome_var home_;
- ::CIAO::Session_Container *container_;
-
- BMDevice_Servant *servant_;
- ::BasicSP::BMDevice_var component_;
- };
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- class BMDEVICE_SVNT_Export BMDevice_Servant
- : public virtual CIAO::Servant_Impl<
- POA_BasicSP::BMDevice,
- ::BasicSP::CCM_BMDevice,
- ::BasicSP::CCM_BMDevice_var,
- BMDevice_Context
- >,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- /// Hack for VC6 the most sucky compiler
- typedef CIAO::Servant_Impl<
- POA_BasicSP::BMDevice,
- ::BasicSP::CCM_BMDevice,
- ::BasicSP::CCM_BMDevice_var,
- BMDevice_Context
- > our_base;
-
- BMDevice_Servant (
- ::BasicSP::CCM_BMDevice_ptr executor,
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c);
-
- virtual ~BMDevice_Servant (void);
-
- virtual void
- set_attributes (
- const ::Components::ConfigValues &descr
- ACE_ENV_ARG_DECL);
-
- // Supported operations.
-
- // Public port operations.
-
- virtual ::BasicSP::ReadData_ptr
- provide_data_read (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::Cookie *
- subscribe_data_available (
- ::BasicSP::DataAvailableConsumer_ptr c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit));
-
- virtual ::BasicSP::DataAvailableConsumer_ptr
- unsubscribe_data_available (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection));
-
- // Servant class for the timeout consumer.
- class BMDEVICE_SVNT_Export TimeOutConsumer_timeout_Servant
- : public virtual POA_BasicSP::TimeOutConsumer,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- TimeOutConsumer_timeout_Servant (
- ::BasicSP::CCM_BMDevice_ptr executor,
- ::BasicSP::CCM_BMDevice_Context_ptr c);
-
- virtual ~TimeOutConsumer_timeout_Servant (void);
-
- virtual void
- push_TimeOut (
- ::BasicSP::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:
- ::BasicSP::CCM_BMDevice_var
- executor_;
-
- ::BasicSP::CCM_BMDevice_Context_var
- ctx_;
- };
-
- virtual ::BasicSP::TimeOutConsumer_ptr
- get_consumer_timeout (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // Component attribute operations.
-
- // Operations for Navigation interface.
-
- virtual CORBA::Object_ptr
- provide_facet (
- const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::FacetDescriptions *
- get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // 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));
-
- virtual ::Components::ConnectionDescriptions *
- get_connections (
- const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::ReceptacleDescriptions *
- get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::ReceptacleDescriptions *
- get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // Operations for Events interface.
-
- virtual ::Components::EventConsumerBase_ptr
- get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- 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));
-
- virtual ::Components::EventConsumerBase_ptr
- disconnect_consumer (
- const char *source_name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection));
-
- virtual ::Components::ConsumerDescriptions *
- get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::EmitterDescriptions *
- get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::EmitterDescriptions *
- get_named_emitters(
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::PublisherDescriptions *
- get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::PublisherDescriptions *
- get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // Operations for CCMObject interface.
-
- virtual void
- component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CIAO::CONNECTION_ID
- component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::IRObject_ptr
- get_component_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration));
-
- virtual void
- remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure));
-
- // 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:
-
- ::BasicSP::ReadData_var
- provide_data_read_;
-
- ::BasicSP::TimeOutConsumer_var
- consumes_timeout_;
-
- private:
-
- void
- populate_port_tables (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- ::CORBA::Object_ptr
- provide_data_read_i (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- ::Components::EventConsumerBase_ptr
- get_consumer_timeout_i (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- ACE_CString component_UUID_;
- };
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- class BMDEVICE_SVNT_Export BMDeviceHome_Servant
- : public virtual POA_BasicSP::BMDeviceHome,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- BMDeviceHome_Servant (
- ::BasicSP::CCM_BMDeviceHome_ptr exe,
- ::CIAO::Session_Container *c);
- virtual ~BMDeviceHome_Servant (void);
-
- // Home operations.
-
- // Home factory and finder operations.
-
- // Attribute operations.
-
- // Operations for keyless home interface.
-
- virtual ::Components::CCMObject_ptr
- create_component (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure));
-
- // Operations for implicit home interface.
-
- virtual ::BasicSP::BMDevice_ptr
- create (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure));
-
- // Operations for CCMHome interface.
-
- virtual ::CORBA::IRObject_ptr
- get_component_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::CORBA::IRObject_ptr
- get_home_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure));
-
- // Supported operations.
-
- protected:
- // CIAO-specific operations.
-
- ::BasicSP::BMDevice_ptr
- _ciao_activate_component (
- ::BasicSP::CCM_BMDevice_ptr exe
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void
- _ciao_passivate_component (
- ::BasicSP::BMDevice_ptr comp
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- protected:
- ::BasicSP::CCM_BMDeviceHome_var
- executor_;
-
- ::CIAO::Session_Container *
- container_;
-
- ACE_Hash_Map_Manager_Ex<
- PortableServer::ObjectId,
- BMDevice_Servant *,
- TAO_ObjectId_Hash,
- ACE_Equal_To<PortableServer::ObjectId>,
- ACE_SYNCH_MUTEX>
- component_map_;
- };
-
- extern "C" BMDEVICE_SVNT_Export ::PortableServer::Servant
- createBMDeviceHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- }
-}
-
-#include /**/ "ace/post.h"
-
-#endif /* CIAO_GLUE_SESSION_BMDEVICE_SVNT_H */
-
diff --git a/TAO/CIAO/DAnCE/examples/BasicSP/BMDisplay/BMDisplay_svnt.cpp b/TAO/CIAO/DAnCE/examples/BasicSP/BMDisplay/BMDisplay_svnt.cpp
deleted file mode 100644
index 827c8e867bb..00000000000
--- a/TAO/CIAO/DAnCE/examples/BasicSP/BMDisplay/BMDisplay_svnt.cpp
+++ /dev/null
@@ -1,1048 +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 "BMDisplay_svnt.h"
-#include "Cookies.h"
-#include "ciao/Servant_Activator.h"
-#include "ciao/Port_Activator_T.h"
-
-namespace BMDisplay_Impl
-{
- namespace CIAO_GLUE_BasicSP
- {
- BMDisplay_Context::BMDisplay_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- BMDisplay_Servant *sv)
- : home_ (::Components::CCMHome::_duplicate (home)),
- container_ (c),
- servant_ (sv)
- {
- }
-
- BMDisplay_Context::~BMDisplay_Context (void)
- {
- }
-
- // Operations from ::Components::CCMContext.
-
- ::Components::Principal_ptr
- BMDisplay_Context::get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Principal::_nil ());
- }
-
- ::Components::CCMHome_ptr
- BMDisplay_Context::get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return ::Components::CCMHome::_duplicate (this->home_.in ());
- }
-
- CORBA::Boolean
- BMDisplay_Context::get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Transaction::UserTransaction_ptr
- BMDisplay_Context::get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Transaction::UserTransaction::_nil ());
- }
-
- CORBA::Boolean
- BMDisplay_Context::is_caller_in_role (
- const char * /* role */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- void
- BMDisplay_Context::set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW (CORBA::NO_IMPLEMENT ());
- }
-
- // Operations from ::Components::SessionContextinterface.
-
- CORBA::Object_ptr
- BMDisplay_Context::get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- if (CORBA::is_nil (this->component_.in ()))
- {
- CORBA::Object_var obj =
- this->container_->get_objref (
- this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- this->component_ =
- ::BasicSP::BMDisplay::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- if (CORBA::is_nil (this->component_.in ()))
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::CORBA::Object::_nil ());
- }
- }
-
- return ::BasicSP::BMDisplay::_duplicate (
- this->component_.in ());
- }
-
- // Operations for BMDisplay receptacles and event sources,
- // defined in ::BasicSP::CCM_BMDisplay_Context.
-
- ::BasicSP::ReadData_ptr
- BMDisplay_Context::get_connection_comp_data (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return ::BasicSP::ReadData::_duplicate (
- this->ciao_uses_comp_data_.in ());
- }
-
- void
- BMDisplay_Context::connect_comp_data (
- ::BasicSP::ReadData_ptr c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::AlreadyConnected,
- ::Components::InvalidConnection))
- {
- if (!CORBA::is_nil (this->ciao_uses_comp_data_.in ()))
- {
- ACE_THROW (::Components::AlreadyConnected ());
- }
-
- if (CORBA::is_nil (c))
- {
- ACE_THROW (::Components::InvalidConnection ());
- }
-
- this->ciao_uses_comp_data_ =
- ::BasicSP::ReadData::_duplicate (c);
- }
-
- ::BasicSP::ReadData_ptr
- BMDisplay_Context::disconnect_comp_data (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::NoConnection))
- {
- if (CORBA::is_nil (this->ciao_uses_comp_data_.in ()))
- {
- ACE_THROW_RETURN (
- ::Components::NoConnection (),
- ::BasicSP::ReadData::_nil ());
- }
-
- return this->ciao_uses_comp_data_._retn ();
- }
-
- // CIAO-specific.
-
- ::CIAO::Session_Container *
- BMDisplay_Context::_ciao_the_Container (void) const
- {
- return this->container_;
- }
-
- BMDisplay_Context *
- BMDisplay_Context::_narrow (
- ::Components::SessionContext_ptr p
- ACE_ENV_ARG_DECL_NOT_USED)
- {
- return dynamic_cast<BMDisplay_Context *> (p);
- }
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- BMDisplay_Servant::BMDisplay_Servant (
- ::BasicSP::CCM_BMDisplay_ptr exe,
- ::Components::CCMHome_ptr h,
- ::CIAO::Session_Container *c)
- : our_base (exe, c)
- {
- this->context_ = new BMDisplay_Context (h, c, this);
-
- CIAO_REGISTER_OBV_FACTORY (
- ::BasicSP::DataAvailable_init,
- ::BasicSP::DataAvailable);
-
- 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;
- }
-
- BMDisplay_Servant::~BMDisplay_Servant (void)
- {
- }
-
- void
- BMDisplay_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);
- }
- }
-
- // Operations for Navigation interface.
-
- CORBA::Object_ptr
- BMDisplay_Servant::provide_facet (
- const char *name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (name == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::BAD_PARAM (),
- ::CORBA::Object::_nil ());
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::CORBA::Object::_nil ());
- }
-
- ::Components::FacetDescriptions *
- BMDisplay_Servant::get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- BMDisplay_Servant::get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- BMDisplay_Servant::get_named_emitters (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- BMDisplay_Servant::DataAvailableConsumer_data_ready_Servant::DataAvailableConsumer_data_ready_Servant (
- ::BasicSP::CCM_BMDisplay_ptr executor,
- ::BasicSP::CCM_BMDisplay_Context_ptr c)
- : executor_ (::BasicSP::CCM_BMDisplay::_duplicate (executor)),
- ctx_ (::BasicSP::CCM_BMDisplay_Context::_duplicate (c))
- {
- }
-
- BMDisplay_Servant::DataAvailableConsumer_data_ready_Servant::~DataAvailableConsumer_data_ready_Servant (void)
- {
- }
-
- CORBA::Object_ptr
- BMDisplay_Servant::DataAvailableConsumer_data_ready_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
- BMDisplay_Servant::DataAvailableConsumer_data_ready_Servant::push_DataAvailable (
- ::BasicSP::DataAvailable *evt
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->executor_->push_data_ready (
- evt
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Inherited from ::Components::EventConsumerBase.
- void
- BMDisplay_Servant::DataAvailableConsumer_data_ready_Servant::push_event (
- ::Components::EventBase *ev
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::BadEventType))
- {
- ::BasicSP::DataAvailable_var ev_type =
- ::BasicSP::DataAvailable::_downcast (ev);
-
- if (ev_type != 0)
- {
- this->push_DataAvailable (
- ev_type.in ()
- ACE_ENV_ARG_PARAMETER);
-
- return;
- }
-
- ACE_THROW (::Components::BadEventType ());
- }
-
- ::BasicSP::DataAvailableConsumer_ptr
- BMDisplay_Servant::get_consumer_data_ready (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- if (! ::CORBA::is_nil (this->consumes_data_ready_.in ()))
- {
- return ::BasicSP::DataAvailableConsumer::_duplicate (this->consumes_data_ready_.in ());
- }
-
- ::Components::EventConsumerBase_var obj =
- this->get_consumer_data_ready_i (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::DataAvailableConsumer::_nil ());
-
- ::BasicSP::DataAvailableConsumer_var eco =
- ::BasicSP::DataAvailableConsumer::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::DataAvailableConsumer::_nil ());
-
- this->consumes_data_ready_ = eco;
- return ::BasicSP::DataAvailableConsumer::_duplicate (this->consumes_data_ready_.in ());
- }
-
- ::Components::EventConsumerBase_ptr
- BMDisplay_Servant::get_consumer_data_ready_i (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::Components::EventConsumerBase_ptr ret =
- this->lookup_consumer ("data_ready");
-
- if (! ::CORBA::is_nil (ret))
- {
- return ret;
- }
-
- CIAO::Port_Activator_T<
- BMDisplay_Servant::DataAvailableConsumer_data_ready_Servant,
- ::BasicSP::CCM_BMDisplay,
- ::BasicSP::CCM_BMDisplay_Context,
- BMDisplay_Servant > *tmp = 0;
-
- typedef CIAO::Port_Activator_T<
- BMDisplay_Servant::DataAvailableConsumer_data_ready_Servant,
- ::BasicSP::CCM_BMDisplay,
- ::BasicSP::CCM_BMDisplay_Context,
- BMDisplay_Servant >
- MACRO_MADNESS_TYPEDEF;
-
-
- ACE_NEW_THROW_EX (
- tmp,
- MACRO_MADNESS_TYPEDEF (
- "BasicSP_BMDisplay_data_ready",
- "data_ready",
- 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 (
- "BasicSP_BMDisplay_data_ready",
- "IDL:BasicSP/DataAvailableConsumer:1.0",
- CIAO::Container::Facet_Consumer
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::DataAvailableConsumer::_nil ());
-
- ::Components::EventConsumerBase_var ecb =
- ::Components::EventConsumerBase::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::DataAvailableConsumer::_nil ());
-
- this->add_consumer (
- "data_ready",
- ecb.in ());
-
- return ecb._retn ();
- }
-
- ::Components::Cookie *
- BMDisplay_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, "comp_data") == 0)
- {
- ::BasicSP::ReadData_var _ciao_conn =
- ::BasicSP::ReadData::_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_comp_data (
- _ciao_conn.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- return 0;
- }
-
- ACE_THROW_RETURN (::Components::InvalidName (), 0);
- }
-
- CORBA::Object_ptr
- BMDisplay_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, "comp_data") == 0)
- {
- // Simplex disconnect.
- return this->disconnect_comp_data (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::CORBA::Object::_nil ());
-
- ACE_UNUSED_ARG (ck);
- }
-
- ::Components::ConnectionDescriptions *
- BMDisplay_Servant::get_connections (
- const char * /* name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- BMDisplay_Servant::get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- BMDisplay_Servant::get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- void
- BMDisplay_Servant::connect_comp_data (
- ::BasicSP::ReadData_ptr c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::AlreadyConnected,
- ::Components::InvalidConnection))
- {
- this->context_->connect_comp_data (
- c
- ACE_ENV_ARG_PARAMETER);
- }
-
- ::BasicSP::ReadData_ptr
- BMDisplay_Servant::disconnect_comp_data (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::NoConnection))
- {
- return this->context_->disconnect_comp_data (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ::BasicSP::ReadData_ptr
- BMDisplay_Servant::get_connection_comp_data (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return this->context_->get_connection_comp_data (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ::Components::EventConsumerBase_ptr
- BMDisplay_Servant::get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (sink_name == 0)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- if (ACE_OS::strcmp (sink_name, "data_ready") == 0)
- {
- return this->get_consumer_data_ready (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- void
- BMDisplay_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::EventConsumerBase_ptr
- BMDisplay_Servant::disconnect_consumer (
- const char * /* source_name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ConsumerDescriptions *
- BMDisplay_Servant::get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Cookie *
- BMDisplay_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
- BMDisplay_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 ());
- }
-
- ::Components::PublisherDescriptions *
- BMDisplay_Servant::get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::PublisherDescriptions *
- BMDisplay_Servant::get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- // Operations for CCMObject interface.
-
- void
- BMDisplay_Servant::component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->component_UUID_ = new_component_UUID;
- }
-
- CIAO::CONNECTION_ID
- BMDisplay_Servant::component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::string_dup (this->component_UUID_.c_str ());
- }
-
- CORBA::IRObject_ptr
- BMDisplay_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- BMDisplay_Servant::configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration))
- {
- // CIAO to-do
- }
-
- void
- BMDisplay_Servant::remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- // CIAO to-do
- }
-
- CORBA::Object_ptr
- BMDisplay_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
- BMDisplay_Servant::populate_port_tables (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var obj_var;
- ::Components::EventConsumerBase_var ecb_var;
-
- ecb_var =
- this->get_consumer_data_ready_i (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- BMDisplayHome_Servant::BMDisplayHome_Servant (
- ::BasicSP::CCM_BMDisplayHome_ptr exe,
- ::CIAO::Session_Container *c)
- : executor_ (::BasicSP::CCM_BMDisplayHome::_duplicate (exe)),
- container_ (c)
- {
- }
-
- BMDisplayHome_Servant::~BMDisplayHome_Servant (void)
- {
- }
-
- // Home operations.
-
- // Home supported interface operations.
-
- // Home factory and finder operations.
-
- // Home attribute operations.
-
- // Operations for keyless home interface.
-
- ::Components::CCMObject_ptr
- BMDisplayHome_Servant::create_component (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- return this->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- // Operations for implicit home interface.
-
- ::BasicSP::BMDisplay_ptr
- BMDisplayHome_Servant::create (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- if (this->executor_.in () == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::BasicSP::BMDisplay::_nil ());
- }
-
- ::Components::EnterpriseComponent_var _ciao_ec =
- this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDisplay::_nil ());
-
- ::BasicSP::CCM_BMDisplay_var _ciao_comp =
- ::BasicSP::CCM_BMDisplay::_narrow (
- _ciao_ec.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDisplay::_nil ());
-
- return this->_ciao_activate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Operations for CCMHome interface.
-
- ::CORBA::IRObject_ptr
- BMDisplayHome_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- ::CORBA::IRObject_ptr
- BMDisplayHome_Servant::get_home_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- BMDisplayHome_Servant::remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- ::BasicSP::BMDisplay_var _ciao_comp =
- ::BasicSP::BMDisplay::_narrow (
- comp
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (_ciao_comp.in ()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- _ciao_comp->remove (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->_ciao_passivate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // CIAO-specific operations.
-
- ::BasicSP::BMDisplay_ptr
- BMDisplayHome_Servant::_ciao_activate_component (
- ::BasicSP::CCM_BMDisplay_ptr exe
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var hobj =
- this->container_->get_objref (
- this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDisplay::_nil ());
-
- ::Components::CCMHome_var home =
- ::Components::CCMHome::_narrow (
- hobj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDisplay::_nil ());
-
- BMDisplay_Servant *svt =
- new BMDisplay_Servant (
- exe,
- home.in (),
- this->container_);
-
- PortableServer::ServantBase_var safe (svt);
- PortableServer::ObjectId_var oid;
-
- CORBA::Object_var objref =
- this->container_->install_component (
- svt,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDisplay::_nil ());
-
- ::BasicSP::BMDisplay_var ho =
- ::BasicSP::BMDisplay::_narrow (
- objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::BMDisplay::_nil ());
-
- if (this->component_map_.bind (oid.in (), svt) == 0)
- {
- safe._retn ();
- }
-
- return ho._retn ();
- }
-
- void
- BMDisplayHome_Servant::_ciao_passivate_component (
- ::BasicSP::BMDisplay_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- PortableServer::ObjectId_var oid;
-
- this->container_->uninstall_component (
- comp,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- BMDisplay_Servant *servant = 0;
-
- if (this->component_map_.unbind (oid.in (), servant) == 0)
- {
- PortableServer::ServantBase_var safe (servant);
-
- servant->_ciao_passivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
- }
-
- extern "C" BMDISPLAY_SVNT_Export ::PortableServer::Servant
- createBMDisplayHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL)
- {
- if (p == 0)
- {
- return 0;
- }
-
- ::BasicSP::CCM_BMDisplayHome_var x =
- ::BasicSP::CCM_BMDisplayHome::_narrow (
- p
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (::CORBA::is_nil (x.in ()))
- {
- return 0;
- }
-
- return new
- CIAO_GLUE_BasicSP::BMDisplayHome_Servant (
- x.in (),
- c);
- }
-}
-
diff --git a/TAO/CIAO/DAnCE/examples/BasicSP/BMDisplay/BMDisplay_svnt.h b/TAO/CIAO/DAnCE/examples/BasicSP/BMDisplay/BMDisplay_svnt.h
deleted file mode 100644
index e8147858390..00000000000
--- a/TAO/CIAO/DAnCE/examples/BasicSP/BMDisplay/BMDisplay_svnt.h
+++ /dev/null
@@ -1,569 +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_BMDISPLAY_SVNT_H
-#define CIAO_GLUE_SESSION_BMDISPLAY_SVNT_H
-
-#include /**/ "ace/pre.h"
-
-#include "BMDisplayEC.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ciao/Container_Base.h"
-#include "ciao/Servant_Impl_T.h"
-#include "tao/LocalObject.h"
-#include "tao/PortableServer/Key_Adapters.h"
-#include "ace/Active_Map_Manager_T.h"
-
-#include "BMDisplayS.h"
-
-namespace BMDisplay_Impl
-{
- namespace CIAO_GLUE_BasicSP
- {
- class BMDISPLAY_SVNT_Export BMDisplay_Context
- : public virtual ::BasicSP::CCM_BMDisplay_Context,
- public virtual TAO_Local_RefCounted_Object
- {
- public:
- // We will allow the servant glue code we generate to access our state.
- friend class BMDisplay_Servant;
-
- BMDisplay_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- BMDisplay_Servant *sv);
-
- virtual ~BMDisplay_Context (void);
-
- // Operations from ::Components::CCMContext.
-
- virtual ::Components::Principal_ptr
- get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::CCMHome_ptr
- get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Boolean
- get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- virtual ::Components::Transaction::UserTransaction_ptr
- get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- virtual CORBA::Boolean
- is_caller_in_role (
- const char *role
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- // Operations from ::Components::SessionContext interface.
-
- virtual CORBA::Object_ptr
- get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- // Operations for BMDisplay receptacles and event sources,
- // defined in ::BasicSP::CCM_BMDisplay_Context.
-
- virtual ::BasicSP::ReadData_ptr
- get_connection_comp_data (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // CIAO-specific.
-
- ::CIAO::Session_Container *
- _ciao_the_Container (void) const;
-
- static BMDisplay_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_comp_data (
- ::BasicSP::ReadData_ptr
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::AlreadyConnected,
- ::Components::InvalidConnection));
-
- virtual ::BasicSP::ReadData_ptr
- disconnect_comp_data (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::NoConnection));
-
- protected:
- // Simplex comp_data connection.
- ::BasicSP::ReadData_var
- ciao_uses_comp_data_;
-
- ::Components::CCMHome_var home_;
- ::CIAO::Session_Container *container_;
-
- BMDisplay_Servant *servant_;
- ::BasicSP::BMDisplay_var component_;
- };
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- class BMDISPLAY_SVNT_Export BMDisplay_Servant
- : public virtual CIAO::Servant_Impl<
- POA_BasicSP::BMDisplay,
- ::BasicSP::CCM_BMDisplay,
- ::BasicSP::CCM_BMDisplay_var,
- BMDisplay_Context
- >,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- /// Hack for VC6 the most sucky compiler
- typedef CIAO::Servant_Impl<
- POA_BasicSP::BMDisplay,
- ::BasicSP::CCM_BMDisplay,
- ::BasicSP::CCM_BMDisplay_var,
- BMDisplay_Context
- > our_base;
-
- BMDisplay_Servant (
- ::BasicSP::CCM_BMDisplay_ptr executor,
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c);
-
- virtual ~BMDisplay_Servant (void);
-
- virtual void
- set_attributes (
- const ::Components::ConfigValues &descr
- ACE_ENV_ARG_DECL);
-
- // Supported operations.
-
- // Public port operations.
-
- // Servant class for the data_ready consumer.
- class BMDISPLAY_SVNT_Export DataAvailableConsumer_data_ready_Servant
- : public virtual POA_BasicSP::DataAvailableConsumer,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- DataAvailableConsumer_data_ready_Servant (
- ::BasicSP::CCM_BMDisplay_ptr executor,
- ::BasicSP::CCM_BMDisplay_Context_ptr c);
-
- virtual ~DataAvailableConsumer_data_ready_Servant (void);
-
- virtual void
- push_DataAvailable (
- ::BasicSP::DataAvailable *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:
- ::BasicSP::CCM_BMDisplay_var
- executor_;
-
- ::BasicSP::CCM_BMDisplay_Context_var
- ctx_;
- };
-
- virtual ::BasicSP::DataAvailableConsumer_ptr
- get_consumer_data_ready (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- connect_comp_data (
- ::BasicSP::ReadData_ptr c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::AlreadyConnected,
- ::Components::InvalidConnection));
-
- virtual ::BasicSP::ReadData_ptr
- disconnect_comp_data (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::NoConnection));
-
- virtual ::BasicSP::ReadData_ptr
- get_connection_comp_data (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // Component attribute operations.
-
- // Operations for Navigation interface.
-
- virtual CORBA::Object_ptr
- provide_facet (
- const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::FacetDescriptions *
- get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // 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));
-
- virtual ::Components::ConnectionDescriptions *
- get_connections (
- const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::ReceptacleDescriptions *
- get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::ReceptacleDescriptions *
- get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // Operations for Events interface.
-
- virtual ::Components::EventConsumerBase_ptr
- get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- 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));
-
- virtual ::Components::EventConsumerBase_ptr
- disconnect_consumer (
- const char *source_name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection));
-
- virtual ::Components::ConsumerDescriptions *
- get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::EmitterDescriptions *
- get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::EmitterDescriptions *
- get_named_emitters(
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::PublisherDescriptions *
- get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::PublisherDescriptions *
- get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // Operations for CCMObject interface.
-
- virtual void
- component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CIAO::CONNECTION_ID
- component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- virtual CORBA::IRObject_ptr
- get_component_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration));
-
- virtual void
- remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure));
-
- // 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:
-
- ::BasicSP::DataAvailableConsumer_var
- consumes_data_ready_;
-
- private:
-
- void
- populate_port_tables (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- ::Components::EventConsumerBase_ptr
- get_consumer_data_ready_i (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- ACE_CString component_UUID_;
- };
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- class BMDISPLAY_SVNT_Export BMDisplayHome_Servant
- : public virtual POA_BasicSP::BMDisplayHome,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- BMDisplayHome_Servant (
- ::BasicSP::CCM_BMDisplayHome_ptr exe,
- ::CIAO::Session_Container *c);
- virtual ~BMDisplayHome_Servant (void);
-
- // Home operations.
-
- // Home factory and finder operations.
-
- // Attribute operations.
-
- // Operations for keyless home interface.
-
- virtual ::Components::CCMObject_ptr
- create_component (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure));
-
- // Operations for implicit home interface.
-
- virtual ::BasicSP::BMDisplay_ptr
- create (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure));
-
- // Operations for CCMHome interface.
-
- virtual ::CORBA::IRObject_ptr
- get_component_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::CORBA::IRObject_ptr
- get_home_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure));
-
- // Supported operations.
-
- protected:
- // CIAO-specific operations.
-
- ::BasicSP::BMDisplay_ptr
- _ciao_activate_component (
- ::BasicSP::CCM_BMDisplay_ptr exe
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void
- _ciao_passivate_component (
- ::BasicSP::BMDisplay_ptr comp
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- protected:
- ::BasicSP::CCM_BMDisplayHome_var
- executor_;
-
- ::CIAO::Session_Container *
- container_;
-
- ACE_Hash_Map_Manager_Ex<
- PortableServer::ObjectId,
- BMDisplay_Servant *,
- TAO_ObjectId_Hash,
- ACE_Equal_To<PortableServer::ObjectId>,
- ACE_SYNCH_MUTEX>
- component_map_;
- };
-
- extern "C" BMDISPLAY_SVNT_Export ::PortableServer::Servant
- createBMDisplayHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- }
-}
-
-#include /**/ "ace/post.h"
-
-#endif /* CIAO_GLUE_SESSION_BMDISPLAY_SVNT_H */
-
diff --git a/TAO/CIAO/DAnCE/examples/BasicSP/EC/EC_svnt.cpp b/TAO/CIAO/DAnCE/examples/BasicSP/EC/EC_svnt.cpp
deleted file mode 100644
index 9a4ae0acd0a..00000000000
--- a/TAO/CIAO/DAnCE/examples/BasicSP/EC/EC_svnt.cpp
+++ /dev/null
@@ -1,992 +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 "EC_svnt.h"
-#include "Cookies.h"
-#include "ciao/Servant_Activator.h"
-#include "ciao/Port_Activator_T.h"
-
-namespace EC_Impl
-{
- namespace CIAO_GLUE_BasicSP
- {
- EC_Context::EC_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- EC_Servant *sv)
- : home_ (::Components::CCMHome::_duplicate (home)),
- container_ (c),
- servant_ (sv)
- {
- }
-
- EC_Context::~EC_Context (void)
- {
- }
-
- // Operations from ::Components::CCMContext.
-
- ::Components::Principal_ptr
- EC_Context::get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Principal::_nil ());
- }
-
- ::Components::CCMHome_ptr
- EC_Context::get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return ::Components::CCMHome::_duplicate (this->home_.in ());
- }
-
- CORBA::Boolean
- EC_Context::get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Transaction::UserTransaction_ptr
- EC_Context::get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Transaction::UserTransaction::_nil ());
- }
-
- CORBA::Boolean
- EC_Context::is_caller_in_role (
- const char * /* role */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- void
- EC_Context::set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW (CORBA::NO_IMPLEMENT ());
- }
-
- // Operations from ::Components::SessionContextinterface.
-
- CORBA::Object_ptr
- EC_Context::get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- if (CORBA::is_nil (this->component_.in ()))
- {
- CORBA::Object_var obj =
- this->container_->get_objref (
- this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- this->component_ =
- ::BasicSP::EC::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- if (CORBA::is_nil (this->component_.in ()))
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::CORBA::Object::_nil ());
- }
- }
-
- return ::BasicSP::EC::_duplicate (
- this->component_.in ());
- }
-
- // Operations for EC receptacles and event sources,
- // defined in ::BasicSP::CCM_EC_Context.
-
- void
- EC_Context::push_timeout (
- ::BasicSP::TimeOut *ev
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_CString my_uuid = this->servant_->component_UUID (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- my_uuid += "_timeout_publisher";
-
- this->container_->push_event (ev,
- my_uuid.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- /*
- ACE_Active_Map_Manager<
- ::BasicSP::TimeOutConsumer_var>::iterator end =
- this->ciao_publishes_timeout_map_.end ();
-
- for (ACE_Active_Map_Manager<
- ::BasicSP::TimeOutConsumer_var>::iterator iter =
- this->ciao_publishes_timeout_map_.begin ();
- iter != end;
- ++iter)
- {
- ACE_Active_Map_Manager<
- ::BasicSP::TimeOutConsumer_var>::ENTRY &entry = *iter;
-
- ::BasicSP::TimeOutConsumer_var c =
- ::BasicSP::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 *
- EC_Context::subscribe_timeout (
- ::BasicSP::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);
- }
-
- ::BasicSP::TimeOutConsumer_var sub =
- ::BasicSP::TimeOutConsumer::_duplicate (c);
-
- ACE_Active_Map_Manager_Key key;
- this->ciao_publishes_timeout_map_.bind (sub.in (), key);
- sub._retn ();
-
- ::Components::Cookie_var retv = new ::CIAO::Map_Key_Cookie (key);
- return retv._retn ();
- }
-
- ::BasicSP::TimeOutConsumer_ptr
- EC_Context::unsubscribe_timeout (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection))
- {
- ::BasicSP::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 (),
- ::BasicSP::TimeOutConsumer::_nil ());
- }
-
- if (this->ciao_publishes_timeout_map_.unbind (key, retv) != 0)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidConnection (),
- ::BasicSP::TimeOutConsumer::_nil ());
- }
-
- return retv._retn ();
- }
-
- // CIAO-specific.
-
- ::CIAO::Session_Container *
- EC_Context::_ciao_the_Container (void) const
- {
- return this->container_;
- }
-
- EC_Context *
- EC_Context::_narrow (
- ::Components::SessionContext_ptr p
- ACE_ENV_ARG_DECL_NOT_USED)
- {
- return dynamic_cast<EC_Context *> (p);
- }
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- EC_Servant::EC_Servant (
- ::BasicSP::CCM_EC_ptr exe,
- ::Components::CCMHome_ptr h,
- ::CIAO::Session_Container *c)
- : our_base (exe, c)
- {
- this->context_ = new EC_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;
- }
-
- EC_Servant::~EC_Servant (void)
- {
- }
-
- void
- EC_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, "hertz") == 0)
- {
- ::CORBA::Long _ciao_extract_val = 0;
- descr_value >>= _ciao_extract_val;
- this->hertz (_ciao_extract_val);
- continue;
- }
-
- ACE_UNUSED_ARG (descr_name);
- ACE_UNUSED_ARG (descr_value);
- }
- }
-
- // Operations for Navigation interface.
-
- CORBA::Object_ptr
- EC_Servant::provide_facet (
- const char *name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (name == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::BAD_PARAM (),
- ::CORBA::Object::_nil ());
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::CORBA::Object::_nil ());
- }
-
- ::Components::FacetDescriptions *
- EC_Servant::get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- EC_Servant::get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- EC_Servant::get_named_emitters (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Cookie *
- EC_Servant::subscribe_timeout (
- ::BasicSP::TimeOutConsumer_ptr c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit))
- {
- return this->context_->subscribe_timeout (
- c
- ACE_ENV_ARG_PARAMETER);
- }
-
- ::BasicSP::TimeOutConsumer_ptr
- EC_Servant::unsubscribe_timeout (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection))
- {
- return this->context_->unsubscribe_timeout (
- ck
- ACE_ENV_ARG_PARAMETER);
- }
-
- ::Components::Cookie *
- EC_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
- EC_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);
- }
-
- ::Components::ConnectionDescriptions *
- EC_Servant::get_connections (
- const char * /* name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- EC_Servant::get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- EC_Servant::get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EventConsumerBase_ptr
- EC_Servant::get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (sink_name == 0)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- void
- EC_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::EventConsumerBase_ptr
- EC_Servant::disconnect_consumer (
- const char * /* source_name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ConsumerDescriptions *
- EC_Servant::get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Cookie *
- EC_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, "timeout") == 0)
- {
- ::BasicSP::TimeOutConsumer_var _ciao_consumer =
- ::BasicSP::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_timeout (
- _ciao_consumer.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (::Components::InvalidName (), 0);
- }
-
- ::Components::EventConsumerBase_ptr
- EC_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, "timeout") == 0)
- {
- return this->unsubscribe_timeout (
- ck
- ACE_ENV_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- ::Components::PublisherDescriptions *
- EC_Servant::get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::PublisherDescriptions *
- EC_Servant::get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- // Operations for CCMObject interface.
-
- void
- EC_Servant::component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->component_UUID_ = new_component_UUID;
- }
-
- CIAO::CONNECTION_ID
- EC_Servant::component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::string_dup (this->component_UUID_.c_str ());
- }
-
- CORBA::IRObject_ptr
- EC_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- EC_Servant::configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration))
- {
- // CIAO to-do
- }
-
- void
- EC_Servant::remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- // CIAO to-do
- }
-
- CORBA::Object_ptr
- EC_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
- EC_Servant::start (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->executor_->start (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- void
- EC_Servant::stop (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->executor_->stop (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- // Component attribute operations.
-
- ::CORBA::Long
- EC_Servant::hertz (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return this->executor_->hertz (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- void
- EC_Servant::hertz (
- ::CORBA::Long hertz
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->executor_->hertz (
- hertz
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Private method to populate the port tables.
- void
- EC_Servant::populate_port_tables (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var obj_var;
- ::Components::EventConsumerBase_var ecb_var;
- }
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- ECHome_Servant::ECHome_Servant (
- ::BasicSP::CCM_ECHome_ptr exe,
- ::CIAO::Session_Container *c)
- : executor_ (::BasicSP::CCM_ECHome::_duplicate (exe)),
- container_ (c)
- {
- }
-
- ECHome_Servant::~ECHome_Servant (void)
- {
- }
-
- // Home operations.
-
- // Home supported interface operations.
-
- // Home factory and finder operations.
-
- ::BasicSP::EC_ptr
- ECHome_Servant::new_EC (
- ::CORBA::Long hertz
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::Components::EnterpriseComponent_var _ciao_ec =
- this->executor_->new_EC (
- hertz
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::EC_ptr::_nil ());
-
- ::BasicSP::CCM_EC_var _ciao_comp =
- ::BasicSP::CCM_EC::_narrow (
- _ciao_ec.in ()
- ACE_ENV_ARG_PARAMETER);
-
- ACE_CHECK_RETURN (::BasicSP::EC_ptr::_nil ());
-
- return this->_ciao_activate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Home attribute operations.
-
- // Operations for keyless home interface.
-
- ::Components::CCMObject_ptr
- ECHome_Servant::create_component (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- return this->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- // Operations for implicit home interface.
-
- ::BasicSP::EC_ptr
- ECHome_Servant::create (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- if (this->executor_.in () == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::BasicSP::EC::_nil ());
- }
-
- ::Components::EnterpriseComponent_var _ciao_ec =
- this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::EC::_nil ());
-
- ::BasicSP::CCM_EC_var _ciao_comp =
- ::BasicSP::CCM_EC::_narrow (
- _ciao_ec.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::EC::_nil ());
-
- return this->_ciao_activate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Operations for CCMHome interface.
-
- ::CORBA::IRObject_ptr
- ECHome_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- ::CORBA::IRObject_ptr
- ECHome_Servant::get_home_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- ECHome_Servant::remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- ::BasicSP::EC_var _ciao_comp =
- ::BasicSP::EC::_narrow (
- comp
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (_ciao_comp.in ()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- _ciao_comp->remove (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->_ciao_passivate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // CIAO-specific operations.
-
- ::BasicSP::EC_ptr
- ECHome_Servant::_ciao_activate_component (
- ::BasicSP::CCM_EC_ptr exe
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var hobj =
- this->container_->get_objref (
- this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::EC::_nil ());
-
- ::Components::CCMHome_var home =
- ::Components::CCMHome::_narrow (
- hobj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::EC::_nil ());
-
- EC_Servant *svt =
- new EC_Servant (
- exe,
- home.in (),
- this->container_);
-
- PortableServer::ServantBase_var safe (svt);
- PortableServer::ObjectId_var oid;
-
- CORBA::Object_var objref =
- this->container_->install_component (
- svt,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::EC::_nil ());
-
- ::BasicSP::EC_var ho =
- ::BasicSP::EC::_narrow (
- objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::BasicSP::EC::_nil ());
-
- if (this->component_map_.bind (oid.in (), svt) == 0)
- {
- safe._retn ();
- }
-
- return ho._retn ();
- }
-
- void
- ECHome_Servant::_ciao_passivate_component (
- ::BasicSP::EC_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- PortableServer::ObjectId_var oid;
-
- this->container_->uninstall_component (
- comp,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- EC_Servant *servant = 0;
-
- if (this->component_map_.unbind (oid.in (), servant) == 0)
- {
- PortableServer::ServantBase_var safe (servant);
-
- servant->_ciao_passivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
- }
-
- extern "C" EC_SVNT_Export ::PortableServer::Servant
- createECHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL)
- {
- if (p == 0)
- {
- return 0;
- }
-
- ::BasicSP::CCM_ECHome_var x =
- ::BasicSP::CCM_ECHome::_narrow (
- p
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (::CORBA::is_nil (x.in ()))
- {
- return 0;
- }
-
- return new
- CIAO_GLUE_BasicSP::ECHome_Servant (
- x.in (),
- c);
- }
-}
-
diff --git a/TAO/CIAO/DAnCE/examples/BasicSP/EC/EC_svnt.h b/TAO/CIAO/DAnCE/examples/BasicSP/EC/EC_svnt.h
deleted file mode 100644
index cbdaea362b3..00000000000
--- a/TAO/CIAO/DAnCE/examples/BasicSP/EC/EC_svnt.h
+++ /dev/null
@@ -1,539 +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_EC_SVNT_H
-#define CIAO_GLUE_SESSION_EC_SVNT_H
-
-#include /**/ "ace/pre.h"
-
-#include "ECEC.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ciao/Container_Base.h"
-#include "ciao/Servant_Impl_T.h"
-#include "tao/LocalObject.h"
-#include "tao/PortableServer/Key_Adapters.h"
-#include "ace/Active_Map_Manager_T.h"
-
-#include "ECS.h"
-
-namespace EC_Impl
-{
- namespace CIAO_GLUE_BasicSP
- {
- class EC_SVNT_Export EC_Context
- : public virtual ::BasicSP::CCM_EC_Context,
- public virtual TAO_Local_RefCounted_Object
- {
- public:
- // We will allow the servant glue code we generate to access our state.
- friend class EC_Servant;
-
- EC_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- EC_Servant *sv);
-
- virtual ~EC_Context (void);
-
- // Operations from ::Components::CCMContext.
-
- virtual ::Components::Principal_ptr
- get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::CCMHome_ptr
- get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Boolean
- get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- virtual ::Components::Transaction::UserTransaction_ptr
- get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- virtual CORBA::Boolean
- is_caller_in_role (
- const char *role
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- // Operations from ::Components::SessionContext interface.
-
- virtual CORBA::Object_ptr
- get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- // Operations for EC receptacles and event sources,
- // defined in ::BasicSP::CCM_EC_Context.
-
- virtual void
- push_timeout (
- ::BasicSP::TimeOut *ev
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // CIAO-specific.
-
- ::CIAO::Session_Container *
- _ciao_the_Container (void) const;
-
- static EC_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_timeout (
- ::BasicSP::TimeOutConsumer_ptr c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit));
-
- virtual ::BasicSP::TimeOutConsumer_ptr
- unsubscribe_timeout (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection));
-
- protected:
- ACE_Active_Map_Manager<
- ::BasicSP::TimeOutConsumer_var>
- ciao_publishes_timeout_map_;
-
- ::Components::CCMHome_var home_;
- ::CIAO::Session_Container *container_;
-
- EC_Servant *servant_;
- ::BasicSP::EC_var component_;
- };
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- class EC_SVNT_Export EC_Servant
- : public virtual CIAO::Servant_Impl<
- POA_BasicSP::EC,
- ::BasicSP::CCM_EC,
- ::BasicSP::CCM_EC_var,
- EC_Context
- >,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- /// Hack for VC6 the most sucky compiler
- typedef CIAO::Servant_Impl<
- POA_BasicSP::EC,
- ::BasicSP::CCM_EC,
- ::BasicSP::CCM_EC_var,
- EC_Context
- > our_base;
-
- EC_Servant (
- ::BasicSP::CCM_EC_ptr executor,
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c);
-
- virtual ~EC_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));
- virtual void
- stop (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
- // Public port operations.
-
- virtual ::Components::Cookie *
- subscribe_timeout (
- ::BasicSP::TimeOutConsumer_ptr c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit));
-
- virtual ::BasicSP::TimeOutConsumer_ptr
- unsubscribe_timeout (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection));
-
- // Component attribute operations.
-
- virtual ::CORBA::Long
- hertz (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- hertz (
- ::CORBA::Long
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // Operations for Navigation interface.
-
- virtual CORBA::Object_ptr
- provide_facet (
- const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::FacetDescriptions *
- get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // 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));
-
- virtual ::Components::ConnectionDescriptions *
- get_connections (
- const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::ReceptacleDescriptions *
- get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::ReceptacleDescriptions *
- get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // Operations for Events interface.
-
- virtual ::Components::EventConsumerBase_ptr
- get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- 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));
-
- virtual ::Components::EventConsumerBase_ptr
- disconnect_consumer (
- const char *source_name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection));
-
- virtual ::Components::ConsumerDescriptions *
- get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::EmitterDescriptions *
- get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::EmitterDescriptions *
- get_named_emitters(
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::PublisherDescriptions *
- get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::PublisherDescriptions *
- get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // Operations for CCMObject interface.
-
- virtual void
- component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CIAO::CONNECTION_ID
- component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::IRObject_ptr
- get_component_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration));
-
- virtual void
- remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure));
-
- // 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));
-
- ACE_CString component_UUID_;
- };
- }
-
- namespace CIAO_GLUE_BasicSP
- {
- class EC_SVNT_Export ECHome_Servant
- : public virtual POA_BasicSP::ECHome,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- ECHome_Servant (
- ::BasicSP::CCM_ECHome_ptr exe,
- ::CIAO::Session_Container *c);
- virtual ~ECHome_Servant (void);
-
- // Home operations.
-
- // Home factory and finder operations.
-
- virtual ::BasicSP::EC_ptr
- new_EC (
- ::CORBA::Long hertz
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // Attribute operations.
-
- // Operations for keyless home interface.
-
- virtual ::Components::CCMObject_ptr
- create_component (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure));
-
- // Operations for implicit home interface.
-
- virtual ::BasicSP::EC_ptr
- create (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure));
-
- // Operations for CCMHome interface.
-
- virtual ::CORBA::IRObject_ptr
- get_component_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::CORBA::IRObject_ptr
- get_home_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure));
-
- // Supported operations.
-
- protected:
- // CIAO-specific operations.
-
- ::BasicSP::EC_ptr
- _ciao_activate_component (
- ::BasicSP::CCM_EC_ptr exe
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void
- _ciao_passivate_component (
- ::BasicSP::EC_ptr comp
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- protected:
- ::BasicSP::CCM_ECHome_var
- executor_;
-
- ::CIAO::Session_Container *
- container_;
-
- ACE_Hash_Map_Manager_Ex<
- PortableServer::ObjectId,
- EC_Servant *,
- TAO_ObjectId_Hash,
- ACE_Equal_To<PortableServer::ObjectId>,
- ACE_SYNCH_MUTEX>
- component_map_;
- };
-
- extern "C" EC_SVNT_Export ::PortableServer::Servant
- createECHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- }
-}
-
-#include /**/ "ace/post.h"
-
-#endif /* CIAO_GLUE_SESSION_EC_SVNT_H */
-
diff --git a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Consumer/Consumer_svnt.cpp b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Consumer/Consumer_svnt.cpp
deleted file mode 100644
index c6cb88ae43c..00000000000
--- a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Consumer/Consumer_svnt.cpp
+++ /dev/null
@@ -1,937 +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 "Consumer_svnt.h"
-#include "Cookies.h"
-#include "ciao/Servant_Activator.h"
-#include "ciao/Port_Activator_T.h"
-
-namespace Consumer_Impl
-{
- namespace CIAO_GLUE_EC_Benchmark
- {
- Consumer_Context::Consumer_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- Consumer_Servant *sv)
- : home_ (::Components::CCMHome::_duplicate (home)),
- container_ (c),
- servant_ (sv)
- {
- }
-
- Consumer_Context::~Consumer_Context (void)
- {
- }
-
- // Operations from ::Components::CCMContext.
-
- ::Components::Principal_ptr
- Consumer_Context::get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Principal::_nil ());
- }
-
- ::Components::CCMHome_ptr
- Consumer_Context::get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return ::Components::CCMHome::_duplicate (this->home_.in ());
- }
-
- CORBA::Boolean
- Consumer_Context::get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Transaction::UserTransaction_ptr
- Consumer_Context::get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Transaction::UserTransaction::_nil ());
- }
-
- CORBA::Boolean
- Consumer_Context::is_caller_in_role (
- const char * /* role */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- void
- Consumer_Context::set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW (CORBA::NO_IMPLEMENT ());
- }
-
- // Operations from ::Components::SessionContextinterface.
-
- CORBA::Object_ptr
- Consumer_Context::get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- if (CORBA::is_nil (this->component_.in ()))
- {
- CORBA::Object_var obj =
- this->container_->get_objref (
- this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- this->component_ =
- ::EC_Benchmark::Consumer::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- if (CORBA::is_nil (this->component_.in ()))
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::CORBA::Object::_nil ());
- }
- }
-
- return ::EC_Benchmark::Consumer::_duplicate (
- this->component_.in ());
- }
-
- // Operations for Consumer receptacles and event sources,
- // defined in ::EC_Benchmark::CCM_Consumer_Context.
-
- // CIAO-specific.
-
- ::CIAO::Session_Container *
- Consumer_Context::_ciao_the_Container (void) const
- {
- return this->container_;
- }
-
- Consumer_Context *
- Consumer_Context::_narrow (
- ::Components::SessionContext_ptr p
- ACE_ENV_ARG_DECL_NOT_USED)
- {
- return dynamic_cast<Consumer_Context *> (p);
- }
- }
-
- namespace CIAO_GLUE_EC_Benchmark
- {
- Consumer_Servant::Consumer_Servant (
- ::EC_Benchmark::CCM_Consumer_ptr exe,
- ::Components::CCMHome_ptr h,
- ::CIAO::Session_Container *c)
- : our_base (exe, c)
- {
- this->context_ = new Consumer_Context (h, c, this);
-
- CIAO_REGISTER_OBV_FACTORY (
- ::EC_Benchmark::TimeOut_init,
- ::EC_Benchmark::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;
- }
-
- Consumer_Servant::~Consumer_Servant (void)
- {
- }
-
- void
- Consumer_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);
- }
- }
-
- // Operations for Navigation interface.
-
- CORBA::Object_ptr
- Consumer_Servant::provide_facet (
- const char *name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (name == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::BAD_PARAM (),
- ::CORBA::Object::_nil ());
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::CORBA::Object::_nil ());
- }
-
- ::Components::FacetDescriptions *
- Consumer_Servant::get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- Consumer_Servant::get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- Consumer_Servant::get_named_emitters (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- Consumer_Servant::TimeOutConsumer_timeout_Servant::TimeOutConsumer_timeout_Servant (
- ::EC_Benchmark::CCM_Consumer_ptr executor,
- ::EC_Benchmark::CCM_Consumer_Context_ptr c)
- : executor_ (::EC_Benchmark::CCM_Consumer::_duplicate (executor)),
- ctx_ (::EC_Benchmark::CCM_Consumer_Context::_duplicate (c))
- {
- }
-
- Consumer_Servant::TimeOutConsumer_timeout_Servant::~TimeOutConsumer_timeout_Servant (void)
- {
- }
-
- CORBA::Object_ptr
- Consumer_Servant::TimeOutConsumer_timeout_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
- Consumer_Servant::TimeOutConsumer_timeout_Servant::push_TimeOut (
- ::EC_Benchmark::TimeOut *evt
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->executor_->push_timeout (
- evt
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Inherited from ::Components::EventConsumerBase.
- void
- Consumer_Servant::TimeOutConsumer_timeout_Servant::push_event (
- ::Components::EventBase *ev
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::BadEventType))
- {
- ::EC_Benchmark::TimeOut_var ev_type =
- ::EC_Benchmark::TimeOut::_downcast (ev);
-
- if (ev_type != 0)
- {
- this->push_TimeOut (
- ev_type.in ()
- ACE_ENV_ARG_PARAMETER);
-
- return;
- }
-
- ACE_THROW (::Components::BadEventType ());
- }
-
- ::EC_Benchmark::TimeOutConsumer_ptr
- Consumer_Servant::get_consumer_timeout (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- if (! ::CORBA::is_nil (this->consumes_timeout_.in ()))
- {
- return ::EC_Benchmark::TimeOutConsumer::_duplicate (this->consumes_timeout_.in ());
- }
-
- ::Components::EventConsumerBase_var obj =
- this->get_consumer_timeout_i (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::TimeOutConsumer::_nil ());
-
- ::EC_Benchmark::TimeOutConsumer_var eco =
- ::EC_Benchmark::TimeOutConsumer::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::TimeOutConsumer::_nil ());
-
- this->consumes_timeout_ = eco;
- return ::EC_Benchmark::TimeOutConsumer::_duplicate (this->consumes_timeout_.in ());
- }
-
- ::Components::EventConsumerBase_ptr
- Consumer_Servant::get_consumer_timeout_i (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::Components::EventConsumerBase_ptr ret =
- this->lookup_consumer ("timeout");
-
- if (! ::CORBA::is_nil (ret))
- {
- return ret;
- }
-
- CIAO::Port_Activator_T<
- Consumer_Servant::TimeOutConsumer_timeout_Servant,
- ::EC_Benchmark::CCM_Consumer,
- ::EC_Benchmark::CCM_Consumer_Context,
- Consumer_Servant > *tmp = 0;
-
- typedef CIAO::Port_Activator_T<
- Consumer_Servant::TimeOutConsumer_timeout_Servant,
- ::EC_Benchmark::CCM_Consumer,
- ::EC_Benchmark::CCM_Consumer_Context,
- Consumer_Servant >
- MACRO_MADNESS_TYPEDEF;
-
-
- ACE_NEW_THROW_EX (
- tmp,
- MACRO_MADNESS_TYPEDEF (
- "EC_Benchmark_Consumer_timeout",
- "timeout",
- 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 (
- "EC_Benchmark_Consumer_timeout",
- "IDL:EC_Benchmark/TimeOutConsumer:1.0",
- CIAO::Container::Facet_Consumer
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::TimeOutConsumer::_nil ());
-
- ::Components::EventConsumerBase_var ecb =
- ::Components::EventConsumerBase::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::TimeOutConsumer::_nil ());
-
- this->add_consumer (
- "timeout",
- ecb.in ());
-
- return ecb._retn ();
- }
-
- ::Components::Cookie *
- Consumer_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
- Consumer_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);
- }
-
- ::Components::ConnectionDescriptions *
- Consumer_Servant::get_connections (
- const char * /* name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- Consumer_Servant::get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- Consumer_Servant::get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EventConsumerBase_ptr
- Consumer_Servant::get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (sink_name == 0)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- if (ACE_OS::strcmp (sink_name, "timeout") == 0)
- {
- return this->get_consumer_timeout (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- void
- Consumer_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::EventConsumerBase_ptr
- Consumer_Servant::disconnect_consumer (
- const char * /* source_name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ConsumerDescriptions *
- Consumer_Servant::get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Cookie *
- Consumer_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
- Consumer_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 ());
- }
-
- ::Components::PublisherDescriptions *
- Consumer_Servant::get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::PublisherDescriptions *
- Consumer_Servant::get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- // Operations for CCMObject interface.
-
- void
- Consumer_Servant::component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->component_UUID_ = new_component_UUID;
- }
-
- CIAO::CONNECTION_ID
- Consumer_Servant::component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::string_dup (this->component_UUID_.c_str ());
- }
-
- CORBA::IRObject_ptr
- Consumer_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- Consumer_Servant::configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration))
- {
- // CIAO to-do
- }
-
- void
- Consumer_Servant::remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- // CIAO to-do
- }
-
- CORBA::Object_ptr
- Consumer_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
- Consumer_Servant::populate_port_tables (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var obj_var;
- ::Components::EventConsumerBase_var ecb_var;
-
- ecb_var =
- this->get_consumer_timeout_i (
- ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
-
- namespace CIAO_GLUE_EC_Benchmark
- {
- ConsumerHome_Servant::ConsumerHome_Servant (
- ::EC_Benchmark::CCM_ConsumerHome_ptr exe,
- ::CIAO::Session_Container *c)
- : executor_ (::EC_Benchmark::CCM_ConsumerHome::_duplicate (exe)),
- container_ (c)
- {
- }
-
- ConsumerHome_Servant::~ConsumerHome_Servant (void)
- {
- }
-
- // Home operations.
-
- // Home supported interface operations.
-
- // Home factory and finder operations.
-
- // Home attribute operations.
-
- // Operations for keyless home interface.
-
- ::Components::CCMObject_ptr
- ConsumerHome_Servant::create_component (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- return this->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- // Operations for implicit home interface.
-
- ::EC_Benchmark::Consumer_ptr
- ConsumerHome_Servant::create (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- if (this->executor_.in () == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::EC_Benchmark::Consumer::_nil ());
- }
-
- ::Components::EnterpriseComponent_var _ciao_ec =
- this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Consumer::_nil ());
-
- ::EC_Benchmark::CCM_Consumer_var _ciao_comp =
- ::EC_Benchmark::CCM_Consumer::_narrow (
- _ciao_ec.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Consumer::_nil ());
-
- return this->_ciao_activate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Operations for CCMHome interface.
-
- ::CORBA::IRObject_ptr
- ConsumerHome_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- ::CORBA::IRObject_ptr
- ConsumerHome_Servant::get_home_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- ConsumerHome_Servant::remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- ::EC_Benchmark::Consumer_var _ciao_comp =
- ::EC_Benchmark::Consumer::_narrow (
- comp
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (_ciao_comp.in ()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- _ciao_comp->remove (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->_ciao_passivate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // CIAO-specific operations.
-
- ::EC_Benchmark::Consumer_ptr
- ConsumerHome_Servant::_ciao_activate_component (
- ::EC_Benchmark::CCM_Consumer_ptr exe
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var hobj =
- this->container_->get_objref (
- this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Consumer::_nil ());
-
- ::Components::CCMHome_var home =
- ::Components::CCMHome::_narrow (
- hobj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Consumer::_nil ());
-
- Consumer_Servant *svt =
- new Consumer_Servant (
- exe,
- home.in (),
- this->container_);
-
- PortableServer::ServantBase_var safe (svt);
- PortableServer::ObjectId_var oid;
-
- CORBA::Object_var objref =
- this->container_->install_component (
- svt,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Consumer::_nil ());
-
- ::EC_Benchmark::Consumer_var ho =
- ::EC_Benchmark::Consumer::_narrow (
- objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Consumer::_nil ());
-
- if (this->component_map_.bind (oid.in (), svt) == 0)
- {
- safe._retn ();
- }
-
- return ho._retn ();
- }
-
- void
- ConsumerHome_Servant::_ciao_passivate_component (
- ::EC_Benchmark::Consumer_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- PortableServer::ObjectId_var oid;
-
- this->container_->uninstall_component (
- comp,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- Consumer_Servant *servant = 0;
-
- if (this->component_map_.unbind (oid.in (), servant) == 0)
- {
- PortableServer::ServantBase_var safe (servant);
-
- servant->_ciao_passivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
- }
-
- extern "C" CONSUMER_SVNT_Export ::PortableServer::Servant
- createConsumerHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL)
- {
- if (p == 0)
- {
- return 0;
- }
-
- ::EC_Benchmark::CCM_ConsumerHome_var x =
- ::EC_Benchmark::CCM_ConsumerHome::_narrow (
- p
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (::CORBA::is_nil (x.in ()))
- {
- return 0;
- }
-
- return new
- CIAO_GLUE_EC_Benchmark::ConsumerHome_Servant (
- x.in (),
- c);
- }
-}
-
diff --git a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.cpp b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.cpp
deleted file mode 100644
index ae2ef12c70a..00000000000
--- a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.cpp
+++ /dev/null
@@ -1,922 +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 "Producer_svnt.h"
-#include "Cookies.h"
-#include "ciao/Servant_Activator.h"
-#include "ciao/Port_Activator_T.h"
-
-namespace Producer_Impl
-{
- namespace CIAO_GLUE_EC_Benchmark
- {
- Producer_Context::Producer_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- Producer_Servant *sv)
- : home_ (::Components::CCMHome::_duplicate (home)),
- container_ (c),
- servant_ (sv)
- {
- }
-
- Producer_Context::~Producer_Context (void)
- {
- }
-
- // Operations from ::Components::CCMContext.
-
- ::Components::Principal_ptr
- Producer_Context::get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Principal::_nil ());
- }
-
- ::Components::CCMHome_ptr
- Producer_Context::get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return ::Components::CCMHome::_duplicate (this->home_.in ());
- }
-
- CORBA::Boolean
- Producer_Context::get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Transaction::UserTransaction_ptr
- Producer_Context::get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::Components::Transaction::UserTransaction::_nil ());
- }
-
- CORBA::Boolean
- Producer_Context::is_caller_in_role (
- const char * /* role */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
- }
-
- void
- Producer_Context::set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- ACE_THROW (CORBA::NO_IMPLEMENT ());
- }
-
- // Operations from ::Components::SessionContextinterface.
-
- CORBA::Object_ptr
- Producer_Context::get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState))
- {
- if (CORBA::is_nil (this->component_.in ()))
- {
- CORBA::Object_var obj =
- this->container_->get_objref (
- this->servant_
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- this->component_ =
- ::EC_Benchmark::Producer::_narrow (
- obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
-
- if (CORBA::is_nil (this->component_.in ()))
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::CORBA::Object::_nil ());
- }
- }
-
- return ::EC_Benchmark::Producer::_duplicate (
- this->component_.in ());
- }
-
- // Operations for Producer receptacles and event sources,
- // defined in ::EC_Benchmark::CCM_Producer_Context.
-
- void
- Producer_Context::push_timeout (
- ::EC_Benchmark::TimeOut *ev
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_CString my_uuid = this->servant_->component_UUID (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- my_uuid += "_data_available_publisher";
-
- this->container_->push_event (ev,
- my_uuid.c_str ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- /*
- ACE_Active_Map_Manager<
- ::EC_Benchmark::TimeOutConsumer_var>::iterator end =
- this->ciao_publishes_timeout_map_.end ();
-
- for (ACE_Active_Map_Manager<
- ::EC_Benchmark::TimeOutConsumer_var>::iterator iter =
- this->ciao_publishes_timeout_map_.begin ();
- iter != end;
- ++iter)
- {
- ACE_Active_Map_Manager<
- ::EC_Benchmark::TimeOutConsumer_var>::ENTRY &entry = *iter;
-
- ::EC_Benchmark::TimeOutConsumer_var c =
- ::EC_Benchmark::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 *
- Producer_Context::subscribe_timeout (
- ::EC_Benchmark::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);
- }
-
- ::EC_Benchmark::TimeOutConsumer_var sub =
- ::EC_Benchmark::TimeOutConsumer::_duplicate (c);
-
- ACE_Active_Map_Manager_Key key;
- this->ciao_publishes_timeout_map_.bind (sub.in (), key);
- sub._retn ();
-
- ::Components::Cookie_var retv = new ::CIAO::Map_Key_Cookie (key);
- return retv._retn ();
- }
-
- ::EC_Benchmark::TimeOutConsumer_ptr
- Producer_Context::unsubscribe_timeout (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection))
- {
- ::EC_Benchmark::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 (),
- ::EC_Benchmark::TimeOutConsumer::_nil ());
- }
-
- if (this->ciao_publishes_timeout_map_.unbind (key, retv) != 0)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidConnection (),
- ::EC_Benchmark::TimeOutConsumer::_nil ());
- }
-
- return retv._retn ();
- }
-
- // CIAO-specific.
-
- ::CIAO::Session_Container *
- Producer_Context::_ciao_the_Container (void) const
- {
- return this->container_;
- }
-
- Producer_Context *
- Producer_Context::_narrow (
- ::Components::SessionContext_ptr p
- ACE_ENV_ARG_DECL_NOT_USED)
- {
- return dynamic_cast<Producer_Context *> (p);
- }
- }
-
- namespace CIAO_GLUE_EC_Benchmark
- {
- Producer_Servant::Producer_Servant (
- ::EC_Benchmark::CCM_Producer_ptr exe,
- ::Components::CCMHome_ptr h,
- ::CIAO::Session_Container *c)
- : our_base (exe, c)
- {
- this->context_ = new Producer_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;
- }
-
- Producer_Servant::~Producer_Servant (void)
- {
- }
-
- void
- Producer_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);
- }
- }
-
- // Operations for Navigation interface.
-
- CORBA::Object_ptr
- Producer_Servant::provide_facet (
- const char *name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (name == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::BAD_PARAM (),
- ::CORBA::Object::_nil ());
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::CORBA::Object::_nil ());
- }
-
- ::Components::FacetDescriptions *
- Producer_Servant::get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- Producer_Servant::get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EmitterDescriptions *
- Producer_Servant::get_named_emitters (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Cookie *
- Producer_Servant::subscribe_timeout (
- ::EC_Benchmark::TimeOutConsumer_ptr c
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit))
- {
- return this->context_->subscribe_timeout (
- c
- ACE_ENV_ARG_PARAMETER);
- }
-
- ::EC_Benchmark::TimeOutConsumer_ptr
- Producer_Servant::unsubscribe_timeout (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection))
- {
- return this->context_->unsubscribe_timeout (
- ck
- ACE_ENV_ARG_PARAMETER);
- }
-
- ::Components::Cookie *
- Producer_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
- Producer_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);
- }
-
- ::Components::ConnectionDescriptions *
- Producer_Servant::get_connections (
- const char * /* name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- Producer_Servant::get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ReceptacleDescriptions *
- Producer_Servant::get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::EventConsumerBase_ptr
- Producer_Servant::get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- if (sink_name == 0)
- {
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- void
- Producer_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::EventConsumerBase_ptr
- Producer_Servant::disconnect_consumer (
- const char * /* source_name */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::ConsumerDescriptions *
- Producer_Servant::get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::Cookie *
- Producer_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, "timeout") == 0)
- {
- ::EC_Benchmark::TimeOutConsumer_var _ciao_consumer =
- ::EC_Benchmark::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_timeout (
- _ciao_consumer.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (::Components::InvalidName (), 0);
- }
-
- ::Components::EventConsumerBase_ptr
- Producer_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, "timeout") == 0)
- {
- return this->unsubscribe_timeout (
- ck
- ACE_ENV_ARG_PARAMETER);
- }
-
- ACE_THROW_RETURN (
- ::Components::InvalidName (),
- ::Components::EventConsumerBase::_nil ());
- }
-
- ::Components::PublisherDescriptions *
- Producer_Servant::get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- ::Components::PublisherDescriptions *
- Producer_Servant::get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName))
- {
- ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0);
- }
-
- // Operations for CCMObject interface.
-
- void
- Producer_Servant::component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- this->component_UUID_ = new_component_UUID;
- }
-
- CIAO::CONNECTION_ID
- Producer_Servant::component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- return CORBA::string_dup (this->component_UUID_.c_str ());
- }
-
- CORBA::IRObject_ptr
- Producer_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- Producer_Servant::configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration))
- {
- // CIAO to-do
- }
-
- void
- Producer_Servant::remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- // CIAO to-do
- }
-
- CORBA::Object_ptr
- Producer_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
- Producer_Servant::populate_port_tables (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var obj_var;
- ::Components::EventConsumerBase_var ecb_var;
- }
- }
-
- namespace CIAO_GLUE_EC_Benchmark
- {
- ProducerHome_Servant::ProducerHome_Servant (
- ::EC_Benchmark::CCM_ProducerHome_ptr exe,
- ::CIAO::Session_Container *c)
- : executor_ (::EC_Benchmark::CCM_ProducerHome::_duplicate (exe)),
- container_ (c)
- {
- }
-
- ProducerHome_Servant::~ProducerHome_Servant (void)
- {
- }
-
- // Home operations.
-
- // Home supported interface operations.
-
- // Home factory and finder operations.
-
- // Home attribute operations.
-
- // Operations for keyless home interface.
-
- ::Components::CCMObject_ptr
- ProducerHome_Servant::create_component (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- return this->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- }
-
- // Operations for implicit home interface.
-
- ::EC_Benchmark::Producer_ptr
- ProducerHome_Servant::create (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure))
- {
- if (this->executor_.in () == 0)
- {
- ACE_THROW_RETURN (
- ::CORBA::INTERNAL (),
- ::EC_Benchmark::Producer::_nil ());
- }
-
- ::Components::EnterpriseComponent_var _ciao_ec =
- this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Producer::_nil ());
-
- ::EC_Benchmark::CCM_Producer_var _ciao_comp =
- ::EC_Benchmark::CCM_Producer::_narrow (
- _ciao_ec.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Producer::_nil ());
-
- return this->_ciao_activate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // Operations for CCMHome interface.
-
- ::CORBA::IRObject_ptr
- ProducerHome_Servant::get_component_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- ::CORBA::IRObject_ptr
- ProducerHome_Servant::get_home_def (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_THROW_RETURN (
- ::CORBA::NO_IMPLEMENT (),
- ::CORBA::IRObject::_nil ());
- }
-
- void
- ProducerHome_Servant::remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure))
- {
- ::EC_Benchmark::Producer_var _ciao_comp =
- ::EC_Benchmark::Producer::_narrow (
- comp
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (_ciao_comp.in ()))
- {
- ACE_THROW (CORBA::INTERNAL ());
- }
-
- _ciao_comp->remove (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
-
- this->_ciao_passivate_component (
- _ciao_comp.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- // CIAO-specific operations.
-
- ::EC_Benchmark::Producer_ptr
- ProducerHome_Servant::_ciao_activate_component (
- ::EC_Benchmark::CCM_Producer_ptr exe
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ::CORBA::Object_var hobj =
- this->container_->get_objref (
- this
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Producer::_nil ());
-
- ::Components::CCMHome_var home =
- ::Components::CCMHome::_narrow (
- hobj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Producer::_nil ());
-
- Producer_Servant *svt =
- new Producer_Servant (
- exe,
- home.in (),
- this->container_);
-
- PortableServer::ServantBase_var safe (svt);
- PortableServer::ObjectId_var oid;
-
- CORBA::Object_var objref =
- this->container_->install_component (
- svt,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Producer::_nil ());
-
- ::EC_Benchmark::Producer_var ho =
- ::EC_Benchmark::Producer::_narrow (
- objref.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (::EC_Benchmark::Producer::_nil ());
-
- if (this->component_map_.bind (oid.in (), svt) == 0)
- {
- safe._retn ();
- }
-
- return ho._retn ();
- }
-
- void
- ProducerHome_Servant::_ciao_passivate_component (
- ::EC_Benchmark::Producer_ptr comp
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((CORBA::SystemException))
- {
- PortableServer::ObjectId_var oid;
-
- this->container_->uninstall_component (
- comp,
- oid.out ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- Producer_Servant *servant = 0;
-
- if (this->component_map_.unbind (oid.in (), servant) == 0)
- {
- PortableServer::ServantBase_var safe (servant);
-
- servant->_ciao_passivate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
- }
- }
- }
-
- extern "C" PRODUCER_SVNT_Export ::PortableServer::Servant
- createProducerHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL)
- {
- if (p == 0)
- {
- return 0;
- }
-
- ::EC_Benchmark::CCM_ProducerHome_var x =
- ::EC_Benchmark::CCM_ProducerHome::_narrow (
- p
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
-
- if (::CORBA::is_nil (x.in ()))
- {
- return 0;
- }
-
- return new
- CIAO_GLUE_EC_Benchmark::ProducerHome_Servant (
- x.in (),
- c);
- }
-}
-
diff --git a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.h b/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.h
deleted file mode 100644
index b15684c392e..00000000000
--- a/TAO/CIAO/DAnCE/examples/EC_Benchmark/Producer/Producer_svnt.h
+++ /dev/null
@@ -1,514 +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_PRODUCER_SVNT_H
-#define CIAO_GLUE_SESSION_PRODUCER_SVNT_H
-
-#include /**/ "ace/pre.h"
-
-#include "ProducerEC.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ciao/Container_Base.h"
-#include "ciao/Servant_Impl_T.h"
-#include "tao/LocalObject.h"
-#include "tao/PortableServer/Key_Adapters.h"
-#include "ace/Active_Map_Manager_T.h"
-
-#include "ProducerS.h"
-
-namespace Producer_Impl
-{
- namespace CIAO_GLUE_EC_Benchmark
- {
- class PRODUCER_SVNT_Export Producer_Context
- : public virtual ::EC_Benchmark::CCM_Producer_Context,
- public virtual TAO_Local_RefCounted_Object
- {
- public:
- // We will allow the servant glue code we generate to access our state.
- friend class Producer_Servant;
-
- Producer_Context (
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c,
- Producer_Servant *sv);
-
- virtual ~Producer_Context (void);
-
- // Operations from ::Components::CCMContext.
-
- virtual ::Components::Principal_ptr
- get_caller_principal (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::CCMHome_ptr
- get_CCM_home (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::Boolean
- get_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- virtual ::Components::Transaction::UserTransaction_ptr
- get_user_transaction (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- virtual CORBA::Boolean
- is_caller_in_role (
- const char *role
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- set_rollback_only (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- // Operations from ::Components::SessionContext interface.
-
- virtual CORBA::Object_ptr
- get_CCM_object (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::IllegalState));
-
- // Operations for Producer receptacles and event sources,
- // defined in ::EC_Benchmark::CCM_Producer_Context.
-
- virtual void
- push_timeout (
- ::EC_Benchmark::TimeOut *ev
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- // CIAO-specific.
-
- ::CIAO::Session_Container *
- _ciao_the_Container (void) const;
-
- static Producer_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_timeout (
- ::EC_Benchmark::TimeOutConsumer_ptr c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit));
-
- virtual ::EC_Benchmark::TimeOutConsumer_ptr
- unsubscribe_timeout (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection));
-
- protected:
- ACE_Active_Map_Manager<
- ::EC_Benchmark::TimeOutConsumer_var>
- ciao_publishes_timeout_map_;
-
- ::Components::CCMHome_var home_;
- ::CIAO::Session_Container *container_;
-
- Producer_Servant *servant_;
- ::EC_Benchmark::Producer_var component_;
- };
- }
-
- namespace CIAO_GLUE_EC_Benchmark
- {
- class PRODUCER_SVNT_Export Producer_Servant
- : public virtual CIAO::Servant_Impl<
- POA_EC_Benchmark::Producer,
- ::EC_Benchmark::CCM_Producer,
- ::EC_Benchmark::CCM_Producer_var,
- Producer_Context
- >,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- /// Hack for VC6 the most sucky compiler
- typedef CIAO::Servant_Impl<
- POA_EC_Benchmark::Producer,
- ::EC_Benchmark::CCM_Producer,
- ::EC_Benchmark::CCM_Producer_var,
- Producer_Context
- > our_base;
-
- Producer_Servant (
- ::EC_Benchmark::CCM_Producer_ptr executor,
- ::Components::CCMHome_ptr home,
- ::CIAO::Session_Container *c);
-
- virtual ~Producer_Servant (void);
-
- virtual void
- set_attributes (
- const ::Components::ConfigValues &descr
- ACE_ENV_ARG_DECL);
-
- // Supported operations.
-
- // Public port operations.
-
- virtual ::Components::Cookie *
- subscribe_timeout (
- ::EC_Benchmark::TimeOutConsumer_ptr c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::ExceededConnectionLimit));
-
- virtual ::EC_Benchmark::TimeOutConsumer_ptr
- unsubscribe_timeout (
- ::Components::Cookie *ck
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConnection));
-
- // Component attribute operations.
-
- // Operations for Navigation interface.
-
- virtual CORBA::Object_ptr
- provide_facet (
- const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::FacetDescriptions *
- get_named_facets (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // 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));
-
- virtual ::Components::ConnectionDescriptions *
- get_connections (
- const char *name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::ReceptacleDescriptions *
- get_all_receptacles (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::ReceptacleDescriptions *
- get_named_receptacles (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // Operations for Events interface.
-
- virtual ::Components::EventConsumerBase_ptr
- get_consumer (
- const char *sink_name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- 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));
-
- virtual ::Components::EventConsumerBase_ptr
- disconnect_consumer (
- const char *source_name
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName,
- ::Components::NoConnection));
-
- virtual ::Components::ConsumerDescriptions *
- get_named_consumers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::EmitterDescriptions *
- get_all_emitters (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::EmitterDescriptions *
- get_named_emitters(
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- virtual ::Components::PublisherDescriptions *
- get_all_publishers (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::Components::PublisherDescriptions *
- get_named_publishers (
- const ::Components::NameList & /* names */
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidName));
-
- // Operations for CCMObject interface.
-
- virtual void
- component_UUID (
- const char * new_component_UUID
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CIAO::CONNECTION_ID
- component_UUID (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual CORBA::IRObject_ptr
- get_component_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- configuration_complete (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::InvalidConfiguration));
-
- virtual void
- remove (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure));
-
- // 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));
-
- ACE_CString component_UUID_;
- };
- }
-
- namespace CIAO_GLUE_EC_Benchmark
- {
- class PRODUCER_SVNT_Export ProducerHome_Servant
- : public virtual POA_EC_Benchmark::ProducerHome,
- public virtual PortableServer::RefCountServantBase
- {
- public:
- ProducerHome_Servant (
- ::EC_Benchmark::CCM_ProducerHome_ptr exe,
- ::CIAO::Session_Container *c);
- virtual ~ProducerHome_Servant (void);
-
- // Home operations.
-
- // Home factory and finder operations.
-
- // Attribute operations.
-
- // Operations for keyless home interface.
-
- virtual ::Components::CCMObject_ptr
- create_component (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure));
-
- // Operations for implicit home interface.
-
- virtual ::EC_Benchmark::Producer_ptr
- create (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::CreateFailure));
-
- // Operations for CCMHome interface.
-
- virtual ::CORBA::IRObject_ptr
- get_component_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual ::CORBA::IRObject_ptr
- get_home_def (
- ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void
- remove_component (
- ::Components::CCMObject_ptr comp
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((
- ::CORBA::SystemException,
- ::Components::RemoveFailure));
-
- // Supported operations.
-
- protected:
- // CIAO-specific operations.
-
- ::EC_Benchmark::Producer_ptr
- _ciao_activate_component (
- ::EC_Benchmark::CCM_Producer_ptr exe
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- void
- _ciao_passivate_component (
- ::EC_Benchmark::Producer_ptr comp
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- protected:
- ::EC_Benchmark::CCM_ProducerHome_var
- executor_;
-
- ::CIAO::Session_Container *
- container_;
-
- ACE_Hash_Map_Manager_Ex<
- PortableServer::ObjectId,
- Producer_Servant *,
- TAO_ObjectId_Hash,
- ACE_Equal_To<PortableServer::ObjectId>,
- ACE_SYNCH_MUTEX>
- component_map_;
- };
-
- extern "C" PRODUCER_SVNT_Export ::PortableServer::Servant
- createProducerHome_Servant (
- ::Components::HomeExecutorBase_ptr p,
- CIAO::Session_Container *c
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- }
-}
-
-#include /**/ "ace/post.h"
-
-#endif /* CIAO_GLUE_SESSION_PRODUCER_SVNT_H */
-