Logo ROOT  
Reference Guide
TListIter Class Reference

Iterator of linked list.

Definition at line 197 of file TList.h.

Public Member Functions

 TListIter (const TList *l, Bool_t dir=kIterForward)
 Create a new list iterator. More...
 
 TListIter (const TListIter &iter)
 Copy ctor. More...
 
 ~TListIter ()
 
const TCollectionGetCollection () const
 
Option_tGetOption () const
 Returns the object option stored in the list. More...
 
TObjectNext ()
 Return next object in the list. Returns 0 when no more objects in list. More...
 
Bool_t operator!= (const TIterator &aIter) const
 This operator compares two TIterator objects. More...
 
Bool_t operator!= (const TListIter &aIter) const
 This operator compares two TListIter objects. More...
 
TObjectoperator* () const
 Return current object or nullptr. More...
 
TIteratoroperator= (const TIterator &rhs)
 Overridden assignment operator. More...
 
TListIteroperator= (const TListIter &rhs)
 Overloaded assignment operator. More...
 
void Reset ()
 Reset list iterator. More...
 
void SetOption (Option_t *option)
 Sets the object option stored in the list. 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
 

Protected Types

using TObjLinkPtr_t = std::shared_ptr< TObjLink >
 

Protected Member Functions

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

Protected Attributes

TObjLinkPtr_t fCurCursor
 
TObjLinkPtr_t fCursor
 
Bool_t fDirection
 
const TListfList
 
Bool_t fStarted
 

#include <TList.h>

Inheritance diagram for TListIter:
[legend]

Member Typedef Documentation

◆ TObjLinkPtr_t

using TListIter::TObjLinkPtr_t = std::shared_ptr<TObjLink>
protected

Definition at line 203 of file TList.h.

Constructor & Destructor Documentation

◆ TListIter() [1/3]

TListIter::TListIter ( )
inlineprotected

Definition at line 211 of file TList.h.

◆ TListIter() [2/3]

TListIter::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.

Definition at line 1051 of file TList.cxx.

◆ TListIter() [3/3]

TListIter::TListIter ( const TListIter iter)

Copy ctor.

Definition at line 1060 of file TList.cxx.

◆ ~TListIter()

TListIter::~TListIter ( )
inline

Definition at line 217 of file TList.h.

Member Function Documentation

◆ GetCollection()

const TCollection * TListIter::GetCollection ( ) const
inlinevirtual

Implements TIterator.

Definition at line 221 of file TList.h.

◆ GetOption()

Option_t * TListIter::GetOption ( ) const
virtual

Returns the object option stored in the list.

Reimplemented from TIterator.

Definition at line 1141 of file TList.cxx.

◆ Next()

TObject * TListIter::Next ( )
virtual

Return next object in the list. Returns 0 when no more objects in list.

Implements TIterator.

Reimplemented in TListOfEnumsWithLockIter, and TListOfFunctionsIter.

Definition at line 1110 of file TList.cxx.

◆ operator!=() [1/2]

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

This operator compares two TIterator objects.

Reimplemented from TIterator.

Definition at line 1167 of file TList.cxx.

◆ operator!=() [2/2]

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

This operator compares two TListIter objects.

Definition at line 1182 of file TList.cxx.

◆ operator*()

TObject * TListIter::operator* ( ) const
inlinevirtual

Return current object or nullptr.

For backward compatibility reasons we have to provide this default implementation.

Reimplemented from TIterator.

Definition at line 228 of file TList.h.

◆ operator=() [1/2]

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

Overridden assignment operator.

Reimplemented from TIterator.

Reimplemented in TListOfEnumsWithLockIter, and TListOfFunctionsIter.

Definition at line 1074 of file TList.cxx.

◆ operator=() [2/2]

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

Overloaded assignment operator.

Definition at line 1093 of file TList.cxx.

◆ Reset()

void TListIter::Reset ( void  )
virtual

Reset list iterator.

Implements TIterator.

Definition at line 1158 of file TList.cxx.

◆ SetOption()

void TListIter::SetOption ( Option_t option)

Sets the object option stored in the list.

Definition at line 1150 of file TList.cxx.

Member Data Documentation

◆ fCurCursor

TObjLinkPtr_t TListIter::fCurCursor
protected

Definition at line 206 of file TList.h.

◆ fCursor

TObjLinkPtr_t TListIter::fCursor
protected

Definition at line 207 of file TList.h.

◆ fDirection

Bool_t TListIter::fDirection
protected

Definition at line 208 of file TList.h.

◆ fList

const TList* TListIter::fList
protected

Definition at line 205 of file TList.h.

◆ fStarted

Bool_t TListIter::fStarted
protected

Definition at line 209 of file TList.h.


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