diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-10 05:04:13 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-10 05:04:13 +0000 |
commit | 402e7dad816418c99da1d166fd80f377f15ffbc7 (patch) | |
tree | 57ba00f6635ea31e724f80a81094aa00a9170045 /TAO/examples | |
parent | 686b82ef7262c90d382e6a23fea1475676892289 (diff) | |
download | ATCD-402e7dad816418c99da1d166fd80f377f15ffbc7.tar.gz |
Changed to generate code using TAO_IN_ENV instead of _env.
Diffstat (limited to 'TAO/examples')
-rw-r--r-- | TAO/examples/Callback_Quoter/Consumer_Input_Handler.cpp | 2 | ||||
-rw-r--r-- | TAO/examples/Callback_Quoter/Notifier_i.cpp | 8 | ||||
-rw-r--r-- | TAO/examples/Quoter/Factory_Finder_i.cpp | 12 | ||||
-rw-r--r-- | TAO/examples/Quoter/Generic_Factory_i.cpp | 26 | ||||
-rw-r--r-- | TAO/examples/Quoter/Quoter_i.cpp | 28 | ||||
-rw-r--r-- | TAO/examples/Simple/bank/AccountManager_i.cpp | 4 | ||||
-rw-r--r-- | TAO/examples/Simple/grid/Grid_i.cpp | 22 |
7 files changed, 51 insertions, 51 deletions
diff --git a/TAO/examples/Callback_Quoter/Consumer_Input_Handler.cpp b/TAO/examples/Callback_Quoter/Consumer_Input_Handler.cpp index 476d0e7c8a9..29cc78a4a21 100644 --- a/TAO/examples/Callback_Quoter/Consumer_Input_Handler.cpp +++ b/TAO/examples/Callback_Quoter/Consumer_Input_Handler.cpp @@ -31,7 +31,7 @@ Consumer_Input_Handler::handle_input (ACE_HANDLE) { char buf[BUFSIZ]; - CORBA::Environment _env; + CORBA::Environment TAO_IN_ENV; TAO_TRY { diff --git a/TAO/examples/Callback_Quoter/Notifier_i.cpp b/TAO/examples/Callback_Quoter/Notifier_i.cpp index cf9bf752b61..24ecfea733c 100644 --- a/TAO/examples/Callback_Quoter/Notifier_i.cpp +++ b/TAO/examples/Callback_Quoter/Notifier_i.cpp @@ -41,7 +41,7 @@ void Notifier_i::register_callback (const char *stock_name, CORBA::Long threshold_value, Callback_Quoter::Consumer_ptr consumer_handler, - CORBA::Environment &_env) + CORBA::Environment &TAO_IN_ENV) { // Store the client information. Consumer_Data consumer_data; @@ -65,7 +65,7 @@ Notifier_i::register_callback (const char *stock_name, if (this->consumer_map_.find (stock_name, consumers) == 0) { if ( consumers->insert (consumer_data) == -1) - _env.exception (new Callback_Quoter::Invalid_Stock + TAO_IN_ENV.exception (new Callback_Quoter::Invalid_Stock ("Insertion failed! Invalid Stock!\n")); else ACE_DEBUG ((LM_DEBUG, @@ -81,13 +81,13 @@ Notifier_i::register_callback (const char *stock_name, // the unbounded set entry is created. // NOTE:: its pathetic, but to make this macro call its necessary to name - // your environment variable _env + // your environment variable TAO_IN_ENV ACE_NEW_THROW (consumers, CONSUMERS, CORBA::NO_MEMORY (CORBA::COMPLETED_NO)); // When a new entry is tried to be inserted into the unbounded set and it // fails an exception is raised. if (consumers->insert (consumer_data) == -1) - _env.exception (new Callback_Quoter::Invalid_Stock + TAO_IN_ENV.exception (new Callback_Quoter::Invalid_Stock ("Insertion failed! Invalid Stock!\n")); // The bond between the stockname <hash_key> and the consumers <hash_value> diff --git a/TAO/examples/Quoter/Factory_Finder_i.cpp b/TAO/examples/Quoter/Factory_Finder_i.cpp index 4284f9074ff..24e46bb1516 100644 --- a/TAO/examples/Quoter/Factory_Finder_i.cpp +++ b/TAO/examples/Quoter/Factory_Finder_i.cpp @@ -34,7 +34,7 @@ Quoter_Factory_Finder_i::~Quoter_Factory_Finder_i (void) CosLifeCycle::Factories * Quoter_Factory_Finder_i::find_factories (const CosLifeCycle::Key &factory_key, - CORBA::Environment &_env_there) + CORBA::Environment &TAO_IN_ENV_there) { CORBA::Environment env_here; @@ -58,7 +58,7 @@ Quoter_Factory_Finder_i::find_factories (const CosLifeCycle::Key &factory_key, // exception. if (env_here.exception () != 0) // throw a NoFactory exception { - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -73,7 +73,7 @@ Quoter_Factory_Finder_i::find_factories (const CosLifeCycle::Key &factory_key, // see if there is an exception, if yes then throw the NoFactory exception if (env_here.exception () != 0) // throw a NoFactory exception { - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -82,7 +82,7 @@ Quoter_Factory_Finder_i::find_factories (const CosLifeCycle::Key &factory_key, // Check if it is a valid Quoter Factory reference if (CORBA::is_nil (quoterFactoryObject_var.in())) { // throw a NoFactory exception - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } else @@ -96,7 +96,7 @@ Quoter_Factory_Finder_i::find_factories (const CosLifeCycle::Key &factory_key, if (env_here.exception () != 0) { // Throw a NoFactory exception. - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -106,7 +106,7 @@ Quoter_Factory_Finder_i::find_factories (const CosLifeCycle::Key &factory_key, // Check if it is a valid Quoter Factory reference. if (CORBA::is_nil (quoterFactoryObject_var.in ())) // throw a NoFactory exception. { - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } diff --git a/TAO/examples/Quoter/Generic_Factory_i.cpp b/TAO/examples/Quoter/Generic_Factory_i.cpp index 83b560c7e37..52522d5ad83 100644 --- a/TAO/examples/Quoter/Generic_Factory_i.cpp +++ b/TAO/examples/Quoter/Generic_Factory_i.cpp @@ -32,10 +32,10 @@ Quoter_Generic_Factory_i::~Quoter_Generic_Factory_i (void) CORBA::Boolean Quoter_Generic_Factory_i::supports (const CosLifeCycle::Key &factory_key, - CORBA::Environment &_env_there) + CORBA::Environment &TAO_IN_ENV_there) { ACE_UNUSED_ARG (factory_key); - ACE_UNUSED_ARG (_env_there); + ACE_UNUSED_ARG (TAO_IN_ENV_there); return 0; } @@ -45,7 +45,7 @@ Quoter_Generic_Factory_i::supports (const CosLifeCycle::Key &factory_key, CosNaming::NamingContext_ptr Quoter_Generic_Factory_i::get_naming_context (const CosLifeCycle::Key &factory_key, CORBA::Environment &env_here, - CORBA::Environment &_env_there) + CORBA::Environment &TAO_IN_ENV_there) { // Get a reference to the ORB. CORBA::ORB_ptr orb_ptr = @@ -68,7 +68,7 @@ Quoter_Generic_Factory_i::get_naming_context (const CosLifeCycle::Key &factory_k // exception. if (env_here.exception () != 0) // throw a NoFactory exception { - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -84,7 +84,7 @@ Quoter_Generic_Factory_i::get_naming_context (const CosLifeCycle::Key &factory_k // exception. if (env_here.exception () != 0) // throw a NoFactory exception { - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -95,7 +95,7 @@ Quoter_Generic_Factory_i::get_naming_context (const CosLifeCycle::Key &factory_k // exception. if (env_here.exception () != 0) // throw a NoFactory exception { - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -108,7 +108,7 @@ Quoter_Generic_Factory_i::get_naming_context (const CosLifeCycle::Key &factory_k CORBA::Object_ptr Quoter_Generic_Factory_i::create_object (const CosLifeCycle::Key &factory_key, const CosLifeCycle::Criteria &the_criteria, - CORBA::Environment &_env_there) + CORBA::Environment &TAO_IN_ENV_there) { ACE_UNUSED_ARG (the_criteria); @@ -117,7 +117,7 @@ Quoter_Generic_Factory_i::create_object (const CosLifeCycle::Key &factory_key, CosNaming::NamingContext_var quoterNamingContext_var = this->get_naming_context (factory_key, env_here, - _env_there); + TAO_IN_ENV_there); // ** now a proper reference to the quoter naming context is // available @@ -134,7 +134,7 @@ Quoter_Generic_Factory_i::create_object (const CosLifeCycle::Key &factory_key, // exception. if (env_here.exception () != 0) // throw a NoFactory exception { - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -143,7 +143,7 @@ Quoter_Generic_Factory_i::create_object (const CosLifeCycle::Key &factory_key, // Check if it is a valid Quoter Factory reference if (CORBA::is_nil (quoterFactoryObject_var.in())) { // throw a NoFactory exception - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } else @@ -151,7 +151,7 @@ Quoter_Generic_Factory_i::create_object (const CosLifeCycle::Key &factory_key, // Check if it is a valid Quoter Factory reference. if (CORBA::is_nil (quoterFactoryObject_var.in ())) // throw a NoFactory exception. { - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -163,7 +163,7 @@ Quoter_Generic_Factory_i::create_object (const CosLifeCycle::Key &factory_key, // exception. if (env_here.exception () != 0) // throw a NoFactory exception { - _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -178,7 +178,7 @@ Quoter_Generic_Factory_i::create_object (const CosLifeCycle::Key &factory_key, // Now retrieve the Quoter obj ref corresponding to the key. Stock::Quoter_var quoter_var = factory_var->create_quoter ("test", - _env_there); + TAO_IN_ENV_there); ACE_DEBUG ((LM_DEBUG, "Quoter Created\n")); diff --git a/TAO/examples/Quoter/Quoter_i.cpp b/TAO/examples/Quoter/Quoter_i.cpp index d08659e48bd..a7cdd1259c8 100644 --- a/TAO/examples/Quoter/Quoter_i.cpp +++ b/TAO/examples/Quoter/Quoter_i.cpp @@ -122,7 +122,7 @@ Quoter_i::get_quote (char const *stock_name, CosLifeCycle::LifeCycleObject_ptr Quoter_i::copy (CosLifeCycle::FactoryFinder_ptr there, const CosLifeCycle::Criteria &the_criteria, - CORBA::Environment &_env_there) + CORBA::Environment &TAO_IN_ENV_there) { TAO_TRY { @@ -145,13 +145,13 @@ Quoter_i::copy (CosLifeCycle::FactoryFinder_ptr there, // Find an appropriate factory over there. CosLifeCycle::Factories_ptr factories_ptr = - there->find_factories (factoryKey, _env_there); + there->find_factories (factoryKey, TAO_IN_ENV_there); // Only a NoFactory exception might have occured, so if it // occured, then go immediately back. - if (_env_there.exception() != 0) + if (TAO_IN_ENV_there.exception() != 0) { - // _env_there contains already the exception. + // TAO_IN_ENV_there contains already the exception. ACE_ERROR ((LM_ERROR, "Quoter::copy: Exception occured while trying to find a factory.\n")); @@ -202,7 +202,7 @@ Quoter_i::copy (CosLifeCycle::FactoryFinder_ptr there, // If we had already our last chance, then give up. if (i == factories_ptr->length ()) { - _env_there.exception (new CosLifeCycle::NoFactory (factoryKey)); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory (factoryKey)); ACE_ERROR ((LM_ERROR, "Quoter::copy: Last factory did not work. \n" "No more factories are available. I give up.\n")); @@ -232,7 +232,7 @@ Quoter_i::copy (CosLifeCycle::FactoryFinder_ptr there, { TAO_TRY_ENV.print_exception ("SYS_EX"); // Report a NoFactory exception back to the caller - _env_there.exception (new CosLifeCycle::NoFactory ()); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory ()); return CosLifeCycle::LifeCycleObject::_nil(); } TAO_ENDTRY_RETURN (CosLifeCycle::LifeCycleObject::_nil()); @@ -244,7 +244,7 @@ Quoter_i::copy (CosLifeCycle::FactoryFinder_ptr there, void Quoter_i::move (CosLifeCycle::FactoryFinder_ptr there, const CosLifeCycle::Criteria &the_criteria, - CORBA::Environment &_env_there) + CORBA::Environment &TAO_IN_ENV_there) { ACE_DEBUG ((LM_DEBUG,"Quoter_i::move: being called\n")); @@ -255,7 +255,7 @@ Quoter_i::move (CosLifeCycle::FactoryFinder_ptr there, { ACE_ERROR ((LM_ERROR, "Quoter_i::move: No Factory Finder, don't know how to go on.\n")); - _env_there.exception (new CosLifeCycle::NoFactory ()); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory ()); return; } @@ -264,15 +264,15 @@ Quoter_i::move (CosLifeCycle::FactoryFinder_ptr there, { ACE_ERROR ((LM_ERROR, "Quoter_i::move: No access to the POA. Cannot move.\n")); - _env_there.exception (new CosLifeCycle::NotMovable ()); + TAO_IN_ENV_there.exception (new CosLifeCycle::NotMovable ()); return; } // Create a new Quoter over there CosLifeCycle::LifeCycleObject_var lifeCycleObject_var = - this->copy (there, the_criteria, _env_there); + this->copy (there, the_criteria, TAO_IN_ENV_there); - if (_env_there.exception () != 0) + if (TAO_IN_ENV_there.exception () != 0) { ACE_ERROR ((LM_ERROR, "Quoter_i::move: Exception while creating new Quoter.\n")); @@ -284,7 +284,7 @@ Quoter_i::move (CosLifeCycle::FactoryFinder_ptr there, { ACE_ERROR ((LM_ERROR, "Quoter_i::move: Created Quoter is not valid.\n")); - _env_there.exception (new CosLifeCycle::NoFactory ()); + TAO_IN_ENV_there.exception (new CosLifeCycle::NoFactory ()); return; } @@ -303,7 +303,7 @@ Quoter_i::move (CosLifeCycle::FactoryFinder_ptr there, if (servant == 0) { ACE_ERROR ((LM_ERROR,"Quoter_i::move: Could not find servant.\n")); - _env_there.exception (new CosLifeCycle::NotMovable()); + TAO_IN_ENV_there.exception (new CosLifeCycle::NotMovable()); return; } @@ -319,7 +319,7 @@ Quoter_i::move (CosLifeCycle::FactoryFinder_ptr there, else { ACE_ERROR ((LM_ERROR,"Quoter_i::move: forward_to refenence is nil.\n")); - _env_there.exception (new CosLifeCycle::NotMovable()); + TAO_IN_ENV_there.exception (new CosLifeCycle::NotMovable()); return; } diff --git a/TAO/examples/Simple/bank/AccountManager_i.cpp b/TAO/examples/Simple/bank/AccountManager_i.cpp index d66003dfbb7..56da62e1e23 100644 --- a/TAO/examples/Simple/bank/AccountManager_i.cpp +++ b/TAO/examples/Simple/bank/AccountManager_i.cpp @@ -44,7 +44,7 @@ AccountManager_i::set_orb_manager (TAO_ORB_Manager *orb_manager) Bank::Account_ptr AccountManager_i::open (const char *name, CORBA::Float initial_balance, - CORBA::Environment &_env) + CORBA::Environment &TAO_IN_ENV) { Account_i *result = 0; @@ -93,7 +93,7 @@ AccountManager_i::open (const char *name, void AccountManager_i::close (Bank::Account_ptr account, - CORBA::Environment &_env) + CORBA::Environment &TAO_IN_ENV) { TAO_TRY { diff --git a/TAO/examples/Simple/grid/Grid_i.cpp b/TAO/examples/Simple/grid/Grid_i.cpp index fc4b7c36ad0..fd666f864b3 100644 --- a/TAO/examples/Simple/grid/Grid_i.cpp +++ b/TAO/examples/Simple/grid/Grid_i.cpp @@ -15,7 +15,7 @@ Grid_i::Grid_i (void) // Constructor. Grid_i::Grid_i (CORBA::Short x, CORBA::Short y, - CORBA::Environment &_env) + CORBA::Environment &TAO_IN_ENV) : width_ (x), height_ (y) { @@ -44,7 +44,7 @@ void Grid_i::set (CORBA::Short x, CORBA::Short y, CORBA::Long value, - CORBA::Environment &_env) + CORBA::Environment &TAO_IN_ENV) { if (x < 0 || y < 0 @@ -60,7 +60,7 @@ Grid_i::set (CORBA::Short x, CORBA::Long Grid_i::get (CORBA::Short x, CORBA::Short y, - CORBA::Environment &_env) + CORBA::Environment &TAO_IN_ENV) { if (x < 0 || y < 0 @@ -74,27 +74,27 @@ Grid_i::get (CORBA::Short x, // Access methods. CORBA::Short -Grid_i::width (CORBA::Environment &_env) +Grid_i::width (CORBA::Environment &TAO_IN_ENV) { return this->width_; } CORBA::Short -Grid_i::height (CORBA::Environment &_env) +Grid_i::height (CORBA::Environment &TAO_IN_ENV) { return this->height_; } void Grid_i::width (CORBA::Short x, - CORBA::Environment &_env) + CORBA::Environment &TAO_IN_ENV) { this->width_ = x; } void Grid_i::height (CORBA::Short y, - CORBA::Environment &_env) + CORBA::Environment &TAO_IN_ENV) { this->height_ = y; } @@ -102,7 +102,7 @@ Grid_i::height (CORBA::Short y, // Destroy the grid void -Grid_i::destroy (CORBA::Environment &_env) +Grid_i::destroy (CORBA::Environment &TAO_IN_ENV) { // Delete the array. for (int i = 0; i < height_; i++) @@ -153,7 +153,7 @@ Grid_Factory_i::~Grid_Factory_i (void) Grid_ptr Grid_Factory_i::make_grid (CORBA::Short width, CORBA::Short height, - CORBA::Environment &_env) + CORBA::Environment &TAO_IN_ENV) { Grid_i *grid_ptr = 0; @@ -171,10 +171,10 @@ Grid_Factory_i::make_grid (CORBA::Short width, // This attempts to create a new Grid_i and throws an exception and // returns a null value if it fails ACE_NEW_THROW_RETURN (grid_ptr, - Grid_i (width, height, _env), + Grid_i (width, height, TAO_IN_ENV), CORBA::NO_MEMORY (CORBA::COMPLETED_NO), Grid::_nil ()); // Register the Grid pointer. - return grid_ptr->_this (_env); + return grid_ptr->_this (TAO_IN_ENV); } |