Logo ROOT  
Reference Guide
TRefArrayIter Class Reference

Iterator of object array.

Definition at line 116 of file TRefArray.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

 TRefArrayIter (const TRefArray *arr, Bool_t dir=kIterForward)
 Create array iterator. More...
 
 TRefArrayIter (const TRefArrayIter &iter)
 Copy ctor. More...
 
 ~TRefArrayIter ()
 
const TCollectionGetCollection () const override
 
TClassIsA () const override
 
TObjectNext () override
 Return next object in array. Returns 0 when no more objects in array. More...
 
Bool_t operator!= (const TIterator &aIter) const override
 This operator compares two TIterator objects. More...
 
Bool_t operator!= (const TRefArrayIter &aIter) const
 This operator compares two TRefArrayIter objects. More...
 
TObjectoperator* () const override
 Return current object or nullptr. More...
 
TIteratoroperator= (const TIterator &rhs) override
 Overridden assignment operator. More...
 
TRefArrayIteroperator= (const TRefArrayIter &rhs)
 Overloaded assignment operator. More...
 
void Reset () override
 Reset array iterator. More...
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TIterator
virtual ~TIterator ()
 
virtual const TCollectionGetCollection () const =0
 
virtual Option_tGetOption () const
 
virtual TClassIsA () 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 &)=0
 
Bool_t operator== (const TIterator &other) const
 
virtual void Reset ()=0
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

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

Private Member Functions

 TRefArrayIter ()
 

Private Attributes

const TRefArrayfArray
 
Int_t fCurCursor
 
Int_t fCursor
 
Bool_t fDirection
 

Additional Inherited Members

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

#include <TRefArray.h>

Inheritance diagram for TRefArrayIter:
[legend]

Member Typedef Documentation

◆ const_pointer

Definition at line 131 of file TRefArray.h.

◆ difference_type

using TRefArrayIter::difference_type = std::ptrdiff_t

Definition at line 129 of file TRefArray.h.

◆ iterator_category

using TRefArrayIter::iterator_category = std::bidirectional_iterator_tag

Definition at line 127 of file TRefArray.h.

◆ pointer

Definition at line 130 of file TRefArray.h.

◆ reference

Definition at line 132 of file TRefArray.h.

◆ value_type

Definition at line 128 of file TRefArray.h.

Constructor & Destructor Documentation

◆ TRefArrayIter() [1/3]

TRefArrayIter::TRefArrayIter ( )
inlineprivate

Definition at line 124 of file TRefArray.h.

◆ TRefArrayIter() [2/3]

TRefArrayIter::TRefArrayIter ( const TRefArray arr,
Bool_t  dir = kIterForward 
)

Create array iterator.

By default the iteration direction is kIterForward. To go backward use kIterBackward.

Definition at line 851 of file TRefArray.cxx.

◆ TRefArrayIter() [3/3]

TRefArrayIter::TRefArrayIter ( const TRefArrayIter iter)

Copy ctor.

Definition at line 861 of file TRefArray.cxx.

◆ ~TRefArrayIter()

TRefArrayIter::~TRefArrayIter ( )
inline

Definition at line 136 of file TRefArray.h.

Member Function Documentation

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

static Version_t TRefArrayIter::Class_Version ( )
inlinestatic
Returns
Version of this class

Definition at line 147 of file TRefArray.h.

◆ DeclFileName()

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

Definition at line 147 of file TRefArray.h.

◆ GetCollection()

const TCollection * TRefArrayIter::GetCollection ( ) const
inlineoverridevirtual

Implements TIterator.

Definition at line 140 of file TRefArray.h.

◆ IsA()

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

Reimplemented from TIterator.

Definition at line 147 of file TRefArray.h.

◆ Next()

TObject * TRefArrayIter::Next ( )
overridevirtual

Return next object in array. Returns 0 when no more objects in array.

Implements TIterator.

Definition at line 901 of file TRefArray.cxx.

◆ operator!=() [1/2]

Bool_t TRefArrayIter::operator!= ( const TIterator aIter) const
overridevirtual

This operator compares two TIterator objects.

Reimplemented from TIterator.

Definition at line 941 of file TRefArray.cxx.

◆ operator!=() [2/2]

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

This operator compares two TRefArrayIter objects.

Definition at line 953 of file TRefArray.cxx.

◆ operator*()

TObject * TRefArrayIter::operator* ( ) const
overridevirtual

Return current object or nullptr.

Reimplemented from TIterator.

Definition at line 961 of file TRefArray.cxx.

◆ operator=() [1/2]

TIterator & TRefArrayIter::operator= ( const TIterator rhs)
overridevirtual

Overridden assignment operator.

Implements TIterator.

Definition at line 872 of file TRefArray.cxx.

◆ operator=() [2/2]

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

Overloaded assignment operator.

Definition at line 887 of file TRefArray.cxx.

◆ Reset()

void TRefArrayIter::Reset ( void  )
overridevirtual

Reset array iterator.

Implements TIterator.

Definition at line 928 of file TRefArray.cxx.

◆ Streamer()

void TRefArrayIter::Streamer ( TBuffer )
overridevirtual

Reimplemented from TIterator.

◆ StreamerNVirtual()

void TRefArrayIter::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 147 of file TRefArray.h.

Member Data Documentation

◆ fArray

const TRefArray* TRefArrayIter::fArray
private

Definition at line 119 of file TRefArray.h.

◆ fCurCursor

Int_t TRefArrayIter::fCurCursor
private

Definition at line 120 of file TRefArray.h.

◆ fCursor

Int_t TRefArrayIter::fCursor
private

Definition at line 121 of file TRefArray.h.

◆ fDirection

Bool_t TRefArrayIter::fDirection
private

Definition at line 122 of file TRefArray.h.


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