summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp')
-rw-r--r--TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp58
1 files changed, 21 insertions, 37 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp
index 95d08daca21..af6a7107fc7 100644
--- a/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp
+++ b/TAO/orbsvcs/tests/Notify/Discarding/Sequence_Supplier.cpp
@@ -53,13 +53,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;
@@ -136,23 +136,20 @@ Supplier_Client::parse_args (int argc, char *argv[])
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);
+ adminid);
- ACE_CHECK_RETURN (0);
return CosNotifyChannelAdmin::SupplierAdmin::_duplicate (admin.in ());
}
static void
-SendBatch (int batch_id ACE_ENV_ARG_DECL)
+SendBatch (int batch_id)
{
CosNotification::EventBatch events;
events.length(BATCH_SIZE);
@@ -181,25 +178,21 @@ SendBatch (int batch_id ACE_ENV_ARG_DECL)
events[i] = event;
}
- supplier_1->send_events (events ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ supplier_1->send_events (events);
}
static void
create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
+ PortableServer::POA_ptr poa)
{
// start up the supplier
ACE_NEW_THROW_EX (supplier_1,
TAO_Notify_Tests_SequencePushSupplier (),
CORBA::NO_MEMORY ());
- supplier_1->init (poa ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ supplier_1->init (poa);
- supplier_1->connect (admin ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ supplier_1->connect (admin);
}
@@ -211,17 +204,15 @@ int main (int argc, char* argv[])
{
int status = 0;
ACE_Auto_Ptr< sig_i > sig_impl;
- ACE_TRY_NEW_ENV
+ try
{
Supplier_Client client;
- status = client.init (argc, argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ status = client.init (argc, argv);
if (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);
if (use_deadline_ordering)
{
@@ -233,12 +224,10 @@ int main (int argc, char* argv[])
}
sig_impl.reset( new sig_i( client.orb() ) );
- sig_var sig = sig_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ sig_var sig = sig_impl->_this ();
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 ());
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
@@ -250,10 +239,9 @@ int main (int argc, char* argv[])
}
CosNotifyChannelAdmin::SupplierAdmin_var admin =
- create_supplieradmin (ec.in () ACE_ENV_ARG_PARAMETER);
+ create_supplieradmin (ec.in ());
ACE_ASSERT(!CORBA::is_nil (admin.in ()));
- create_suppliers (admin.in (), client.root_poa () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ create_suppliers (admin.in (), client.root_poa ());
sig_impl->wait_for_startup();
@@ -261,8 +249,7 @@ int main (int argc, char* argv[])
for (int i = 0; i < num_events / BATCH_SIZE; ++i)
{
ACE_DEBUG((LM_DEBUG, "+"));
- SendBatch (i ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ SendBatch (i);
}
ACE_DEBUG((LM_DEBUG, "\nSupplier sent %d events.\n", num_events));
@@ -270,19 +257,16 @@ int main (int argc, char* argv[])
ACE_OS::unlink (ior_output_file);
- supplier_1->disconnect(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ supplier_1->disconnect();
- ec->destroy(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ ec->destroy();
}
}
- ACE_CATCH (CORBA::Exception, e)
+ catch (const CORBA::Exception& e)
{
- ACE_PRINT_EXCEPTION (e, "Error: ");
+ e._tao_print_exception ("Error: ");
status = 1;
}
- ACE_ENDTRY;
return status;
}