![]() |
AliPhysics
e469bb5 (e469bb5)
|
stl iterator over all clusters More...
#include <AliParticleContainer.h>
Public Member Functions | |
all_iterator (const AliParticleContainer *cont, int startpos, bool forward=true) | |
all_iterator (const all_iterator &other) | |
virtual | ~all_iterator () |
all_iterator & | operator= (const all_iterator &other) |
bool | operator!= (const all_iterator &other) const |
all_iterator & | operator++ () |
all_iterator | operator++ (int) |
all_iterator & | operator-- () |
all_iterator | operator-- (int) |
AliVParticle * | operator* () const |
Private Member Functions | |
all_iterator () | |
Private Attributes | |
const AliParticleContainer * | fkContainer |
Container iterated over. More... | |
int | fCurrentPos |
Current position inside the container. More... | |
bool | fForward |
Direction, expressed in forward direction. More... | |
stl iterator over all clusters
Bi-directional iterator over all particles in the array. The iterator is used in the standard way a c++ iterator is used. The container is responsible creating it. Afterwards one uses the prefix or postfix increment or decrement operator, depending on the direction of the iteration.
If you are using c++11 this reduces to
using c++11 range-based iterations.
As the postfix operator needs to perform a copy of the iterator, the prefix operator will have a better performance and should be preferred.
Definition at line 116 of file AliParticleContainer.h.
AliParticleContainer::all_iterator::all_iterator | ( | const AliParticleContainer * | cont, |
int | startpos, | ||
bool | forward = true |
||
) |
Content of all_iterator Constructor, inializing the iterator with
Note: Iterators should be created by the object it iterates over and not by hand.
[in] | cont | Container to be iterated over (not modified) |
[in] | startpos | Start position for the iteration |
[in] | forward | If true iterator is a forward iterator |
Definition at line 651 of file AliParticleContainer.cxx.
AliParticleContainer::all_iterator::all_iterator | ( | const all_iterator & | other | ) |
Copy constructor. For the underlying container the pointer is copied.
[in] | other | Reference for the copy |
Definition at line 666 of file AliParticleContainer.cxx.
|
inlinevirtual |
Definition at line 123 of file AliParticleContainer.h.
|
private |
bool AliParticleContainer::all_iterator::operator!= | ( | const all_iterator & | other | ) | const |
Comparison operator. The comparison is performed based on the current position of the iterator.
[in] | other | Object to compare to. |
Definition at line 694 of file AliParticleContainer.cxx.
AliVParticle * AliParticleContainer::all_iterator::operator* | ( | ) | const |
Dereferencing operator. Accessing cluster at the current position of the iterator in the cluster container
Definition at line 755 of file AliParticleContainer.cxx.
AliParticleContainer::all_iterator & AliParticleContainer::all_iterator::operator++ | ( | ) |
Incrementation prefix operator. Incrementing/Decrementing the postion of the iterator in the array based on the direction.
Definition at line 703 of file AliParticleContainer.cxx.
AliParticleContainer::all_iterator AliParticleContainer::all_iterator::operator++ | ( | int | ) |
Incrementation postfix operator. Incrementing/Decrementing the postion of the iterator in the array based on the direction.
[in] | Not | used, only defining the operator as postfix operator |
Definition at line 718 of file AliParticleContainer.cxx.
AliParticleContainer::all_iterator & AliParticleContainer::all_iterator::operator-- | ( | ) |
Decrementation prefix operator. Decrementing/Incrementing the postion of the iterator in the array based on the direction.
Definition at line 729 of file AliParticleContainer.cxx.
AliParticleContainer::all_iterator AliParticleContainer::all_iterator::operator-- | ( | int | ) |
Decrementation postfix operator. Decrementing/Incrementing the postion of the iterator in the array based on the direction.
[in] | Not | used, only defining the operator as postfix operator |
Definition at line 744 of file AliParticleContainer.cxx.
AliParticleContainer::all_iterator & AliParticleContainer::all_iterator::operator= | ( | const all_iterator & | other | ) |
Assignmet operator, copying properties of the reference iterator
[in] | other | Reference for the assignment |
Definition at line 679 of file AliParticleContainer.cxx.
|
private |
Current position inside the container.
Definition at line 138 of file AliParticleContainer.h.
Referenced by operator!=(), and operator=().
|
private |
Direction, expressed in forward direction.
Definition at line 139 of file AliParticleContainer.h.
Referenced by operator=().
|
private |
Container iterated over.
Definition at line 137 of file AliParticleContainer.h.
Referenced by operator=().