diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/Basic/Simple.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Basic/Simple.cpp | 53 |
1 files changed, 18 insertions, 35 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Basic/Simple.cpp b/TAO/orbsvcs/tests/Notify/Basic/Simple.cpp index 8097219f16c..faa27ba5776 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/Simple.cpp +++ b/TAO/orbsvcs/tests/Notify/Basic/Simple.cpp @@ -15,8 +15,7 @@ Event_AnyPushConsumer::Event_AnyPushConsumer (Simple_Test *test_client) } void -Event_AnyPushConsumer::push (const CORBA::Any & data - ACE_ENV_ARG_DECL_NOT_USED) +Event_AnyPushConsumer::push (const CORBA::Any & data) ACE_THROW_SPEC ((CORBA::SystemException, CosEventComm::Disconnected)) { @@ -55,13 +54,11 @@ Simple_Test::~Simple_Test (void) int Simple_Test::init (int argc, - char* argv [] - ACE_ENV_ARG_DECL) + char* argv []) { // Initialized the base class. Notify_Test_Client::init (argc, - argv - ACE_ENV_ARG_PARAMETER); + argv); // Create all participents. this->create_EC (); @@ -70,43 +67,35 @@ Simple_Test::init (int argc, supplier_admin_ = this->ec_->new_for_suppliers (this->ifgop_, - adminid - ACE_ENV_ARG_PARAMETER); + adminid); ACE_ASSERT (!CORBA::is_nil (supplier_admin_.in ())); consumer_admin_ = this->ec_->new_for_consumers (this->ifgop_, - adminid - ACE_ENV_ARG_PARAMETER); + adminid); ACE_ASSERT (!CORBA::is_nil (consumer_admin_.in ())); ACE_NEW_RETURN (this->consumer_, Event_AnyPushConsumer (this), -1); - this->consumer_->init (root_poa_.in () - ACE_ENV_ARG_PARAMETER); - this->consumer_->connect (this->consumer_admin_.in () - ACE_ENV_ARG_PARAMETER); + this->consumer_->init (root_poa_.in ()); + this->consumer_->connect (this->consumer_admin_.in ()); Event_AnyPushConsumer* consumer2; ACE_NEW_RETURN (consumer2, Event_AnyPushConsumer (this), -1); - consumer2->init (root_poa_.in () - ACE_ENV_ARG_PARAMETER); - consumer2->connect (this->consumer_admin_.in () - ACE_ENV_ARG_PARAMETER); + consumer2->init (root_poa_.in ()); + consumer2->connect (this->consumer_admin_.in ()); ACE_NEW_RETURN (this->supplier_, Event_AnyPushSupplier (this), -1); - this->supplier_->init (root_poa_.in () - ACE_ENV_ARG_PARAMETER); + this->supplier_->init (root_poa_.in ()); - this->supplier_->connect (this->supplier_admin_.in () - ACE_ENV_ARG_PARAMETER); + this->supplier_->connect (this->supplier_admin_.in ()); consumer_start( 0 ); @@ -157,8 +146,7 @@ Simple_Test::create_EC (void) this->ec_ = notify_factory_->create_channel (this->initial_qos_, this->initial_admin_, - id - ACE_ENV_ARG_PARAMETER); + id); ACE_ASSERT (!CORBA::is_nil (ec_.in ())); } @@ -175,7 +163,6 @@ Simple_Test::on_event_received (void) if (this->result_count_ == 2 * this->event_count_) { - ACE_DECLARE_NEW_CORBA_ENV; this->end_test (); } } @@ -189,8 +176,7 @@ Simple_Test::run_test (void) { data <<= (CORBA::Long)i; - this->supplier_->send_event (data - ACE_ENV_ARG_PARAMETER); + this->supplier_->send_event (data); } } @@ -204,7 +190,6 @@ int Simple_Test::check_results (void) { // Destroy the channel - ACE_DECLARE_NEW_CORBA_ENV; this->ec_->destroy (); if (this->result_count_ == 2 * this->event_count_) @@ -233,22 +218,20 @@ main (int argc, char* argv[]) return 1; } - ACE_TRY_NEW_ENV + try { events.init (argc, - argv - ACE_ENV_ARG_PARAMETER); + argv); events.run_test (); - events.ORB_run( ACE_ENV_SINGLE_ARG_PARAMETER ); + events.ORB_run( ); } - ACE_CATCH (CORBA::Exception, se) + catch (const CORBA::Exception& se) { - ACE_PRINT_EXCEPTION (se, "Error: "); + se._tao_print_exception ("Error: "); return 1; } - ACE_ENDTRY; return events.check_results (); } |