diff options
Diffstat (limited to 'TAO/examples/Simple/Simple_util.cpp')
-rw-r--r-- | TAO/examples/Simple/Simple_util.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/TAO/examples/Simple/Simple_util.cpp b/TAO/examples/Simple/Simple_util.cpp index 6bf017d1cfe..f35e7f21db3 100644 --- a/TAO/examples/Simple/Simple_util.cpp +++ b/TAO/examples/Simple/Simple_util.cpp @@ -86,25 +86,25 @@ Server<Servant>::test_for_ins (CORBA::String_var ior) this->ins_, ior.in ())); - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { CORBA::Object_var table_object = - orb->resolve_initial_references ("IORTable", - ACE_TRY_ENV); + orb->resolve_initial_references ("IORTable" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; IORTable::Table_var adapter = - IORTable::Table::_narrow (table_object.in (), - ACE_TRY_ENV); + IORTable::Table::_narrow (table_object.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (adapter.in ())) { ACE_ERROR ((LM_ERROR, "Nil IORTable\n")); } - adapter->bind (this->ins_, ior.in (), ACE_TRY_ENV); + adapter->bind (this->ins_, ior.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -119,15 +119,15 @@ Server<Servant>::test_for_ins (CORBA::String_var ior) template <class Servant> int Server<Servant>::init (const char *servant_name, int argc, - char *argv[], - CORBA::Environment &ACE_TRY_ENV) + char *argv[] + TAO_ENV_ARG_DECL) { // Call the init of <TAO_ORB_Manager> to initialize the ORB and // create a child POA under the root POA. if (this->orb_manager_.init_child_poa (argc, argv, - "child_poa", - ACE_TRY_ENV) == -1) + "child_poa" + TAO_ENV_ARG_PARAMETER) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init_child_poa"), @@ -170,8 +170,8 @@ Server<Servant>::init (const char *servant_name, { CORBA::String_var str = this->orb_manager_.activate_under_child_poa (servant_name, - &this->servant_, - ACE_TRY_ENV); + &this->servant_ + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, @@ -204,10 +204,10 @@ Server<Servant>::init (const char *servant_name, } template <class Servant>int -Server<Servant>::run (CORBA::Environment &env) +Server<Servant>::run (TAO_ENV_SINGLE_ARG_DECL) { // Run the main event loop for the ORB. - if (this->orb_manager_.run (env) == -1) + if (this->orb_manager_.run (TAO_ENV_SINGLE_ARG_PARAMETER) == -1) ACE_ERROR_RETURN ((LM_ERROR, "Server_i::run"), -1); @@ -229,20 +229,20 @@ Server<Servant>::register_name (void) bindName.length (1); bindName[0].id = CORBA::string_dup (name); - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; // (re)Bind the object. ACE_TRY { - CORBA::Object_var object = servant_._this (ACE_TRY_ENV); + CORBA::Object_var object = servant_._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - this->orb_manager_.activate_poa_manager (ACE_TRY_ENV); + this->orb_manager_.activate_poa_manager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; naming_server_->rebind (bindName, - object.in(), - ACE_TRY_ENV); + object.in() + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Test for INS. @@ -374,15 +374,15 @@ Client<INTERFACE_OBJECT, Var>::init (const char *name, this->argv_ = argv; - ACE_DECLARE_NEW_CORBA_ENV; + TAO_ENV_DECLARE_NEW_ENV; ACE_TRY { // Retrieve the ORB. this->orb_ = CORBA::ORB_init (this->argc_, this->argv_, - 0, - ACE_TRY_ENV); + 0 + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Parse command line and verify parameters. @@ -392,7 +392,7 @@ Client<INTERFACE_OBJECT, Var>::init (const char *name, if(this->ior_ != 0) { CORBA::Object_var server_object = - this->orb_->string_to_object (this->ior_, ACE_TRY_ENV); + this->orb_->string_to_object (this->ior_ TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -401,8 +401,8 @@ Client<INTERFACE_OBJECT, Var>::init (const char *name, "invalid ior <%s>\n", this->ior_), -1); - this->server_ = INTERFACE_OBJECT::_narrow (server_object.in (), - ACE_TRY_ENV); + this->server_ = INTERFACE_OBJECT::_narrow (server_object.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } else if (this->naming_ == 1) @@ -411,7 +411,7 @@ Client<INTERFACE_OBJECT, Var>::init (const char *name, ACE_DEBUG((LM_DEBUG, "Using the Naming Service \n")); this->name_ = ACE_const_cast (char *, name); - int retv = this->obtain_initial_references (ACE_TRY_ENV); + int retv = this->obtain_initial_references (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; if (retv ==-1) return -1; @@ -436,7 +436,7 @@ Client<INTERFACE_OBJECT, Var>::init (const char *name, template <class INTERFACE_OBJECT, class Var> int -Client<INTERFACE_OBJECT, Var>::obtain_initial_references (CORBA::Environment &ACE_TRY_ENV) +Client<INTERFACE_OBJECT, Var>::obtain_initial_references (TAO_ENV_SINGLE_ARG_DECL) { ACE_TRY @@ -454,12 +454,12 @@ Client<INTERFACE_OBJECT, Var>::obtain_initial_references (CORBA::Environment &AC server_name[0].id = CORBA::string_dup (this->name_); CORBA::Object_var obj = - naming_client_->resolve (server_name, - ACE_TRY_ENV); + naming_client_->resolve (server_name + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - this->server_ = INTERFACE_OBJECT::_narrow (obj.in (), - ACE_TRY_ENV); + this->server_ = INTERFACE_OBJECT::_narrow (obj.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY |