diff options
Diffstat (limited to 'TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp')
-rw-r--r-- | TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp | 75 |
1 files changed, 24 insertions, 51 deletions
diff --git a/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp b/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp index fce6e571c50..27abe97ce77 100644 --- a/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp +++ b/TAO/tests/Smart_Proxies/Collocation/Coll_Tester.cpp @@ -22,11 +22,10 @@ Collocation_Test::Collocation_Test (void) } int -Collocation_Test::init (int argc, char *argv[] ACE_ENV_ARG_DECL) +Collocation_Test::init (int argc, char *argv[]) { // Initialize the ORB. - this->orb_ = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->orb_ = CORBA::ORB_init (argc, argv, 0); int result = this->parse_args (argc, argv); if (result != 0) @@ -34,53 +33,37 @@ Collocation_Test::init (int argc, char *argv[] ACE_ENV_ARG_DECL) // Get an Object reference to RootPOA. CORBA::Object_var obj = - this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->orb_->resolve_initial_references ("RootPOA"); // Narrow the Object reference to a POA reference this->root_poa_ = - PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + PortableServer::POA::_narrow (obj.in ()); // Get the POAManager of RootPOA this->poa_manager_ = - this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->root_poa_->the_POAManager (); // Activate the diamond servant and its base classes under RootPOA. PortableServer::ObjectId_var id = - this->root_poa_->activate_object (&this->top_servant_ - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->root_poa_->activate_object (&this->top_servant_); // // We only care about the most derived class here. -// this->diamond_obj_ = this->diamond_servant_._this (ACE_ENV_SINGLE_ARG_PARAMETER); -// ACE_CHECK_RETURN (-1); +// this->diamond_obj_ = this->diamond_servant_._this (); id = - this->root_poa_->activate_object (&this->diamond_servant_ - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->root_poa_->activate_object (&this->diamond_servant_); // We only care about the most derived class here. - this->diamond_obj_ = this->root_poa_->id_to_reference (id.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->diamond_obj_ = this->root_poa_->id_to_reference (id.in ()); id = - this->root_poa_->activate_object (&this->left_servant_ - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->root_poa_->activate_object (&this->left_servant_); id = - this->root_poa_->activate_object (&this->right_servant_ - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->root_poa_->activate_object (&this->right_servant_); CORBA::String_var str = - this->orb_->object_to_string (this->diamond_obj_.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->orb_->object_to_string (this->diamond_obj_.in ()); ACE_DEBUG ((LM_DEBUG, "Diamond Servant activated:\n %s\n", str.in())); @@ -99,7 +82,7 @@ Collocation_Test::parse_args (int argc, char *argv[]) } int -Collocation_Test::test_narrow (ACE_ENV_SINGLE_ARG_DECL) +Collocation_Test::test_narrow (void) { // Ensure that the smart proxy is the one which is used by registering // the user-defined factory. Its necessary to create one on the heap so @@ -110,48 +93,38 @@ Collocation_Test::test_narrow (ACE_ENV_SINGLE_ARG_DECL) -1); Diamond::Top_var top = - Diamond::Top::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + Diamond::Top::_narrow (this->diamond_obj_.in()); Diamond::Left_var left = - Diamond::Left::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + Diamond::Left::_narrow (this->diamond_obj_.in()); Diamond::Right_var right = - Diamond::Right::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + Diamond::Right::_narrow (this->diamond_obj_.in()); Diamond::Buttom_var buttom = - Diamond::Buttom::_narrow (this->diamond_obj_.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + Diamond::Buttom::_narrow (this->diamond_obj_.in()); - CORBA::String_var str = top->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + CORBA::String_var str = top->shape (); ACE_DEBUG ((LM_DEBUG, "Calling top->shape: %s\n", str.in ())); - str = left->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + str = left->shape (); ACE_DEBUG ((LM_DEBUG, "Calling left->shape: %s\n", str.in ())); - str = right->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + str = right->shape (); ACE_DEBUG ((LM_DEBUG, "Calling right->shape: %s\n", str.in ())); - str = buttom->shape (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + str = buttom->shape (); ACE_DEBUG ((LM_DEBUG, "Calling buttom->shape: %s\n", str.in ())); return 0; } int -Collocation_Test::run (ACE_ENV_SINGLE_ARG_DECL) +Collocation_Test::run (void) { - this->poa_manager_->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->poa_manager_->activate (); - this->test_narrow (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->test_narrow (); return 0; } |