diff options
Diffstat (limited to 'TAO/orbsvcs/examples/CosEC/RtEC_Based/tests')
11 files changed, 185 insertions, 185 deletions
diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Basic.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Basic.cpp index 9f849ec75bc..99589e9178e 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Basic.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Basic.cpp @@ -9,16 +9,16 @@ main (int argc, char *argv []) { Basic basic; - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { - basic.init (argc, argv, ACE_TRY_ENV); + basic.init (argc, argv TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - basic.run (ACE_TRY_ENV); + basic.run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - basic.shutdown (ACE_TRY_ENV); + basic.shutdown (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCH (CORBA::UserException, ue) @@ -50,29 +50,29 @@ Basic::~Basic (void) } void -Basic::init (int argc, char *argv[], - CORBA::Environment &ACE_TRY_ENV) +Basic::init (int argc, char *argv[] + TAO_ENV_ARG_DECL) { - this->init_ORB (argc, argv, ACE_TRY_ENV); + this->init_ORB (argc, argv TAO_ENV_ARG_PARAMETER); ACE_CHECK; - this->init_CosEC (ACE_TRY_ENV); + this->init_CosEC (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } void -Basic::init_ORB (int argc, char *argv [], - CORBA::Environment &ACE_TRY_ENV) +Basic::init_ORB (int argc, char *argv [] + TAO_ENV_ARG_DECL) { this->orb_ = CORBA::ORB_init (argc, argv, - "", - ACE_TRY_ENV); + "" + TAO_ENV_ARG_PARAMETER); ACE_CHECK; CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA", - ACE_TRY_ENV); + this->orb_->resolve_initial_references("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_CHECK; if (CORBA::is_nil (poa_object.in ())) @@ -80,20 +80,20 @@ Basic::init_ORB (int argc, char *argv [], " (%P|%t) Unable to initialize the POA.\n")); root_poa_ = - PortableServer::POA::_narrow (poa_object.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (poa_object.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; PortableServer::POAManager_var poa_manager = - root_poa_->the_POAManager (ACE_TRY_ENV); + root_poa_->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - poa_manager->activate (ACE_TRY_ENV); + poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } void -Basic::init_CosEC (CORBA::Environment &ACE_TRY_ENV) +Basic::init_CosEC (TAO_ENV_SINGLE_ARG_DECL) { CosEC_ServantBase *ec = 0; @@ -106,11 +106,11 @@ Basic::init_CosEC (CORBA::Environment &ACE_TRY_ENV) ec->init (this->root_poa_.in(), this->root_poa_.in(), - 0,0,0, - ACE_TRY_ENV); + 0,0,0 + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - int retval = ec->activate (ACE_TRY_ENV); + int retval = ec->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; if (retval == -1) @@ -118,39 +118,39 @@ Basic::init_CosEC (CORBA::Environment &ACE_TRY_ENV) // @@ look for more descriptive exception to throw here CORBA::Object_var obj = - this->root_poa_->servant_to_reference (ec, ACE_TRY_ENV); + this->root_poa_->servant_to_reference (ec TAO_ENV_ARG_PARAMETER); ACE_CHECK; this->cos_ec_ = - CosEventChannelAdmin::EventChannel::_narrow (obj._retn (), - ACE_TRY_ENV); + CosEventChannelAdmin::EventChannel::_narrow (obj._retn () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Basic::run (CORBA::Environment &ACE_TRY_ENV) +Basic::run (TAO_ENV_SINGLE_ARG_DECL) { // Create an Any type to pass to the Cos EC. CORBA::Any any; any <<= (CORBA::Long)50; this->consumer_.open (this->cos_ec_.in (), - this->orb_.in (), - ACE_TRY_ENV); + this->orb_.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - this->consumer_.connect (ACE_TRY_ENV); + this->consumer_.connect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->supplier_.open (this->cos_ec_.in (), - ACE_TRY_ENV); + this->supplier_.open (this->cos_ec_.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - this->supplier_.connect (ACE_TRY_ENV); + this->supplier_.connect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->supplier_.send_event (any, - ACE_TRY_ENV); + this->supplier_.send_event (any + TAO_ENV_ARG_PARAMETER); ACE_CHECK; // this->orb_->run (); @@ -163,14 +163,14 @@ Basic::run (CORBA::Environment &ACE_TRY_ENV) } void -Basic::shutdown (CORBA::Environment &ACE_TRY_ENV) +Basic::shutdown (TAO_ENV_SINGLE_ARG_DECL) { - this->supplier_.close (ACE_TRY_ENV); + this->supplier_.close (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->consumer_.close (ACE_TRY_ENV); + this->consumer_.close (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->cos_ec_->destroy (ACE_TRY_ENV); + this->cos_ec_->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Basic.h b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Basic.h index 7003df0dc61..d504ea9ddc7 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Basic.h +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Basic.h @@ -36,23 +36,23 @@ public: ~Basic (void); // Destructor. - void init (int argc, char *argv[],CORBA::Environment &ACE_TRY_ENV); + void init (int argc, char *argv[] TAO_ENV_ARG_DECL); // Starts up an ORB and the CosEC. // Returns 0 on success, -1 on error. - void run (CORBA::Environment &ACE_TRY_ENV); + void run (TAO_ENV_SINGLE_ARG_DECL); // Connects a consumer and a supplier to the CosEC and sends 1 event // across. - void shutdown (CORBA::Environment &ACE_TRY_ENV); + void shutdown (TAO_ENV_SINGLE_ARG_DECL); // Closes down the CosEC. private: - void init_ORB (int argc, char *argv[], CORBA::Environment &ACE_TRY_ENV); + void init_ORB (int argc, char *argv[] TAO_ENV_ARG_DECL); // initializes the ORB. // Returns 0 on success, -1 on error. - void init_CosEC (CORBA::Environment &ACE_TRY_ENV); + void init_CosEC (TAO_ENV_SINGLE_ARG_DECL); // initializes the COS EC. // Returns 0 on success, -1 on error. diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Consumer.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Consumer.cpp index 44bdfb9e7fd..7b31e7d4f58 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Consumer.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Consumer.cpp @@ -5,21 +5,21 @@ void Consumer::open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::ORB_ptr orb, - CORBA::Environment& ACE_TRY_ENV) + CORBA::ORB_ptr orb + TAO_ENV_ARG_DECL) { this->orb_ = orb; // = Connect as a consumer. this->consumer_admin_ = - event_channel->for_consumers (ACE_TRY_ENV); + event_channel->for_consumers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } void -Consumer::close (CORBA::Environment &ACE_TRY_ENV) +Consumer::close (TAO_ENV_SINGLE_ARG_DECL) { - this->disconnect (ACE_TRY_ENV); + this->disconnect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->consumer_admin_ = @@ -27,32 +27,32 @@ Consumer::close (CORBA::Environment &ACE_TRY_ENV) } void -Consumer::connect (CORBA::Environment &ACE_TRY_ENV) +Consumer::connect (TAO_ENV_SINGLE_ARG_DECL) { if (CORBA::is_nil (this->consumer_admin_.in ())) return; CosEventComm::PushConsumer_var objref = - this->_this (ACE_TRY_ENV); + this->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->supplier_proxy_ = - this->consumer_admin_->obtain_push_supplier (ACE_TRY_ENV); + this->consumer_admin_->obtain_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->supplier_proxy_->connect_push_consumer (objref.in (), - ACE_TRY_ENV); + this->supplier_proxy_->connect_push_consumer (objref.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Consumer::disconnect (CORBA::Environment &ACE_TRY_ENV) +Consumer::disconnect (TAO_ENV_SINGLE_ARG_DECL) { if (CORBA::is_nil (this->supplier_proxy_.in ()) || CORBA::is_nil (this->consumer_admin_.in ())) return; - this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); + this->supplier_proxy_->disconnect_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->supplier_proxy_ = @@ -60,8 +60,8 @@ Consumer::disconnect (CORBA::Environment &ACE_TRY_ENV) } void -Consumer::push (const CORBA::Any &, - CORBA::Environment &) +Consumer::push (const CORBA::Any & + TAO_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC (( CORBA::SystemException, CosEventComm::Disconnected @@ -74,7 +74,7 @@ Consumer::push (const CORBA::Any &, } void -Consumer::disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV) +Consumer::disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -82,15 +82,15 @@ Consumer::disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV) // Deactivate this object. PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); + this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; PortableServer::ObjectId_var id = - poa->servant_to_id (this, - ACE_TRY_ENV); + poa->servant_to_id (this + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - poa->deactivate_object (id.in (), - ACE_TRY_ENV); + poa->deactivate_object (id.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Consumer.h b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Consumer.h index b6fc3584905..9c66fc562eb 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Consumer.h +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Consumer.h @@ -33,29 +33,29 @@ class Consumer : public POA_CosEventComm::PushConsumer public: void open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::ORB_ptr orb, - CORBA::Environment& ACE_TRY_ENV); + CORBA::ORB_ptr orb + TAO_ENV_ARG_DECL); // This method connects the consumer to the EC. - void close (CORBA::Environment &ACE_TRY_ENV); + void close (TAO_ENV_SINGLE_ARG_DECL); // Disconnect from the EC. - void connect (CORBA::Environment &ACE_TRY_ENV); + void connect (TAO_ENV_SINGLE_ARG_DECL); // Connect the Consumer to the EventChannel. - void disconnect (CORBA::Environment &ACE_TRY_ENV); + void disconnect (TAO_ENV_SINGLE_ARG_DECL); // Disconnect from the supplier, but do not forget about it or close // it. - virtual void push (const CORBA::Any &data, - CORBA::Environment &ACE_TRY_ENV) + virtual void push (const CORBA::Any &data + TAO_ENV_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException, CosEventComm::Disconnected )); // push the event to the consumer. - virtual void disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV) + virtual void disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException )); diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Supplier.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Supplier.cpp index 903fd57b924..3293d16514d 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Supplier.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Supplier.cpp @@ -4,19 +4,19 @@ #include "Supplier.h" void -Supplier::open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment& ACE_TRY_ENV) +Supplier::open (CosEventChannelAdmin::EventChannel_ptr event_channel + TAO_ENV_ARG_DECL) { // = Connect as a consumer. this->supplier_admin_ = - event_channel->for_suppliers (ACE_TRY_ENV); + event_channel->for_suppliers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } void -Supplier::close (CORBA::Environment &ACE_TRY_ENV) +Supplier::close (TAO_ENV_SINGLE_ARG_DECL) { - this->disconnect (ACE_TRY_ENV); + this->disconnect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->supplier_admin_ = @@ -24,31 +24,31 @@ Supplier::close (CORBA::Environment &ACE_TRY_ENV) } void -Supplier::connect (CORBA::Environment &ACE_TRY_ENV) +Supplier::connect (TAO_ENV_SINGLE_ARG_DECL) { if (CORBA::is_nil (this->supplier_admin_.in ())) return; this->consumer_proxy_ = - this->supplier_admin_->obtain_push_consumer (ACE_TRY_ENV); + this->supplier_admin_->obtain_push_consumer (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - CosEventComm::PushSupplier_var objref = this->_this (ACE_TRY_ENV); + CosEventComm::PushSupplier_var objref = this->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->consumer_proxy_->connect_push_supplier (objref.in (), - ACE_TRY_ENV); + this->consumer_proxy_->connect_push_supplier (objref.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Supplier::disconnect (CORBA::Environment &ACE_TRY_ENV) +Supplier::disconnect (TAO_ENV_SINGLE_ARG_DECL) { if (CORBA::is_nil (this->consumer_proxy_.in ()) || CORBA::is_nil (this->supplier_admin_.in ())) return; - this->consumer_proxy_->disconnect_push_consumer (ACE_TRY_ENV); + this->consumer_proxy_->disconnect_push_consumer (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->consumer_proxy_ = @@ -56,15 +56,15 @@ Supplier::disconnect (CORBA::Environment &ACE_TRY_ENV) } void -Supplier::send_event (const CORBA::Any & data, - CORBA::Environment &ACE_TRY_ENV) +Supplier::send_event (const CORBA::Any & data + TAO_ENV_ARG_DECL) { - this->consumer_proxy_->push (data, ACE_TRY_ENV); + this->consumer_proxy_->push (data TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Supplier::disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV) +Supplier::disconnect_push_supplier (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -72,15 +72,15 @@ Supplier::disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV) // Deactivate this object. PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); + this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; PortableServer::ObjectId_var id = - poa->servant_to_id (this, - ACE_TRY_ENV); + poa->servant_to_id (this + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - poa->deactivate_object (id.in (), - ACE_TRY_ENV); + poa->deactivate_object (id.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Supplier.h b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Supplier.h index 90a0bea70e9..7e96e452ddb 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Supplier.h +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Basic/Supplier.h @@ -31,23 +31,23 @@ class Supplier : public POA_CosEventComm::PushSupplier // The Supplier is a simple Push Supplier that connects to // the CosEC and sends events to it. public: - void open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment &ACE_TRY_ENV); + void open (CosEventChannelAdmin::EventChannel_ptr event_channel + TAO_ENV_ARG_DECL); // This method connects the supplier to the EC. - void close (CORBA::Environment &ACE_TRY_ENV); + void close (TAO_ENV_SINGLE_ARG_DECL); // Disconnect from the EC. - void connect (CORBA::Environment &ACE_TRY_ENV); + void connect (TAO_ENV_SINGLE_ARG_DECL); - void disconnect (CORBA::Environment &ACE_TRY_ENV); + void disconnect (TAO_ENV_SINGLE_ARG_DECL); // Disconnect from the EC, but do not forget about it or close it. - void send_event (const CORBA::Any &data, - CORBA::Environment &ACE_TRY_ENV); + void send_event (const CORBA::Any &data + TAO_ENV_ARG_DECL); // Send one event. - virtual void disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV) + virtual void disconnect_push_supplier (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException )); diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Consumer.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Consumer.cpp index 75634dcfc3c..cb2a02f80c8 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Consumer.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Consumer.cpp @@ -44,19 +44,19 @@ Consumer::parse_args (int argc, char *argv []) } void -Consumer::open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment& ACE_TRY_ENV) +Consumer::open (CosEventChannelAdmin::EventChannel_ptr event_channel + TAO_ENV_ARG_DECL) { // = Connect as a consumer. this->consumer_admin_ = - event_channel->for_consumers (ACE_TRY_ENV); + event_channel->for_consumers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } void -Consumer::close (CORBA::Environment &ACE_TRY_ENV) +Consumer::close (TAO_ENV_SINGLE_ARG_DECL) { - this->disconnect (ACE_TRY_ENV); + this->disconnect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->consumer_admin_ = @@ -64,32 +64,32 @@ Consumer::close (CORBA::Environment &ACE_TRY_ENV) } void -Consumer::connect (CORBA::Environment &ACE_TRY_ENV) +Consumer::connect (TAO_ENV_SINGLE_ARG_DECL) { if (CORBA::is_nil (this->consumer_admin_.in ())) return; CosEventComm::PushConsumer_var objref = - this->_this (ACE_TRY_ENV); + this->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->supplier_proxy_ = - this->consumer_admin_->obtain_push_supplier (ACE_TRY_ENV); + this->consumer_admin_->obtain_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->supplier_proxy_->connect_push_consumer (objref.in (), - ACE_TRY_ENV); + this->supplier_proxy_->connect_push_consumer (objref.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Consumer::disconnect (CORBA::Environment &ACE_TRY_ENV) +Consumer::disconnect (TAO_ENV_SINGLE_ARG_DECL) { if (CORBA::is_nil (this->supplier_proxy_.in ()) || CORBA::is_nil (this->consumer_admin_.in ())) return; - this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); + this->supplier_proxy_->disconnect_push_supplier (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->supplier_proxy_ = @@ -97,8 +97,8 @@ Consumer::disconnect (CORBA::Environment &ACE_TRY_ENV) } void -Consumer::push (const CORBA::Any &, - CORBA::Environment &ACE_TRY_ENV) +Consumer::push (const CORBA::Any & + TAO_ENV_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException, CosEventComm::Disconnected @@ -121,7 +121,7 @@ Consumer::push (const CORBA::Any &, "(%P):%s\n", "exiting the consumer.")); - this->close (ACE_TRY_ENV); + this->close (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->shutdown (); @@ -129,7 +129,7 @@ Consumer::push (const CORBA::Any &, } void -Consumer::disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV) +Consumer::disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -137,30 +137,30 @@ Consumer::disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV) // Deactivate this object. PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); + this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; PortableServer::ObjectId_var id = - poa->servant_to_id (this, - ACE_TRY_ENV); + poa->servant_to_id (this + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - poa->deactivate_object (id.in (), - ACE_TRY_ENV); + poa->deactivate_object (id.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } int Consumer::init_Consumer (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { - this->open (this->cos_ec_, - ACE_TRY_ENV); + this->open (this->cos_ec_ + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - this->connect (ACE_TRY_ENV); + this->connect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Consumer.h b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Consumer.h index cb05f223e2b..fdfed82b2b6 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Consumer.h +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Consumer.h @@ -40,29 +40,29 @@ public: int init_Consumer (void); // Initialize the Consumer. - void open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment& ACE_TRY_ENV); + void open (CosEventChannelAdmin::EventChannel_ptr event_channel + TAO_ENV_ARG_DECL); // This method connects the consumer to the EC. - void close (CORBA::Environment &ACE_TRY_ENV); + void close (TAO_ENV_SINGLE_ARG_DECL); // Disconnect from the EC. - void connect (CORBA::Environment &ACE_TRY_ENV); + void connect (TAO_ENV_SINGLE_ARG_DECL); // Connect the Consumer to the EventChannel. - void disconnect (CORBA::Environment &ACE_TRY_ENV); + void disconnect (TAO_ENV_SINGLE_ARG_DECL); // Disconnect from the supplier, but do not forget about it or close // it. - virtual void push (const CORBA::Any &data, - CORBA::Environment &ACE_TRY_ENV) + virtual void push (const CORBA::Any &data + TAO_ENV_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException, CosEventComm::Disconnected )); // push the event to the consumer. - virtual void disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV) + virtual void disconnect_push_consumer (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException )); diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Multiple.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Multiple.cpp index 63f8931ea7e..eb1b5231c54 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Multiple.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Multiple.cpp @@ -39,18 +39,18 @@ Multiple::init (int argc, char *argv[]) int Multiple::init_ORB (int argc, char *argv []) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { this->orb_ = CORBA::ORB_init (argc, argv, - "", - ACE_TRY_ENV); + "" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA", - ACE_TRY_ENV); + this->orb_->resolve_initial_references("RootPOA" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (poa_object.in ())) @@ -59,15 +59,15 @@ Multiple::init_ORB (int argc, char *argv []) -1); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), - ACE_TRY_ENV); + PortableServer::POA::_narrow (poa_object.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_TRY_ENV); + root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - poa_manager->activate (ACE_TRY_ENV); + poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -85,7 +85,7 @@ Multiple::init_ORB (int argc, char *argv []) int Multiple::init_CosEC (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Initialization of the naming service. @@ -101,16 +101,16 @@ Multiple::init_CosEC (void) CORBA::string_dup (this->service_name); CORBA::Object_var EC_obj = - this->naming_client_->resolve (ec_ref_name, - ACE_TRY_ENV); + this->naming_client_->resolve (ec_ref_name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // The CORBA::Object_var object is downcast to // CosEventChannelAdmin::EventChannel // using the <_narrow> method. this->cos_ec_ = - CosEventChannelAdmin::EventChannel::_narrow (EC_obj.in (), - ACE_TRY_ENV); + CosEventChannelAdmin::EventChannel::_narrow (EC_obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -128,10 +128,10 @@ Multiple::init_CosEC (void) int Multiple::runORB (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { - this->orb_->run (ACE_TRY_ENV); + this->orb_->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Supplier.cpp b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Supplier.cpp index 7e820a11853..f549159e1b7 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Supplier.cpp +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Supplier.cpp @@ -43,19 +43,19 @@ Supplier::parse_args (int argc, char *argv []) } void -Supplier::open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment& ACE_TRY_ENV) +Supplier::open (CosEventChannelAdmin::EventChannel_ptr event_channel + TAO_ENV_ARG_DECL) { // = Connect as a consumer. this->supplier_admin_ = - event_channel->for_suppliers (ACE_TRY_ENV); + event_channel->for_suppliers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } void -Supplier::close (CORBA::Environment &ACE_TRY_ENV) +Supplier::close (TAO_ENV_SINGLE_ARG_DECL) { - this->disconnect (ACE_TRY_ENV); + this->disconnect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->supplier_admin_ = @@ -63,31 +63,31 @@ Supplier::close (CORBA::Environment &ACE_TRY_ENV) } void -Supplier::connect (CORBA::Environment &ACE_TRY_ENV) +Supplier::connect (TAO_ENV_SINGLE_ARG_DECL) { if (CORBA::is_nil (this->supplier_admin_.in ())) return; this->consumer_proxy_ = - this->supplier_admin_->obtain_push_consumer (ACE_TRY_ENV); + this->supplier_admin_->obtain_push_consumer (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - CosEventComm::PushSupplier_var objref = this->_this (ACE_TRY_ENV); + CosEventComm::PushSupplier_var objref = this->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->consumer_proxy_->connect_push_supplier (objref.in (), - ACE_TRY_ENV); + this->consumer_proxy_->connect_push_supplier (objref.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Supplier::disconnect (CORBA::Environment &ACE_TRY_ENV) +Supplier::disconnect (TAO_ENV_SINGLE_ARG_DECL) { if (CORBA::is_nil (this->consumer_proxy_.in ()) || CORBA::is_nil (this->supplier_admin_.in ())) return; - this->consumer_proxy_->disconnect_push_consumer (ACE_TRY_ENV); + this->consumer_proxy_->disconnect_push_consumer (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; this->consumer_proxy_ = @@ -95,15 +95,15 @@ Supplier::disconnect (CORBA::Environment &ACE_TRY_ENV) } void -Supplier::send_event (const CORBA::Any & data, - CORBA::Environment &ACE_TRY_ENV) +Supplier::send_event (const CORBA::Any & data + TAO_ENV_ARG_DECL) { - this->consumer_proxy_->push (data, ACE_TRY_ENV); + this->consumer_proxy_->push (data TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void -Supplier::disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV) +Supplier::disconnect_push_supplier (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException )) @@ -111,23 +111,23 @@ Supplier::disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV) // Deactivate this object. PortableServer::POA_var poa = - this->_default_POA (ACE_TRY_ENV); + this->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; PortableServer::ObjectId_var id = - poa->servant_to_id (this, - ACE_TRY_ENV); + poa->servant_to_id (this + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - poa->deactivate_object (id.in (), - ACE_TRY_ENV); + poa->deactivate_object (id.in () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } void Supplier::run (void) { - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Create an Any type to pass to the Cos EC. @@ -136,11 +136,11 @@ Supplier::run (void) CORBA::Any any; cany >>= any; - this->open (this->cos_ec_, - ACE_TRY_ENV); + this->open (this->cos_ec_ + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - this->connect (ACE_TRY_ENV); + this->connect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, @@ -151,15 +151,15 @@ Supplier::run (void) count != 0; count--) { - this->send_event (any, - ACE_TRY_ENV); + this->send_event (any + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_DEBUG ((LM_DEBUG, "(%P):Done!. exiting now..\n")); - this->close (ACE_TRY_ENV); + this->close (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY diff --git a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Supplier.h b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Supplier.h index 9c6c0f60e83..9de704696bd 100644 --- a/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Supplier.h +++ b/TAO/orbsvcs/examples/CosEC/RtEC_Based/tests/Multiple/Supplier.h @@ -37,23 +37,23 @@ public: Supplier (); // Constructor. - void open (CosEventChannelAdmin::EventChannel_ptr event_channel, - CORBA::Environment &ACE_TRY_ENV); + void open (CosEventChannelAdmin::EventChannel_ptr event_channel + TAO_ENV_ARG_DECL); // This method connects the supplier to the EC. - void close (CORBA::Environment &ACE_TRY_ENV); + void close (TAO_ENV_SINGLE_ARG_DECL); // Disconnect from the EC. - void connect (CORBA::Environment &ACE_TRY_ENV); + void connect (TAO_ENV_SINGLE_ARG_DECL); - void disconnect (CORBA::Environment &ACE_TRY_ENV); + void disconnect (TAO_ENV_SINGLE_ARG_DECL); // Disconnect from the EC, but do not forget about it or close it. - void send_event (const CORBA::Any &data, - CORBA::Environment &ACE_TRY_ENV); + void send_event (const CORBA::Any &data + TAO_ENV_ARG_DECL); // Send one event. - virtual void disconnect_push_supplier (CORBA::Environment &ACE_TRY_ENV) + virtual void disconnect_push_supplier (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC (( CORBA::SystemException )); |