Belle II Software
release-08-01-10
|
Optimizes class to iterate over TObjArray and classes inheriting from it. More...
#include <ArrayIterator.h>
Public Member Functions | |
ObjArrayIterator ()=default | |
default constructor | |
ObjArrayIterator (ArrayType &array, size_t index) | |
real constructor More... | |
ObjArrayIterator (ArrayType const *array, bool end=false) | |
Convenience constructor in case of a TClonesArray pointer. More... | |
ObjArrayIterator (ArrayType const *const *array, bool end=false) | |
Convenience constructor because we usually have a TClonesArray** member so this takes cares of the checks. More... | |
ObjArrayIterator< ArrayType, ValueType > & | operator++ () |
prefix increment | |
ObjArrayIterator< ArrayType, ValueType > | operator++ (int) |
postfix increment | |
bool | operator== (const ObjArrayIterator< ArrayType, ValueType > &rhs) const |
check equality. | |
bool | operator!= (const ObjArrayIterator< ArrayType, ValueType > &rhs) const |
check inequality. | |
ValueType & | operator* () const |
dereference. | |
ValueType * | operator-> () const |
dereference. | |
Private Attributes | |
TObject ** | m_array {nullptr} |
pointer to the fCont member of the TObjArray | |
Optimizes class to iterate over TObjArray and classes inheriting from it.
iterators are invalidated if the size of the TObjArray is changed.
Definition at line 23 of file ArrayIterator.h.
|
inline |
real constructor
array | reference to the TObjArray instance we want to iterate over |
index | integer of the index we want to point to right away |
Definition at line 31 of file ArrayIterator.h.
|
inlineexplicit |
Convenience constructor in case of a TClonesArray pointer.
The "const *" is needed so that a const TClonesArray* can be passed in for const ObjArrayIterators
array | pointer to where the array is located. If any of the two is NULL a default iterator is created |
end | if true point to after the array, otherwise point to the beginning |
Definition at line 40 of file ArrayIterator.h.
|
inlineexplicit |
Convenience constructor because we usually have a TClonesArray** member so this takes cares of the checks.
The "const * const *" is needed so that a const TClonesArray** can be passed in for const ObjArrayIterators
array | pointer to the pointer where the array is located. If any of the two is NULL a default iterator is created |
end | if true point to after the array, otherwise point to the beginning |
Definition at line 54 of file ArrayIterator.h.