blob: 1ae730b73fc14aa3915226bdf1a24fdb68f89c98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
// -*- C++ -*-
//=============================================================================
/**
* @file Iterator.h
*
* $Id$
*
* @brief This file declares ImR's iterator.
*
* @author Darrell Brunsch <brunsch@cs.wustl.edu>
*/
//=============================================================================
#ifndef IMR_ITERATOR_H
#define IMR_ITERATOR_H
#include "Repository.h"
#include "tao/PortableServer/PortableServerC.h"
#include "tao/PortableServer/ImplRepoS.h"
/**
* @class ImR_Iterator
*
* @brief The Iterator for servers in the ImR.
*
*/
class ImR_Iterator
: public POA_ImplementationRepository::ServerInformationIterator
{
public:
/// Constructor
/// Ownership of iterator is transfered to this class (we'll delete it)
ImR_Iterator (Server_Repository::HASH_IMR_ITER *iterator,
PortableServer::POA_ptr poa);
/// Destructor
~ImR_Iterator ();
/// Returns the next list of up to <how_many> servers. If empty, will return
/// false.
virtual CORBA::Boolean next_n (
CORBA::ULong how_many,
ImplementationRepository::ServerInformationList_out server_list,
CORBA::Environment &ACE_TRY_ENV
= CORBA::Environment::default_environment ()
)
ACE_THROW_SPEC ((CORBA::SystemException));
/// Destroys the iterator.
virtual void destroy (CORBA::Environment &ACE_TRY_ENV
= CORBA::Environment::default_environment ())
ACE_THROW_SPEC ((CORBA::SystemException));
private:
/// Our very own iterator for transversing the server repository.
Server_Repository::HASH_IMR_ITER *iterator_;
/// Our lovely POA.
PortableServer::POA_var poa_;
};
#endif /* IMR_ITERATOR_H */
|