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

Iterator of object array.

Definition at line 123 of file TObjArray.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

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

Private Member Functions

 TObjArrayIter ()

Private Attributes

const TObjArrayfArray
Int_t fCurCursor
Int_t fCursor
Bool_t fDirection

#include <TObjArray.h>

Inheritance diagram for TObjArrayIter:
TIterator

Member Typedef Documentation

◆ const_pointer

Definition at line 138 of file TObjArray.h.

◆ difference_type

using TObjArrayIter::difference_type = std::ptrdiff_t

Definition at line 136 of file TObjArray.h.

◆ iterator_category

using TObjArrayIter::iterator_category = std::bidirectional_iterator_tag

Definition at line 134 of file TObjArray.h.

◆ pointer

Definition at line 137 of file TObjArray.h.

◆ reference

Definition at line 139 of file TObjArray.h.

◆ value_type

Definition at line 135 of file TObjArray.h.

Constructor & Destructor Documentation

◆ TObjArrayIter() [1/3]

TObjArrayIter::TObjArrayIter ( )
inlineprivate

Definition at line 131 of file TObjArray.h.

◆ TObjArrayIter() [2/3]

TObjArrayIter::TObjArrayIter ( const TObjArray * arr,
Bool_t dir = kIterForward )

Create array iterator.

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

Definition at line 879 of file TObjArray.cxx.

◆ TObjArrayIter() [3/3]

TObjArrayIter::TObjArrayIter ( const TObjArrayIter & iter)

Copy ctor.

Definition at line 889 of file TObjArray.cxx.

◆ ~TObjArrayIter()

TObjArrayIter::~TObjArrayIter ( )
inline

Definition at line 143 of file TObjArray.h.

Member Function Documentation

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

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

Definition at line 154 of file TObjArray.h.

◆ DeclFileName()

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

Definition at line 154 of file TObjArray.h.

◆ GetCollection()

const TCollection * TObjArrayIter::GetCollection ( ) const
inlineoverridevirtual

Implements TIterator.

Definition at line 147 of file TObjArray.h.

◆ GetOption()

virtual Option_t * TIterator::GetOption ( ) const
inlinevirtualinherited

Reimplemented in TListIter, and TTreeFriendLeafIter.

Definition at line 40 of file TIterator.h.

◆ IsA()

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

Reimplemented from TIterator.

Definition at line 154 of file TObjArray.h.

◆ Next()

TObject * TObjArrayIter::Next ( )
overridevirtual

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

Implements TIterator.

Definition at line 929 of file TObjArray.cxx.

◆ operator!=() [1/2]

Bool_t TObjArrayIter::operator!= ( const TIterator & aIter) const
overridevirtual

This operator compares two TIterator objects.

Reimplemented from TIterator.

Definition at line 967 of file TObjArray.cxx.

◆ operator!=() [2/2]

Bool_t TObjArrayIter::operator!= ( const TObjArrayIter & aIter) const

This operator compares two TObjArrayIter objects.

Definition at line 979 of file TObjArray.cxx.

◆ operator()()

TObject * TIterator::operator() ( )
inlineinherited

Definition at line 43 of file TIterator.h.

◆ operator*()

TObject * TObjArrayIter::operator* ( ) const
overridevirtual

Return current object or nullptr.

Reimplemented from TIterator.

Definition at line 987 of file TObjArray.cxx.

◆ operator=() [1/2]

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

Overridden assignment operator.

Implements TIterator.

Definition at line 900 of file TObjArray.cxx.

◆ operator=() [2/2]

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

Overloaded assignment operator.

Definition at line 915 of file TObjArray.cxx.

◆ operator==()

Bool_t TIterator::operator== ( const TIterator & other) const
inlineinherited

Definition at line 45 of file TIterator.h.

◆ Reset()

void TObjArrayIter::Reset ( )
overridevirtual

Reset array iterator.

Implements TIterator.

Definition at line 954 of file TObjArray.cxx.

◆ Streamer()

void TObjArrayIter::Streamer ( TBuffer & )
overridevirtual

Reimplemented from TIterator.

◆ StreamerNVirtual()

void TObjArrayIter::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 154 of file TObjArray.h.

Member Data Documentation

◆ fArray

const TObjArray* TObjArrayIter::fArray
private

Definition at line 126 of file TObjArray.h.

◆ fCurCursor

Int_t TObjArrayIter::fCurCursor
private

Definition at line 127 of file TObjArray.h.

◆ fCursor

Int_t TObjArrayIter::fCursor
private

Definition at line 128 of file TObjArray.h.

◆ fDirection

Bool_t TObjArrayIter::fDirection
private

Definition at line 129 of file TObjArray.h.


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