#include <OTC/collctn/pritertr.hh> template<class T1, class T2> class OTC_PairIterator {
public:
static os_typespec* get_os_typespec();
inline ~OTC_PairIterator();
inline OTC_PairIterator();
inline OTC_PairIterator(OTC_PairCursor<T1,T2>* theIter);
inline OTC_PairIterator(OTC_PairIterator<T1,T2> const& theIter);
inline OTC_PairIterator<T1,T2>& operator=( OTC_PairCursor<T1,T2>* theIter );
inline OTC_PairIterator<T1,T2>& operator=( OTC_PairIterator<T1,T2> const& theIter );
inline void next();
inline void reset();
inline T1 const& key() const;
inline T2 const& item() const;
inline OTC_Boolean isValid() const;
inline OTC_PairIterator<T1,T2> clone() const;
inline void apply(OTC_PairVisitor<T1,T2>& theApplicator);
protected:
inline T2& _item() const;
inline OTC_PairCursor<T1,T2>* _clone() const;
inline void _apply(OTC_PairVisitor<T1,T2>& theApplicator);
inline void _apply(OTC_PairWorker<T1,T2>& theApplicator);
};
new
.
inline OTC_PairIterator();
inline OTC_PairIterator(OTC_PairCursor<T1,T2>* theIter);
0
will
result in a nil iterator being
constructed.
inline OTC_PairIterator(OTC_PairIterator<T1,T2> const& theIter);
inline OTC_PairIterator<T1,T2>& operator=(
OTC_PairCursor<T1,T2>* theIter
);
theIter
.
If theIter
is 0
, the iterator
is turned into a null iterator and
all associations with the previous
collection are lost.
inline OTC_PairIterator<T1,T2>& operator=(
OTC_PairIterator<T1,T2> const& theIter
);
theIter
.
inline void next();
inline void reset();
inline T1 const& key() const;
inline T2 const& item() const;
inline OTC_Boolean isValid() const;
OTCLIB_TRUE
while there is a
valid data item under the current location
of the iterator.
inline OTC_PairIterator<T1,T2> clone() const;
inline void apply(OTC_PairVisitor<T1,T2>& theApplicator);
theApplicator
to each key/item
pair accessible by this iterator.