ROOT logo
ROOT » CORE » CONT » TListIter

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


TListIter

Iterator of linked list.


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

TList::Iterator_t, TTabCom::TContIter

Function Members (Methods)

public:
TListIter(const TListIter& iter)
TListIter(const TList* l, Bool_t dir = kIterForward)
virtual~TListIter()
static TClass*Class()
static TClass*TIterator::Class()
virtual const TCollection*GetCollection() const
virtual const TCollection*TIterator::GetCollection() const
virtual Option_t*GetOption() 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 TListIter& 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)
TListIter&operator=(const TListIter& rhs)
virtual voidReset()
virtual voidTIterator::Reset()
voidSetOption(Option_t* option)
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)
protected:
TListIter()

Data Members

protected:
TObjLink*fCurCursorcurrent position in list
TObjLink*fCursornext position in list
Bool_tfDirectioniteration direction
const TList*fListlist being iterated
Bool_tfStartediteration started

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TListIter(const TList* l, Bool_t dir = kIterForward)
 Create a new list iterator. By default the iteration direction
 is kIterForward. To go backward use kIterBackward.
TListIter(const TListIter& iter)
 Copy ctor.
TIterator & operator=(const TIterator &rhs)
 Overridden assignment operator.
TListIter & operator=(const TListIter &rhs)
 Overloaded assignment operator.
TObject * Next()
 Return next object in the list. Returns 0 when no more objects in list.
Option_t * GetOption() const
 Returns the object option stored in the list.
void SetOption(Option_t* option)
 Sets the object option stored in the list.
void Reset()
 Reset list iterator.
bool operator!=(const TIterator &aIter)
 This operator compares two TIterator objects.
bool operator!=(const TListIter &aIter)
 This operator compares two TListIter objects.
TListIter()
{ }
~TListIter()
{ }
const TCollection * GetCollection() const
{ return fList; }
TObject * operator*() const
{ return (fCurCursor ? fCurCursor->GetObject() : nullptr); }