Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TListIter Class Reference

Iterator of linked list.

Definition at line 191 of file TList.h.

Public Types

using const_pointer = const TObject **
 
using difference_type = std::ptrdiff_t
 
using iterator_category = std::bidirectional_iterator_tag
 
using pointer = TObject **
 
using reference = const TObject *&
 
using value_type = TObject *
 

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

◆ const_pointer

Definition at line 210 of file TList.h.

◆ difference_type

using TListIter::difference_type = std::ptrdiff_t

Definition at line 208 of file TList.h.

◆ iterator_category

using TListIter::iterator_category = std::bidirectional_iterator_tag

Definition at line 206 of file TList.h.

◆ pointer

Definition at line 209 of file TList.h.

◆ reference

using TListIter::reference = const TObject *&

Definition at line 211 of file TList.h.

◆ TObjLinkPtr_t

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

Definition at line 194 of file TList.h.

◆ value_type

Definition at line 207 of file TList.h.

Constructor & Destructor Documentation

◆ TListIter() [1/3]

TListIter::TListIter ( )
inlineprotected

Definition at line 202 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 215 of file TList.h.

Member Function Documentation

◆ GetCollection()

const TCollection * TListIter::GetCollection ( ) const
inlinevirtual

Implements TIterator.

Definition at line 219 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 1142 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 1111 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 1168 of file TList.cxx.

◆ operator!=() [2/2]

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

This operator compares two TListIter objects.

Definition at line 1183 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 226 of file TList.h.

◆ operator=() [1/2]

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

Overridden assignment operator.

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

◆ Reset()

void TListIter::Reset ( )
virtual

Reset list iterator.

Implements TIterator.

Definition at line 1159 of file TList.cxx.

◆ SetOption()

void TListIter::SetOption ( Option_t option)

Sets the object option stored in the list.

Definition at line 1151 of file TList.cxx.

Member Data Documentation

◆ fCurCursor

TObjLinkPtr_t TListIter::fCurCursor
protected

Definition at line 197 of file TList.h.

◆ fCursor

TObjLinkPtr_t TListIter::fCursor
protected

Definition at line 198 of file TList.h.

◆ fDirection

Bool_t TListIter::fDirection
protected

Definition at line 199 of file TList.h.

◆ fList

const TList* TListIter::fList
protected

Definition at line 196 of file TList.h.

◆ fStarted

Bool_t TListIter::fStarted
protected

Definition at line 200 of file TList.h.

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