![]() |
AliPhysics
05bc5cb (05bc5cb)
|
bidirectional stl iterator over the EMCAL iterable container More...
#include <AliEmcalIterableContainer.h>
Public Member Functions | |
iterator (const AliEmcalIterableContainer *cont, int currentpos, bool forward=true) | |
Content of class AliEmcalIterableContainer::Iterator ///. More... | |
iterator (const iterator &ref) | |
iterator & | operator= (const iterator &ref) |
virtual | ~iterator () |
bool | operator!= (const iterator &ref) const |
iterator & | operator++ () |
iterator | operator++ (int) |
iterator & | operator-- () |
iterator | operator-- (int) |
TObject * | operator* () const |
Private Member Functions | |
iterator () | |
Private Attributes | |
const AliEmcalIterableContainer * | fkData |
container with data More... | |
int | fCurrent |
current index in the container More... | |
bool | fForward |
use forward or backward direction More... | |
bidirectional stl iterator over the EMCAL iterable container
stl iterator corresponding to the EMCAL iterable container. The iterator iterates over all object in the EMCAL iterable container as specified in its constructor (all or accepted). It can be both forward or backward iterator.
As stl iterator it implements the operators required for an iterator
In case of c++11 the iterator also allows range-based iteration.
Definition at line 70 of file AliEmcalIterableContainer.h.
AliEmcalIterableContainer::iterator::iterator | ( | const AliEmcalIterableContainer * | cont, |
int | currentpos, | ||
bool | forward = true |
||
) |
Content of class AliEmcalIterableContainer::Iterator ///.
Constructor of the iterator. Setting underlying data, starting position of the iterator, and direction.
Iterators should be constructed by the iterable container via the functions begin, end, rbegin and rend. Direct use of the constructor by the users is discouraged.
[in] | cont | EMCAL container to iterate over |
[in] | currentpos | starting position for the iteration |
[in] | forward | Direction of the iteration. If true, the iteration is performed in forward direction, otherwise in backward direction. |
Definition at line 139 of file AliEmcalIterableContainer.cxx.
AliEmcalIterableContainer::iterator::iterator | ( | const iterator & | ref | ) |
Copy constructor. Only pointers are copied as the iterator does not own its container.
[in] | ref | Reference for the copy |
Definition at line 152 of file AliEmcalIterableContainer.cxx.
|
inlinevirtual |
Definition at line 77 of file AliEmcalIterableContainer.h.
|
private |
bool AliEmcalIterableContainer::iterator::operator!= | ( | const iterator & | ref | ) | const |
Comparison operator for unequalness. Comparison is performed based on the position inside the container
[in] | ref | Reference for comparison |
Definition at line 180 of file AliEmcalIterableContainer.cxx.
TObject * AliEmcalIterableContainer::iterator::operator* | ( | ) | const |
Access operator. Providing access to the object at the position of the iterator.
Definition at line 237 of file AliEmcalIterableContainer.cxx.
AliEmcalIterableContainer::iterator & AliEmcalIterableContainer::iterator::operator++ | ( | ) |
Prefix increment operator. Incrementing / decrementing position of the iterator based on the direction.
Definition at line 189 of file AliEmcalIterableContainer.cxx.
AliEmcalIterableContainer::iterator AliEmcalIterableContainer::iterator::operator++ | ( | int | index | ) |
Postfix increment operator. Incrementing / decrementing the position of the iterator based on the direction. This operator requires a copy of itself.
[in] | index | Not used |
Definition at line 213 of file AliEmcalIterableContainer.cxx.
AliEmcalIterableContainer::iterator & AliEmcalIterableContainer::iterator::operator-- | ( | ) |
Prefix decrement operator. Decrementing / incrementing the position of the iterator based on the direction.
Definition at line 200 of file AliEmcalIterableContainer.cxx.
AliEmcalIterableContainer::iterator AliEmcalIterableContainer::iterator::operator-- | ( | int | index | ) |
Postfix decrement operator. Decrementing / incrementing the position of the iterator based on the direction. This operator requires a copy of itself.
[in] | index | Not used |
Definition at line 226 of file AliEmcalIterableContainer.cxx.
AliEmcalIterableContainer::iterator & AliEmcalIterableContainer::iterator::operator= | ( | const iterator & | ref | ) |
Assignment operator. Only pointers are copied as the iterator does not own its container.
[in] | ref | Reference for the assignment |
Definition at line 166 of file AliEmcalIterableContainer.cxx.
|
private |
current index in the container
Definition at line 92 of file AliEmcalIterableContainer.h.
Referenced by operator!=(), and operator=().
|
private |
use forward or backward direction
Definition at line 93 of file AliEmcalIterableContainer.h.
Referenced by operator=().
|
private |
container with data
Definition at line 91 of file AliEmcalIterableContainer.h.
Referenced by operator=().