PMapIterator< K, V > Class Template Reference

Detailed Description

template<typename K, typename V>
class PMapIterator< K, V >

Iterator on a PMap.

Definition at line 32 of file PMapIterator.h.

#include <PMapIterator.h>

Constructor & Destructor Documentation

◆ PMapIterator() [1/2]

template<typename K, typename V>
PMapIterator< K, V >::PMapIterator ( )

Constructs an unbound map iterator.

◆ PMapIterator() [2/2]

template<typename K, typename V>
PMapIterator< K, V >::PMapIterator ( const PMapIterator< K, V > &  other)

Constructs a shared copy of other.

Member Function Documentation

◆ GetKey()

template<typename K, typename V>
const K& PMapIterator< K, V >::GetKey ( ) const

Returns the key associated with the current value of this iterator.

◆ GetValue() [1/2]

template<typename K, typename V>
const V& PMapIterator< K, V >::GetValue ( ) const

Returns the value associated with the current value of this iterator.

◆ GetValue() [2/2]

template<typename K, typename V>
PResult PMapIterator< K, V >::GetValue ( PObject value) const

Gets the value associated with the current iterator; if a sub-class of PObject is used as argument, then performs the cast and returns PResult::C_OK if success, or bad cast error if failure.

◆ HasNext()

template<typename K, typename V>
bool PMapIterator< K, V >::HasNext ( ) const

Returns true if this iterator has not reached the end of the map, false otherwise.

◆ Next()

template<typename K, typename V>
void PMapIterator< K, V >::Next ( )

Go to the next element if any.

◆ operator=()

template<typename K, typename V>
PMapIterator<K, V>& PMapIterator< K, V >::operator= ( const PMapIterator< K, V > &  other)

Performs a shared copy of other to this object.

Friends And Related Function Documentation

◆ PMap< K, V >

template<typename K, typename V>
friend class PMap< K, V >
friend

Definition at line 77 of file PMapIterator.h.