![]() |
ROOT 6.12/07 Reference Guide |
TTypedIter is a typed version of TIter.
This requires the collection to contains elements of the type requested (or a derived class). Any deviation from this expectation will only be caught/reported by an assert in debug builds.
This is best used with a TClonesArray, for other cases prefered TRangeDynCast.
The typical use is: ~~~ {.cpp} TTypedIter<TBaseClass> next(tbaseClassClonesArrayPtr); while(auto bcl = next()) { ... use bcl as a TBaseClass* } ~~~ {.cpp}
Definition at line 334 of file TCollection.h.
Public Member Functions | |
TTypedIter (const TIter &iter) | |
ClassDefInline (TTypedIter, 0) | |
Containee * | Next () |
Containee * | operator() () |
Containee * | operator* () const |
![]() | |
TIter (const TCollection *col, Bool_t dir=kIterForward) | |
TIter (TIterator *it) | |
TIter (const TIter &iter) | |
Copy a TIter. More... | |
virtual | ~TIter () |
TIter & | Begin () |
Pointing to the first element of the container. More... | |
const TCollection * | GetCollection () const |
Option_t * | GetOption () const |
TObject * | Next () |
Bool_t | operator!= (const TIter &aIter) const |
TObject * | operator() () |
TObject * | operator* () const |
TIter & | operator++ () |
TIter & | operator= (const TIter &rhs) |
Assigning an TIter to another. More... | |
Bool_t | operator== (const TIter &aIter) const |
void | Reset () |
Private Member Functions | |
TTypedIter ()=default | |
Static Private Member Functions | |
static Containee * | StaticCast (TObject *obj) |
Friends | |
template<class T > | |
class | ROOT::Internal::ClassDefGenerateInitInstanceLocalInjector |
This is a workaround against ClassDefInline not supporting classes missing their default constructor or having them private. More... | |
Additional Inherited Members | |
![]() | |
static TIter | End () |
Pointing to the element after the last - to a nullptr value in our case. More... | |
![]() | |
TIter () | |
#include <TCollection.h>
|
privatedefault |
|
inline |
Definition at line 352 of file TCollection.h.
ROOT::Detail::TTypedIter< Containee >::ClassDefInline | ( | TTypedIter< Containee > | , |
0 | |||
) |
|
inline |
Definition at line 355 of file TCollection.h.
|
inline |
Definition at line 354 of file TCollection.h.
|
inline |
Definition at line 356 of file TCollection.h.
|
inlinestaticprivate |
Definition at line 344 of file TCollection.h.
|
friend |
This is a workaround against ClassDefInline not supporting classes missing their default constructor or having them private.
Definition at line 335 of file TCollection.h.