summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/ImplRepo_Service/Iterator.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service/Iterator.h')
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Iterator.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/Iterator.h b/TAO/orbsvcs/ImplRepo_Service/Iterator.h
index 2acb593021e..40059bcd58f 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Iterator.h
+++ b/TAO/orbsvcs/ImplRepo_Service/Iterator.h
@@ -14,10 +14,14 @@
#ifndef IMR_ITERATOR_H
#define IMR_ITERATOR_H
-#include "Server_Repository.h"
+#include "Locator_Repository.h"
#include "tao/PortableServer/PortableServerC.h"
#include "tao/PortableServer/ImplRepoS.h"
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
/**
* @class ImR_Iterator
*
@@ -26,15 +30,10 @@
*/
class ImR_Iterator
: public POA_ImplementationRepository::ServerInformationIterator
+ , public PortableServer::RefCountServantBase
{
public:
- /// Constructor
- /// Ownership of iterator is transfered to this class (we'll delete it)
- ImR_Iterator (Server_Repository::HASH_IMR_MAP::ITERATOR *iterator,
- PortableServer::POA_ptr poa);
-
- /// Destructor
- ~ImR_Iterator ();
+ ImR_Iterator (CORBA::ULong n, Locator_Repository& repo, PortableServer::POA_ptr poa);
/// Returns the next list of up to <how_many> servers. If empty, will return
/// false.
@@ -45,15 +44,13 @@ public:
)
ACE_THROW_SPEC ((CORBA::SystemException));
- /// Destroys the iterator.
virtual void destroy (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
private:
- /// Our very own iterator for transversing the server repository.
- Server_Repository::HASH_IMR_MAP::ITERATOR *iterator_;
-
- PortableServer::POA_var poa_;
+ Locator_Repository& repo_;
+ CORBA::ULong count_;
+ PortableServer::POA_ptr poa_;
};
#endif /* IMR_ITERATOR_H */