Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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.
 
 TListIter (const TListIter &iter)
 Copy ctor.
 
 ~TListIter ()
 
const TCollectionGetCollection () const
 
Option_tGetOption () const
 Returns the object option stored in the list.
 
TObjectNext ()
 Return next object in the list. Returns 0 when no more objects in list.
 
Bool_t operator!= (const TIterator &aIter) const
 This operator compares two TIterator objects.
 
Bool_t operator!= (const TListIter &aIter) const
 This operator compares two TListIter objects.
 
TObjectoperator* () const
 Return current object or nullptr.
 
TIteratoroperator= (const TIterator &rhs)
 Overridden assignment operator.
 
TListIteroperator= (const TListIter &rhs)
 Overloaded assignment operator.
 
void Reset ()
 Reset list iterator.
 
void SetOption (Option_t *option)
 Sets the object option stored in the list.
 
- Public Member Functions inherited from TIterator
virtual ~TIterator ()
 
TObjectoperator() ()
 
Bool_t operator== (const TIterator &other) const
 

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 1054 of file TList.cxx.

◆ TListIter() [3/3]

TListIter::TListIter ( const TListIter iter)

Copy ctor.

Definition at line 1063 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 1144 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 1113 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 1170 of file TList.cxx.

◆ operator!=() [2/2]

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

This operator compares two TListIter objects.

Definition at line 1185 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 1077 of file TList.cxx.

◆ operator=() [2/2]

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

Overloaded assignment operator.

Definition at line 1096 of file TList.cxx.

◆ Reset()

void TListIter::Reset ( )
virtual

Reset list iterator.

Implements TIterator.

Definition at line 1161 of file TList.cxx.

◆ SetOption()

void TListIter::SetOption ( Option_t option)

Sets the object option stored in the list.

Definition at line 1153 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.

  • core/cont/inc/TList.h
  • core/cont/src/TList.cxx