ROOT logo
ROOT » CORE » CONT » TRefArrayIter

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


TRefArrayIter

Iterator of object array.


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

TRefArray::Iterator_t

Function Members (Methods)

public:
TRefArrayIter(const TRefArrayIter& iter)
TRefArrayIter(const TRefArray* arr, Bool_t dir = kIterForward)
virtual~TRefArrayIter()
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 TRefArrayIter& 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)
TRefArrayIter&operator=(const TRefArrayIter& 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:
TRefArrayIter()

Data Members

private:
const TRefArray*fArrayarray being iterated
Int_tfCurCursorcurrent position in array
Int_tfCursornext position in array
Bool_tfDirectioniteration direction

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TRefArrayIter(const TRefArray* arr, Bool_t dir = kIterForward)
 Create array iterator. By default the iteration direction
 is kIterForward. To go backward use kIterBackward.
TRefArrayIter(const TRefArrayIter& iter)
 Copy ctor.
TIterator & operator=(const TIterator &rhs)
 Overridden assignment operator.
TRefArrayIter & operator=(const TRefArrayIter &rhs)
 Overloaded assignment operator.
TObject * Next()
 Return next object in array. Returns 0 when no more objects in array.
void Reset()
 Reset array iterator.
bool operator!=(const TIterator &aIter)
 This operator compares two TIterator objects.
bool operator!=(const TRefArrayIter &aIter)
 This operator compares two TRefArrayIter objects.
TObject * operator*() const
 Return current object or nullptr.
TRefArrayIter()
{ }
~TRefArrayIter()
{ }
const TCollection * GetCollection() const
{ return fArray; }