ROOT logo
ROOT » CORE » CONT » TMapIter

class TMapIter: public TIterator, public iterator<bidirectional_iterator_tag,TObject*,long,const TObject**,const TObject*&>


TMapIter

Iterator of map.


This class is also known as (typedefs to this class)

TMap::Iterator_t

Function Members (Methods)

public:
TMapIter(const TMapIter& iter)
TMapIter(const TMap* map, Bool_t dir = kIterForward)
virtual~TMapIter()
static TClass*Class()
static TClass*TIterator::Class()
virtual const TCollection*GetCollection() const
virtual const TCollection*TIterator::GetCollection() const
virtual Option_t*TIterator::GetOption() const
virtual TClass*IsA() const
virtual TClass*TIterator::IsA() const
virtual TObject*Next()
virtual TObject*TIterator::Next()
virtual booloperator!=(const TIterator& aIter) const
booloperator!=(const TMapIter& aIter) const
virtual boolTIterator::operator!=(const TIterator&) const
TObject*TIterator::operator()()
virtual TObject*operator*() const
virtual TObject*TIterator::operator*() const
virtual TIterator&operator=(const TIterator& rhs)
TMapIter&operator=(const TMapIter& rhs)
virtual TIterator&TIterator::operator=(const TIterator&)
virtual voidReset()
virtual voidTIterator::Reset()
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTIterator::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
virtual voidTIterator::Streamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidTIterator::StreamerNVirtual(TBuffer& b)
private:
TMapIter()

Data Members

private:
THashTableIter*fCursorcurrent position in map
Bool_tfDirectioniteration direction
const TMap*fMapmap being iterated

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TMapIter(const TMap* map, Bool_t dir = kIterForward)
 Create a map iterator. Use dir to specify the desired iteration direction.
TMapIter(const TMapIter& iter)
 Copy ctor.
TIterator & operator=(const TIterator &rhs)
 Overridden assignment operator.
TMapIter & operator=(const TMapIter &rhs)
 Overloaded assignment operator.
~TMapIter()
 Map iterator dtor.
TObject * Next()
 Returns the next key from a map. Use TMap::GetValue() to get the value
 associated with the key. Returns 0 when no more items in map.
void Reset()
 Reset the map iterator.
bool operator!=(const TIterator &aIter)
 This operator compares two TIterator objects.
bool operator!=(const TMapIter &aIter)
 This operator compares two TMapIter objects.
TObject * operator*() const
 Return pointer to current object (a TPair) or nullptr.
TMapIter()
{ }
const TCollection * GetCollection() const
{ return fMap; }