summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp')
-rw-r--r--TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp61
1 files changed, 22 insertions, 39 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp
index c1d572de8c2..5403daa0e41 100644
--- a/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp
+++ b/TAO/orbsvcs/tests/Notify/Ordering/Sequence_Supplier.cpp
@@ -30,13 +30,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;
@@ -132,23 +132,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);
@@ -175,24 +172,20 @@ 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)
{
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);
}
@@ -203,34 +196,29 @@ create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin,
int main (int argc, char* argv[])
{
ACE_Auto_Ptr< sig_i > sig_impl;
- ACE_TRY_NEW_ENV
+ try
{
Supplier_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);
CosNotification::QoSProperties qos (1);
qos.length (1);
qos[0].name = CORBA::string_dup (CosNotification::OrderPolicy);
qos[0].value <<= order_policy;
- ec->set_qos (qos ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ ec->set_qos (qos);
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 ();
CORBA::String_var ior =
- orb->object_to_string (sig.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->object_to_string (sig.in ());
if (ior_output_file != 0)
{
@@ -246,10 +234,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();
@@ -257,8 +244,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));
@@ -266,19 +252,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();
return 0;
}
- ACE_CATCH (CORBA::Exception, e)
+ catch (const CORBA::Exception& e)
{
- ACE_PRINT_EXCEPTION (e, "Error: ");
+ e._tao_print_exception ("Error: ");
}
- ACE_ENDTRY;
return 1;
}