Implementation of an iterator for pointer vectors.
This iterator implementation will automatically dereference twice at dereference calls! Therefore the return types are not unique_ptrs but RigidBodys.
#include <RigidBodyIterator.h>
Public Types | |
using | ContainerType = std::vector< std::unique_ptr< RigidBody > > |
using | iterator_category = std::random_access_iterator_tag |
using | value_type = RigidBody |
using | pointer = RigidBody * |
using | reference = RigidBody & |
using | difference_type = std::ptrdiff_t |
Public Member Functions | |
Constructors | |
RigidBodyIterator ()=default | |
RigidBodyIterator (const typename ContainerType::iterator &it) | |
RigidBodyIterator (const RigidBodyIterator &it)=default | |
RigidBodyIterator (RigidBodyIterator &&it)=default | |
RigidBodyIterator & | operator= (const RigidBodyIterator &it)=default |
RigidBodyIterator & | operator= (RigidBodyIterator &&it)=default |
Operators | |
RigidBodyIterator & | operator++ () |
RigidBodyIterator | operator++ (int) |
RigidBodyIterator & | operator-- () |
RigidBodyIterator | operator-- (int) |
RigidBodyIterator & | operator+= (difference_type n) |
RigidBodyIterator | operator+ (difference_type n) const |
RigidBodyIterator & | operator-= (difference_type n) |
RigidBodyIterator | operator- (difference_type n) const |
difference_type | operator- (const RigidBodyIterator &it) const |
Access operators | |
reference | operator[] (difference_type n) const |
reference | operator* () const |
pointer | operator-> () const |
Utility functions | |
pointer | getBodyID () |
ContainerType::iterator | get () const |
Private Attributes | |
Member variables | |
ContainerType::iterator | it_ |
wrapped iterator More... | |
Friends | |
bool | operator== (const RigidBodyIterator &lhs, const RigidBodyIterator &rhs) |
Equality comparison between two PtrIterator objects. More... | |
bool | operator!= (const RigidBodyIterator &lhs, const RigidBodyIterator &rhs) |
Inequality comparison between two PtrIterator objects. More... | |
bool | operator> (const RigidBodyIterator &lhs, const RigidBodyIterator &rhs) |
Greater-than comparison between two PtrIterator objects. More... | |
bool | operator< (const RigidBodyIterator &lhs, const RigidBodyIterator &rhs) |
Less-than comparison between two PtrIterator objects. More... | |
bool | operator>= (const RigidBodyIterator &lhs, const RigidBodyIterator &rhs) |
Greater-or-equal-than comparison between two PtrIterator objects. More... | |
bool | operator<= (const RigidBodyIterator &lhs, const RigidBodyIterator &rhs) |
Less-or-equal-than comparison between two PtrIterator objects. More... | |
using walberla::pe::RigidBodyIterator::ContainerType = std::vector< std::unique_ptr<RigidBody> > |
using walberla::pe::RigidBodyIterator::difference_type = std::ptrdiff_t |
using walberla::pe::RigidBodyIterator::iterator_category = std::random_access_iterator_tag |
|
inlinedefault |
|
inlineexplicit |
|
default |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
default |
|
default |
|
inline |
|
friend |
Inequality comparison between two PtrIterator objects.
lhs | The left-hand side pointer iterator. |
rhs | The right-hand side pointer iterator. |
|
friend |
Less-than comparison between two PtrIterator objects.
lhs | The left-hand side pointer iterator. |
rhs | The right-hand side pointer iterator. |
|
friend |
Less-or-equal-than comparison between two PtrIterator objects.
lhs | The left-hand side pointer iterator. |
rhs | The right-hand side pointer iterator. |
|
friend |
Equality comparison between two PtrIterator objects.
lhs | The left-hand side pointer iterator. |
rhs | The right-hand side pointer iterator. |
|
friend |
Greater-than comparison between two PtrIterator objects.
lhs | The left-hand side pointer iterator. |
rhs | The right-hand side pointer iterator. |
|
friend |
Greater-or-equal-than comparison between two PtrIterator objects.
lhs | The left-hand side pointer iterator. |
rhs | The right-hand side pointer iterator. |
|
private |
wrapped iterator