diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-12-08 21:59:30 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-12-08 21:59:30 +0000 |
commit | 63165b00e2d667e39e15cf084128d94a563d484e (patch) | |
tree | 6939cf1ed0a80ce8a3224d33f3d23c0e1b9a517f /TAO/orbsvcs/tests/Event/Basic/Disconnect.cpp | |
parent | 6579bccb3a3f22f882ef908ad5f7e1a65b00b133 (diff) | |
download | ATCD-63165b00e2d667e39e15cf084128d94a563d484e.tar.gz |
Merged corba-env-clean branch.
Diffstat (limited to 'TAO/orbsvcs/tests/Event/Basic/Disconnect.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Event/Basic/Disconnect.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/TAO/orbsvcs/tests/Event/Basic/Disconnect.cpp b/TAO/orbsvcs/tests/Event/Basic/Disconnect.cpp index 9c51cd6b368..c2b2605dd4d 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Disconnect.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Disconnect.cpp @@ -11,48 +11,48 @@ ACE_RCSID(EC_Tests, Disconnect, "$Id$") static void run_test (PortableServer::POA_ptr poa, - int use_callbacks, - CORBA::Environment &ACE_TRY_ENV); + int use_callbacks + TAO_ENV_ARG_DECL); int main (int argc, char* argv[]) { TAO_EC_Default_Factory::init_svcs (); - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // ORB initialization boiler plate... CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); + CORBA::ORB_init (argc, argv, "" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var object = - orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var poa = - PortableServer::POA::_narrow (object.in (), ACE_TRY_ENV); + PortableServer::POA::_narrow (object.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - poa->the_POAManager (ACE_TRY_ENV); + 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; // **************************************************************** - run_test (poa.in (), 0, ACE_TRY_ENV); + run_test (poa.in (), 0 TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - run_test (poa.in (), 1, ACE_TRY_ENV); + run_test (poa.in (), 1 TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // **************************************************************** - poa->destroy (1, 1, ACE_TRY_ENV); + poa->destroy (1, 1 TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } @@ -68,45 +68,45 @@ main (int argc, char* argv[]) // **************************************************************** void -deactivate_servant (PortableServer::Servant servant, - CORBA::Environment &ACE_TRY_ENV) +deactivate_servant (PortableServer::Servant servant + TAO_ENV_ARG_DECL) { PortableServer::POA_var poa = - servant->_default_POA (ACE_TRY_ENV); + servant->_default_POA (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; PortableServer::ObjectId_var id = - poa->servant_to_id (servant, ACE_TRY_ENV); + poa->servant_to_id (servant 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 run_test (PortableServer::POA_ptr poa, - int use_callbacks, - CORBA::Environment &ACE_TRY_ENV) + int use_callbacks + TAO_ENV_ARG_DECL) { TAO_EC_Event_Channel_Attributes attributes (poa, poa); attributes.disconnect_callbacks = use_callbacks; TAO_EC_Event_Channel ec_impl (attributes); - ec_impl.activate (ACE_TRY_ENV); + ec_impl.activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; RtecEventChannelAdmin::EventChannel_var event_channel = - ec_impl._this (ACE_TRY_ENV); + ec_impl._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // **************************************************************** // Obtain the consumer admin.. RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = - event_channel->for_consumers (ACE_TRY_ENV); + event_channel->for_consumers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // and the supplier admin.. RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = - event_channel->for_suppliers (ACE_TRY_ENV); + event_channel->for_suppliers (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; // **************************************************************** @@ -133,56 +133,56 @@ run_test (PortableServer::POA_ptr poa, for (int i = 0; i != iterations; ++i) { supplier_0.connect (supplier_admin.in (), - supplier_qos.get_SupplierQOS (), - ACE_TRY_ENV); + supplier_qos.get_SupplierQOS () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; consumer_0.connect (consumer_admin.in (), - consumer_qos.get_ConsumerQOS (), - ACE_TRY_ENV); + consumer_qos.get_ConsumerQOS () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; if (i % 2 == 1) { supplier_1.connect (supplier_admin.in (), - supplier_qos.get_SupplierQOS (), - ACE_TRY_ENV); + supplier_qos.get_SupplierQOS () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; consumer_1.connect (consumer_admin.in (), - consumer_qos.get_ConsumerQOS (), - ACE_TRY_ENV); + consumer_qos.get_ConsumerQOS () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; } - supplier_0.disconnect (ACE_TRY_ENV); + supplier_0.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - consumer_0.disconnect (ACE_TRY_ENV); + consumer_0.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; if (i % 2 == 1) { - consumer_1.disconnect (ACE_TRY_ENV); + consumer_1.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - supplier_1.disconnect (ACE_TRY_ENV); + supplier_1.disconnect (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } } supplier_0.connect (supplier_admin.in (), - supplier_qos.get_SupplierQOS (), - ACE_TRY_ENV); + supplier_qos.get_SupplierQOS () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; consumer_0.connect (consumer_admin.in (), - consumer_qos.get_ConsumerQOS (), - ACE_TRY_ENV); + consumer_qos.get_ConsumerQOS () + TAO_ENV_ARG_PARAMETER); ACE_CHECK; - event_channel->destroy (ACE_TRY_ENV); + event_channel->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - deactivate_servant (&supplier_0, ACE_TRY_ENV); + deactivate_servant (&supplier_0 TAO_ENV_ARG_PARAMETER); ACE_CHECK; - deactivate_servant (&consumer_0, ACE_TRY_ENV); + deactivate_servant (&consumer_0 TAO_ENV_ARG_PARAMETER); ACE_CHECK; - deactivate_servant (&ec_impl, ACE_TRY_ENV); + deactivate_servant (&ec_impl TAO_ENV_ARG_PARAMETER); ACE_CHECK; CORBA::ULong count_0 = 1; |