Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TMapIter Class Reference

Iterator of map.

Definition at line 145 of file TMap.h.

Public Types

using const_pointer = const TObject **
using difference_type = std::ptrdiff_t
using iterator_category = std::bidirectional_iterator_tag
using pointer = TObject **
using reference = const TObject *&
using value_type = TObject *

Public Member Functions

 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.
 ~TMapIter ()
 Map iterator dtor.
const TCollectionGetCollection () const override
virtual Option_tGetOption () const
TClassIsA () const override
TObjectNext () override
 Returns the next key from a map.
Bool_t operator!= (const TIterator &aIter) const override
 This operator compares two TIterator objects.
Bool_t operator!= (const TMapIter &aIter) const
 This operator compares two TMapIter objects.
TObjectoperator() ()
TObjectoperator* () const override
 Return pointer to current object (a TPair) or nullptr.
TIteratoroperator= (const TIterator &rhs) override
 Overridden assignment operator.
TMapIteroperator= (const TMapIter &rhs)
 Overloaded assignment operator.
Bool_t operator== (const TIterator &other) const
void Reset () override
 Reset the map iterator.
void Streamer (TBuffer &) override
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)

Static Public Member Functions

static TClassClass ()
static const char * Class_Name ()
static constexpr Version_t Class_Version ()
static const char * DeclFileName ()

Private Member Functions

 TMapIter ()

Private Attributes

THashTableIterfCursor
Bool_t fDirection
const TMapfMap

#include <TMap.h>

Inheritance diagram for TMapIter:
TIterator

Member Typedef Documentation

◆ const_pointer

using TMapIter::const_pointer = const TObject **

Definition at line 159 of file TMap.h.

◆ difference_type

using TMapIter::difference_type = std::ptrdiff_t

Definition at line 157 of file TMap.h.

◆ iterator_category

using TMapIter::iterator_category = std::bidirectional_iterator_tag

Definition at line 155 of file TMap.h.

◆ pointer

Definition at line 158 of file TMap.h.

◆ reference

using TMapIter::reference = const TObject *&

Definition at line 160 of file TMap.h.

◆ value_type

Definition at line 156 of file TMap.h.

Constructor & Destructor Documentation

◆ TMapIter() [1/3]

TMapIter::TMapIter ( )
inlineprivate

Definition at line 152 of file TMap.h.

◆ TMapIter() [2/3]

TMapIter::TMapIter ( const TMap * map,
Bool_t dir = kIterForward )

Create a map iterator. Use dir to specify the desired iteration direction.

Definition at line 471 of file TMap.cxx.

◆ TMapIter() [3/3]

TMapIter::TMapIter ( const TMapIter & iter)

Copy ctor.

Definition at line 481 of file TMap.cxx.

◆ ~TMapIter()

TMapIter::~TMapIter ( )

Map iterator dtor.

Definition at line 531 of file TMap.cxx.

Member Function Documentation

◆ Class()

TClass * TMapIter::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

const char * TMapIter::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

constexpr Version_t TMapIter::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 175 of file TMap.h.

◆ DeclFileName()

const char * TMapIter::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 175 of file TMap.h.

◆ GetCollection()

const TCollection * TMapIter::GetCollection ( ) const
inlineoverridevirtual

Implements TIterator.

Definition at line 168 of file TMap.h.

◆ GetOption()

virtual Option_t * TIterator::GetOption ( ) const
inlinevirtualinherited

Reimplemented in TListIter, and TTreeFriendLeafIter.

Definition at line 40 of file TIterator.h.

◆ IsA()

TClass * TMapIter::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TIterator.

Definition at line 175 of file TMap.h.

◆ Next()

TObject * TMapIter::Next ( )
overridevirtual

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.

Implements TIterator.

Definition at line 540 of file TMap.cxx.

◆ operator!=() [1/2]

Bool_t TMapIter::operator!= ( const TIterator & aIter) const
overridevirtual

This operator compares two TIterator objects.

Reimplemented from TIterator.

Definition at line 561 of file TMap.cxx.

◆ operator!=() [2/2]

Bool_t TMapIter::operator!= ( const TMapIter & aIter) const

This operator compares two TMapIter objects.

Definition at line 573 of file TMap.cxx.

◆ operator()()

TObject * TIterator::operator() ( )
inlineinherited

Definition at line 43 of file TIterator.h.

◆ operator*()

TObject * TMapIter::operator* ( ) const
overridevirtual

Return pointer to current object (a TPair) or nullptr.

Reimplemented from TIterator.

Definition at line 581 of file TMap.cxx.

◆ operator=() [1/2]

TIterator & TMapIter::operator= ( const TIterator & rhs)
overridevirtual

Overridden assignment operator.

Implements TIterator.

Definition at line 496 of file TMap.cxx.

◆ operator=() [2/2]

TMapIter & TMapIter::operator= ( const TMapIter & rhs)

Overloaded assignment operator.

Definition at line 514 of file TMap.cxx.

◆ operator==()

Bool_t TIterator::operator== ( const TIterator & other) const
inlineinherited

Definition at line 45 of file TIterator.h.

◆ Reset()

void TMapIter::Reset ( )
overridevirtual

Reset the map iterator.

Implements TIterator.

Definition at line 553 of file TMap.cxx.

◆ Streamer()

void TMapIter::Streamer ( TBuffer & )
overridevirtual

Reimplemented from TIterator.

◆ StreamerNVirtual()

void TMapIter::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 175 of file TMap.h.

Member Data Documentation

◆ fCursor

THashTableIter* TMapIter::fCursor
private

Definition at line 149 of file TMap.h.

◆ fDirection

Bool_t TMapIter::fDirection
private

Definition at line 150 of file TMap.h.

◆ fMap

const TMap* TMapIter::fMap
private

Definition at line 148 of file TMap.h.


The documentation for this class was generated from the following files: