diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:11 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:11 +0000 |
commit | 6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (patch) | |
tree | da50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/orbsvcs/ImplRepo_Service/Iterator.cpp | |
parent | 0e555b9150d38e3b3473ba325b56db2642e6352b (diff) | |
download | ATCD-6b846cf03c0bcbd8c276cb0af61a181e5f98eaae.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service/Iterator.cpp')
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/Iterator.cpp | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/Iterator.cpp b/TAO/orbsvcs/ImplRepo_Service/Iterator.cpp deleted file mode 100644 index 1ed369991c2..00000000000 --- a/TAO/orbsvcs/ImplRepo_Service/Iterator.cpp +++ /dev/null @@ -1,91 +0,0 @@ -//============================================================================= -/** - * @file Iterator.cpp - * - * $Id$ - * - * @brief This file declares ImR's iterator. - * - * @author Darrell Brunsch <brunsch@cs.wustl.edu> - */ -//============================================================================= - -#include "Iterator.h" - -ImR_Iterator::ImR_Iterator (CORBA::ULong n, Locator_Repository& repo, PortableServer::POA_ptr poa) - : repo_(repo) - , count_(n) - , poa_(poa) -{ -} - - -CORBA::Boolean -ImR_Iterator::next_n (CORBA::ULong how_many, - ImplementationRepository::ServerInformationList_out server_list - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_NEW_THROW_EX (server_list, - ImplementationRepository::ServerInformationList(0), CORBA::NO_MEMORY()); - - Locator_Repository::SIMap::ENTRY* entry = 0; - Locator_Repository::SIMap::ITERATOR it (this->repo_.servers ()); - - // Number of servers that will go into the server_list. - CORBA::ULong n = this->repo_.servers().current_size(); - if (n <= this->count_) - { - return 0; // We already finished. - } - else - { - n -= this->count_; - } - - if (how_many > 0 && n > how_many) - { - n = how_many; - } - - server_list->length (n); - - CORBA::ULong i = 0; - for (; i < this->count_; ++i) - { - it.advance (); - } - - for (i = 0; i < n; ++i) - { - it.next (entry); - it.advance (); - ACE_ASSERT(entry != 0); - - Server_Info_Ptr info = entry->int_id_; - - server_list[i].server = info->name.c_str (); - server_list[i].startup.command_line = info->cmdline.c_str (); - server_list[i].startup.environment = info->env_vars; - server_list[i].startup.working_directory = info->dir.c_str (); - server_list[i].startup.activation = info->activation_mode; - server_list[i].startup.activator = info->activator.c_str (); - server_list[i].startup.start_limit = info->start_limit; - server_list[i].partial_ior = info->partial_ior.c_str (); - } - - this->count_ += n; - - return 1; -} - - -void -ImR_Iterator::destroy (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - PortableServer::ObjectId_var oid = poa_->servant_to_id (this ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - poa_->deactivate_object (oid.in() ACE_ENV_ARG_PARAMETER); - ACE_CHECK; -} |