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 override
 
Option_tGetOption () const override
 Returns the object option stored in the list.
 
TClassIsA () const override
 
TObjectNext () override
 Return next object in the list. Returns 0 when no more objects in list.
 
Bool_t operator!= (const TIterator &aIter) const override
 This operator compares two TIterator objects.
 
Bool_t operator!= (const TListIter &aIter) const
 This operator compares two TListIter objects.
 
TObjectoperator* () const override
 Return current object or nullptr.
 
TIteratoroperator= (const TIterator &rhs) override
 Overridden assignment operator.
 
TListIteroperator= (const TListIter &rhs)
 Overloaded assignment operator.
 
void Reset () override
 Reset list iterator.
 
void SetOption (Option_t *option)
 Sets the object option stored in the list.
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TIterator
virtual ~TIterator ()
 
TObjectoperator() ()
 
Bool_t operator== (const TIterator &other) const
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TIterator
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

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

◆ Class()

static TClass * TListIter::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TListIter::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TListIter::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 228 of file TList.h.

◆ DeclFileName()

static const char * TListIter::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 228 of file TList.h.

◆ GetCollection()

const TCollection * TListIter::GetCollection ( ) const
inlineoverridevirtual

Implements TIterator.

Definition at line 219 of file TList.h.

◆ GetOption()

Option_t * TListIter::GetOption ( ) const
overridevirtual

Returns the object option stored in the list.

Reimplemented from TIterator.

Definition at line 1142 of file TList.cxx.

◆ IsA()

TClass * TListIter::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TIterator.

Reimplemented in TListOfEnumsWithLockIter, and TListOfFunctionsIter.

Definition at line 228 of file TList.h.

◆ Next()

TObject * TListIter::Next ( )
overridevirtual

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
overridevirtual

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
inlineoverridevirtual

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)
overridevirtual

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 ( )
overridevirtual

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.

◆ Streamer()

void TListIter::Streamer ( TBuffer )
overridevirtual

Reimplemented from TIterator.

Reimplemented in TListOfEnumsWithLockIter, and TListOfFunctionsIter.

◆ StreamerNVirtual()

void TListIter::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 228 of file TList.h.

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