#include <particles.h>
Iterator type that skips over the holes in data_. It implements a standard bidirectional iterator over the ParticleData objects in Particles.
Definition at line 233 of file particles.h.
Public Types | |
using | value_type = typename std::remove_const< T >::type |
remove const qualification More... | |
using | pointer = typename std::add_pointer< T >::type |
provide the pointer of a reference More... | |
using | reference = typename std::add_lvalue_reference< T >::type |
creates a lvalue reference More... | |
using | const_pointer = typename std::add_const< pointer >::type |
add const qualification to a pointer More... | |
using | const_reference = typename std::add_const< reference >::type |
add const qualification to a reference More... | |
Public Member Functions | |
GenericIterator & | operator++ () |
Advance the iterator to the next valid (not a hole) entry in Particles. More... | |
GenericIterator | operator++ (int) |
Postfix variant of the above prefix increment operator. More... | |
GenericIterator & | operator-- () |
Advance the iterator to the previous valid (not a hole) entry in Particles. More... | |
GenericIterator | operator-- (int) |
Postfix variant of the above prefix decrement operator. More... | |
reference | operator* () |
const_reference | operator* () const |
pointer | operator-> () |
const_pointer | operator-> () const |
bool | operator== (const GenericIterator &rhs) const |
bool | operator!= (const GenericIterator &rhs) const |
bool | operator< (const GenericIterator &rhs) const |
bool | operator> (const GenericIterator &rhs) const |
bool | operator<= (const GenericIterator &rhs) const |
bool | operator>= (const GenericIterator &rhs) const |
Private Member Functions | |
GenericIterator (pointer p) | |
Constructs an iterator pointing to the ParticleData pointed to by p . More... | |
Private Attributes | |
pointer | ptr_ |
The entry in Particles this iterator points to. More... | |
Friends | |
class | Particles |
using smash::Particles::GenericIterator< T >::value_type = typename std::remove_const<T>::type |
remove const qualification
Definition at line 239 of file particles.h.
using smash::Particles::GenericIterator< T >::pointer = typename std::add_pointer<T>::type |
provide the pointer of a reference
Definition at line 241 of file particles.h.
using smash::Particles::GenericIterator< T >::reference = typename std::add_lvalue_reference<T>::type |
creates a lvalue reference
Definition at line 243 of file particles.h.
using smash::Particles::GenericIterator< T >::const_pointer = typename std::add_const<pointer>::type |
add const qualification to a pointer
Definition at line 245 of file particles.h.
using smash::Particles::GenericIterator< T >::const_reference = typename std::add_const<reference>::type |
add const qualification to a reference
Definition at line 247 of file particles.h.
|
inlineprivate |
Constructs an iterator pointing to the ParticleData pointed to by p
.
This constructor may only be called from the Particles class.
[in] | p | The particle which is pointed by the iterator. |
Definition at line 256 of file particles.h.
|
inline |
Advance the iterator to the next valid (not a hole) entry in Particles.
Holes are identified by the ParticleData::hole_ member and thus the internal pointer is incremented until all holes are skipped. It is important that the Particles entry pointed to by Particles::end() is not identified as a hole as otherwise the iterator would advance too far.
Definition at line 271 of file particles.h.
|
inline |
Postfix variant of the above prefix increment operator.
Definition at line 282 of file particles.h.
|
inline |
Advance the iterator to the previous valid (not a hole) entry in Particles.
Holes are identified by the ParticleData::hole_ member and thus the internal pointer is decremented until all holes are skipped. It is irrelevant whether Particles::data_[0] is a hole because the iteration typically ends at Particles::begin(), which points to a non-hole entry in Particles::data_.
Definition at line 299 of file particles.h.
|
inline |
Postfix variant of the above prefix decrement operator.
Definition at line 310 of file particles.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 327 of file particles.h.
|
inline |
Definition at line 331 of file particles.h.
|
inline |
rhs
. Definition at line 335 of file particles.h.
|
inline |
rhs
. Definition at line 337 of file particles.h.
|
inline |
rhs
or points to the same object. Definition at line 342 of file particles.h.
|
inline |
rhs
or points to the same object. Definition at line 349 of file particles.h.
|
friend |
Definition at line 235 of file particles.h.
|
private |
The entry in Particles this iterator points to.
Definition at line 259 of file particles.h.