Loading [MathJax]/extensions/tex2jax.js
Logo ROOT  
Reference Guide
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
THashTableIter Class Reference

Iterator of hash table.

Definition at line 113 of file THashTable.h.

Public Member Functions

 THashTableIter (const THashTable *ht, Bool_t dir=kIterForward)
 Create a hashtable iterator. More...
 
 THashTableIter (const THashTableIter &iter)
 Copy ctor. More...
 
 ~THashTableIter ()
 Delete hashtable iterator. More...
 
const TCollectionGetCollection () const
 
TObjectNext ()
 Return next object in hashtable. Returns 0 when no more objects in table. More...
 
Bool_t operator!= (const THashTableIter &aIter) const
 This operator compares two THashTableIter objects. More...
 
Bool_t operator!= (const TIterator &aIter) const
 This operator compares two TIterator objects. More...
 
TObjectoperator* () const
 Return pointer to current object or nullptr. More...
 
THashTableIteroperator= (const THashTableIter &rhs)
 Overloaded assignment operator. More...
 
TIteratoroperator= (const TIterator &rhs)
 Overridden assignment operator. More...
 
void Reset ()
 Reset the hashtable iterator. More...
 
- Public Member Functions inherited from TIterator
virtual ~TIterator ()
 
virtual const TCollectionGetCollection () const =0
 
virtual Option_tGetOption () const
 
virtual TObjectNext ()=0
 
virtual Bool_t operator!= (const TIterator &) const
 Compare two iterator objects. More...
 
TObjectoperator() ()
 
virtual TObjectoperator* () const
 Return current object or nullptr. More...
 
virtual TIteratoroperator= (const TIterator &)
 
Bool_t operator== (const TIterator &other) const
 
virtual void Reset ()=0
 

Private Member Functions

 THashTableIter ()
 
Int_t NextSlot ()
 Returns index of next slot in table containing list to be iterated. More...
 

Private Attributes

Int_t fCursor
 
Bool_t fDirection
 
TListIterfListCursor
 
const THashTablefTable
 

Additional Inherited Members

- Protected Member Functions inherited from TIterator
 TIterator ()
 
 TIterator (const TIterator &)
 

#include <THashTable.h>

Inheritance diagram for THashTableIter:
[legend]

Constructor & Destructor Documentation

◆ THashTableIter() [1/3]

THashTableIter::THashTableIter ( )
inlineprivate

Definition at line 121 of file THashTable.h.

◆ THashTableIter() [2/3]

THashTableIter::THashTableIter ( const THashTable ht,
Bool_t  dir = kIterForward 
)

Create a hashtable iterator.

By default the iteration direction is kIterForward. To go backward use kIterBackward.

Definition at line 473 of file THashTable.cxx.

◆ THashTableIter() [3/3]

THashTableIter::THashTableIter ( const THashTableIter iter)

Copy ctor.

Definition at line 484 of file THashTable.cxx.

◆ ~THashTableIter()

THashTableIter::~THashTableIter ( )

Delete hashtable iterator.

Definition at line 541 of file THashTable.cxx.

Member Function Documentation

◆ GetCollection()

const TCollection * THashTableIter::GetCollection ( ) const
inlinevirtual

Implements TIterator.

Definition at line 131 of file THashTable.h.

◆ Next()

TObject * THashTableIter::Next ( )
virtual

Return next object in hashtable. Returns 0 when no more objects in table.

Implements TIterator.

Definition at line 549 of file THashTable.cxx.

◆ NextSlot()

Int_t THashTableIter::NextSlot ( )
private

Returns index of next slot in table containing list to be iterated.

Definition at line 570 of file THashTable.cxx.

◆ operator!=() [1/2]

Bool_t THashTableIter::operator!= ( const THashTableIter aIter) const

This operator compares two THashTableIter objects.

Definition at line 619 of file THashTable.cxx.

◆ operator!=() [2/2]

Bool_t THashTableIter::operator!= ( const TIterator aIter) const
virtual

This operator compares two TIterator objects.

Reimplemented from TIterator.

Definition at line 607 of file THashTable.cxx.

◆ operator*()

TObject * THashTableIter::operator* ( ) const
virtual

Return pointer to current object or nullptr.

Reimplemented from TIterator.

Definition at line 627 of file THashTable.cxx.

◆ operator=() [1/2]

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

Overloaded assignment operator.

Definition at line 521 of file THashTable.cxx.

◆ operator=() [2/2]

TIterator & THashTableIter::operator= ( const TIterator rhs)
virtual

Overridden assignment operator.

Reimplemented from TIterator.

Definition at line 500 of file THashTable.cxx.

◆ Reset()

void THashTableIter::Reset ( void  )
virtual

Reset the hashtable iterator.

Either to beginning or end, depending on the initial iteration direction.

Implements TIterator.

Definition at line 595 of file THashTable.cxx.

Member Data Documentation

◆ fCursor

Int_t THashTableIter::fCursor
private

Definition at line 117 of file THashTable.h.

◆ fDirection

Bool_t THashTableIter::fDirection
private

Definition at line 119 of file THashTable.h.

◆ fListCursor

TListIter* THashTableIter::fListCursor
private

Definition at line 118 of file THashTable.h.

◆ fTable

const THashTable* THashTableIter::fTable
private

Definition at line 116 of file THashTable.h.


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