diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp | 57 |
1 files changed, 21 insertions, 36 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp index 161d3f3e8c4..86542c868f2 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Supplier.cpp @@ -31,13 +31,13 @@ public: { } - void go (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + void go (void) ACE_THROW_SPEC ((CORBA::SystemException)) { started_ = true; } - void done (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + void done (void) ACE_THROW_SPEC ((CORBA::SystemException)) { started_ = false; @@ -65,15 +65,12 @@ private: }; static CosNotifyChannelAdmin::SupplierAdmin_ptr -create_supplieradmin (CosNotifyChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) +create_supplieradmin (CosNotifyChannelAdmin::EventChannel_ptr ec) { CosNotifyChannelAdmin::AdminID adminid = 0; CosNotifyChannelAdmin::SupplierAdmin_var admin = ec->new_for_suppliers (CosNotifyChannelAdmin::AND_OP, - adminid - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + adminid); return CosNotifyChannelAdmin::SupplierAdmin::_duplicate (admin.in ()); } @@ -100,71 +97,62 @@ send_event (int id) // Divide by 3 first so that the type and group aren't synched event.filterable_data[2].value <<= static_cast<CORBA::ULong>(id / 3 % 3); - ACE_TRY_NEW_ENV + try { ACE_DEBUG((LM_DEBUG, "+")); - supplier->send_event (event ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + supplier->send_event (event); } - ACE_CATCH (CORBA::Exception, e) + catch (const CORBA::Exception& e) { - ACE_PRINT_EXCEPTION (e, "\nError: Supplier: "); + e._tao_print_exception ("\nError: Supplier: "); } - ACE_ENDTRY; return 0; } static void create_supplier (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, - PortableServer::POA_ptr poa - ACE_ENV_ARG_DECL) + PortableServer::POA_ptr poa) { ACE_NEW_THROW_EX (supplier, TAO_Notify_Tests_StructuredPushSupplier (), CORBA::NO_MEMORY ()); - supplier->init (poa ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + supplier->init (poa); - supplier->connect (admin ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + supplier->connect (admin); } int main (int argc, char * argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; - ACE_TRY_NEW_ENV; + try { Notify_Test_Client client; - int status = client.init (argc, argv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + int status = client.init (argc, argv); ACE_UNUSED_ARG(status); ACE_ASSERT(status == 0); CosNotifyChannelAdmin::EventChannel_var ec = - client.create_event_channel ("MyEventChannel", 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + client.create_event_channel ("MyEventChannel", 0); ACE_ASSERT(! CORBA::is_nil(ec.in())); CORBA::ORB_ptr orb = client.orb (); sig_impl.reset( new sig_i( orb ) ); - sig_var sig = sig_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + sig_var sig = sig_impl->_this (); CosNotifyChannelAdmin::SupplierAdmin_var admin = - create_supplieradmin (ec.in () ACE_ENV_ARG_PARAMETER); + create_supplieradmin (ec.in ()); ACE_ASSERT(! CORBA::is_nil (admin.in ())); - create_supplier (admin.in (), client.root_poa () ACE_ENV_ARG_PARAMETER); + create_supplier (admin.in (), client.root_poa ()); if (ior_file != 0) { CORBA::String_var ior = - client.orb ()->object_to_string (sig.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + client.orb ()->object_to_string (sig.in ()); FILE *output_file= ACE_OS::fopen (ior_file, "w"); ACE_ASSERT (output_file != 0); @@ -181,7 +169,6 @@ int main (int argc, char * argv[]) { ACE_DEBUG((LM_DEBUG, "+")); send_event (i); - ACE_TRY_CHECK; } ACE_DEBUG((LM_DEBUG, "\nSupplier sent %d events.\n", num_events)); @@ -189,16 +176,14 @@ int main (int argc, char * argv[]) ACE_OS::unlink (ior_file); - ec->destroy(ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ec->destroy(); return 0; } - ACE_CATCH (CORBA::Exception, e) + catch (const CORBA::Exception& e) { - ACE_PRINT_EXCEPTION (e, "Error: Supplier: "); + e._tao_print_exception ("Error: Supplier: "); } - ACE_ENDTRY; return 1; } |