NAME
ACE_Unbounded_Set_Iterator - Implement an iterator over an unbounded set.
SYNOPSIS
#include <ace/Containers.h>
template<class T>
class ACE_Unbounded_Set_Iterator
{
public:
ACE_Unbounded_Set_Iterator (ACE_Unbounded_Set<T> &s, int end = 0);
int next (T *&next_item);
int advance (void);
int first (void);
int done (void) const;
void dump (void) const;
ACE_Unbounded_Set_Iterator<T> operator++ (int);
ACE_Unbounded_Set_Iterator<T>& operator++ (void);
T& operator* (void);
int operator== (const ACE_Unbounded_Set_Iterator<T> &) const;
int operator!= (const ACE_Unbounded_Set_Iterator<T> &) const;
ACE_ALLOC_HOOK_DECLARE;
private:
ACE_Node<T> *current_;
ACE_Unbounded_Set<T> *set_;
};
DESCRIPTION
This implementation of an unordered set uses a fixed array. This implementation does not allow duplicates...
Initialization method.
ACE_Unbounded_Set_Iterator (ACE_Unbounded_Set<T> &s, int end = 0);
Iteration methods.
int next (T *&next_item);
Pass back the next_item that hasn't been seen in the Set. Returns 0 when all items have been seen, else 1.
int advance (void);
Move forward by one element in the set. Returns 0 when all the items in the set have been seen, else 1.
int first (void);
Move to the first element in the set. Returns 0 if the set is empty, else 1.
int done (void) const;
Returns 1 when all items have been seen, else 0.
void dump (void) const;
Dump the state of an object.
STL styled iteration, compare, and reference functions.
ACE_Unbounded_Set_Iterator<T> operator++ (int);
Postfix advance.
ACE_Unbounded_Set_Iterator<T>& operator++ (void);
Prefix advance.
T& operator* (void);
Returns a reference to the interal element this is pointing to.
int operator== (const ACE_Unbounded_Set_Iterator<T> &) const;
int operator!= (const ACE_Unbounded_Set_Iterator<T> &) const;
Check if two iterators point to the same position
ACE_ALLOC_HOOK_DECLARE;
Declare the dynamic allocation hooks.
AUTHOR
Doug Schmidt
Initialization and termination methods.
Check boundary conditions.
Classic unordered set operations.
LIBRARY
ace