diff options
Diffstat (limited to 'TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp')
-rw-r--r-- | TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp | 67 |
1 files changed, 22 insertions, 45 deletions
diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp index 866c8a9e1a3..5e64a573392 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/lib/ProxyPushSupplier_i.cpp @@ -30,12 +30,11 @@ public: ~TAO_CosEC_PushConsumerWrapper (void); // Destructor. - virtual void push (const RtecEventComm::EventSet & data - ACE_ENV_ARG_DECL) + virtual void push (const RtecEventComm::EventSet & data) ACE_THROW_SPEC ((CORBA::SystemException)); // This method is called by the RTEvent Channel to supply data. - virtual void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL) + virtual void disconnect_push_consumer (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Disconnects the consumer from the event channel. @@ -61,48 +60,38 @@ TAO_CosEC_PushConsumerWrapper::~TAO_CosEC_PushConsumerWrapper () } void -TAO_CosEC_PushConsumerWrapper::push (const RtecEventComm::EventSet& set - ACE_ENV_ARG_DECL) +TAO_CosEC_PushConsumerWrapper::push (const RtecEventComm::EventSet& set) ACE_THROW_SPEC ((CORBA::SystemException)) { for (CORBA::ULong i = 0; i < set.length (); ++i) { - ACE_TRY + try { - this->consumer_->push (set[i].data.any_value - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + this->consumer_->push (set[i].data.any_value); } - ACE_CATCHANY + catch (const CORBA::Exception&) { // Ignore the exception... } - ACE_ENDTRY; } } void -TAO_CosEC_PushConsumerWrapper::disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL) +TAO_CosEC_PushConsumerWrapper::disconnect_push_consumer (void) ACE_THROW_SPEC ((CORBA::SystemException)) { // Deactivate the supplier proxy. - this->consumer_->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->consumer_->disconnect_push_consumer (); PortableServer::POA_var poa = - this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->_default_POA (); PortableServer::ObjectId_var id = - poa->servant_to_id (this - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + poa->servant_to_id (this); - poa->deactivate_object (id.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + poa->deactivate_object (id.in ()); // @@ If we keep a list remember to remove this object from the // list. @@ -124,64 +113,52 @@ TAO_CosEC_ProxyPushSupplier_i::~TAO_CosEC_ProxyPushSupplier_i (void) } void -TAO_CosEC_ProxyPushSupplier_i::disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL) +TAO_CosEC_ProxyPushSupplier_i::disconnect_push_supplier (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->pps_->disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->pps_->disconnect_push_supplier (); // Deactivate the supplier proxy PortableServer::POA_var poa = - this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->_default_POA (); PortableServer::ObjectId_var id = - poa->servant_to_id (this - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + poa->servant_to_id (this); - poa->deactivate_object (id.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + poa->deactivate_object (id.in ()); // @@ If we keep a list remember to remove this object from the // list. } void -TAO_CosEC_ProxyPushSupplier_i::connect_push_consumer (CosEventComm::PushConsumer_ptr push_consumer - ACE_ENV_ARG_DECL) +TAO_CosEC_ProxyPushSupplier_i::connect_push_consumer (CosEventComm::PushConsumer_ptr push_consumer) ACE_THROW_SPEC ((CORBA::SystemException, CosEventChannelAdmin::AlreadyConnected, CosEventChannelAdmin::TypeError)) { if (this->connected ()) - ACE_THROW (CosEventChannelAdmin::AlreadyConnected ()); + throw CosEventChannelAdmin::AlreadyConnected (); if (push_consumer == CosEventComm::PushConsumer::_nil()) - ACE_THROW (CORBA::BAD_PARAM ()); + throw CORBA::BAD_PARAM (); TAO_CosEC_PushConsumerWrapper *wrapper; ACE_NEW_THROW_EX (wrapper, TAO_CosEC_PushConsumerWrapper (push_consumer), CORBA::NO_MEMORY ()); - ACE_CHECK; auto_ptr <TAO_CosEC_PushConsumerWrapper> auto_wrapper (wrapper); // @@ This code is not exception safe. RtecEventComm::PushConsumer_ptr rtecpushconsumer = - auto_wrapper.get ()->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + auto_wrapper.get ()->_this (); // give the ownership to the POA. - auto_wrapper.get ()->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + auto_wrapper.get ()->_remove_ref (); this->pps_->connect_push_consumer (rtecpushconsumer, - this->qos_ - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + this->qos_); this->wrapper_ = auto_wrapper.release (); } |