ROOT 6.16/01 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 336 of file TCollection.h.
Public Member Functions | |
TTypedIter (const TIter &iter) | |
ClassDefInline (TTypedIter, 0) | |
Containee * | Next () |
Containee * | operator() () |
Containee * | operator* () const |
TIter () | |
TIter (const TCollection *col, Bool_t dir=kIterForward) | |
TIter (const TIter &iter) | |
Copy a TIter. More... | |
TIter (TIterator *it) | |
Public Member Functions inherited from TIter | |
TIter (const TCollection *col, Bool_t dir=kIterForward) | |
TIter (const TIter &iter) | |
Copy a TIter. More... | |
TIter (TIterator *it) | |
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 Public Member Functions inherited from TIter | |
static TIter | End () |
Pointing to the element after the last - to a nullptr value in our case. More... | |
Protected Member Functions inherited from TIter | |
TIter () | |
#include <TCollection.h>
|
privatedefault |
|
inline |
Definition at line 354 of file TCollection.h.
ROOT::Detail::TTypedIter< Containee >::ClassDefInline | ( | TTypedIter< Containee > | , |
0 | |||
) |
|
inline |
Definition at line 357 of file TCollection.h.
|
inline |
Definition at line 356 of file TCollection.h.
|
inline |
Definition at line 358 of file TCollection.h.
|
inlinestaticprivate |
Definition at line 346 of file TCollection.h.
|
inline |
Definition at line 239 of file TCollection.h.
|
inline |
Definition at line 242 of file TCollection.h.
TIter::TIter | ( | const TIter & | iter | ) |
Copy a TIter.
This involves allocating a new TIterator of the right sub class and assigning it with the original.
Definition at line 245 of file TCollection.cxx.
|
inline |
Definition at line 244 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 342 of file TCollection.h.