#include <stlsoft/iterators/member_selector_iterator.hpp>
I | The type of the base iterator, whose value type should be C, or convertible to C | |
C | The class of the member pointer | |
M | The type of the member pointer |
Member Types | |
typedef parent_class_type::base_iterator_type | base_iterator_type |
typedef parent_class_type::selected_class_type | selected_class_type |
typedef parent_class_type::value_type | value_type |
typedef parent_class_type::pointer | pointer |
typedef parent_class_type::const_pointer | const_pointer |
typedef parent_class_type::reference | reference |
typedef parent_class_type::const_reference | const_reference |
typedef parent_class_type::size_type | size_type |
typedef parent_class_type::difference_type | difference_type |
typedef member_selector_iterator< I, C, M > | class_type |
Construction | |
member_selector_iterator (base_iterator_type it, M C::*member) | |
Constructs an instance from an iterator and a member pointer. | |
member_selector_iterator (class_type const &rhs) | |
Copy constructor. | |
~member_selector_iterator () throw () | |
Destructor. | |
base_iterator_type | base () const |
A copy of the base iterator. | |
base_iterator_type | current () const |
A copy of the base iterator. | |
Public Member Functions | |
Accessors | |
value_type C::* | member () const |
Constructs an instance from an iterator and a member pointer. | |
Input Iterator methods | |
class_type & | operator++ () |
Pre-increment iterator. | |
class_type | operator++ (int) |
Post-increment iterator. | |
reference | operator* () |
Returns a mutating (non-const) reference to the selected member of the base iterators current value. | |
const_reference | operator* () const |
Returns a non-mutating (const) reference to the selected member of the base iterators current value. | |
bool | equal (class_type const &rhs) const |
Evaluates two instances for equality. | |
Bidirectional Iterator methods | |
class_type & | operator-- () |
Pre-decrement iterator. | |
class_type | operator-- (int) |
Post-decrement iterator. | |
Random-Access Iterator methods | |
class_type & | operator+= (difference_type n) |
Moves the iterator forward. | |
class_type & | operator-= (difference_type n) |
Moves the iterator backward. | |
value_type & | operator[] (difference_type index) |
Access the element at the given index. | |
value_type const & | operator[] (difference_type index) const |
Access the element at the given index. | |
difference_type | distance (class_type const &rhs) const |
Calculate the distance between this and rhs . |
member_selector_iterator | ( | base_iterator_type | it, | |
M C::* | member | |||
) | [inline] |
Constructs an instance from an iterator and a member pointer.
member_selector_iterator | ( | class_type const & | rhs | ) | [inline] |
Copy constructor.
~member_selector_iterator | ( | ) | throw () [inline] |
base_iterator_type base | ( | ) | const [inline] |
A copy of the base iterator.
base_iterator_type current | ( | ) | const [inline] |
value_type C::* member | ( | ) | const [inline] |
Constructs an instance from an iterator and a member pointer.
class_type& operator++ | ( | ) | [inline] |
Pre-increment iterator.
Referenced by member_selector_iterator::operator++().
class_type operator++ | ( | int | ) | [inline] |
Post-increment iterator.
References member_selector_iterator::operator++().
reference operator* | ( | ) | [inline] |
Returns a mutating (non-const) reference to the selected member of the base iterators current value.
const_reference operator* | ( | ) | const [inline] |
Returns a non-mutating (const) reference to the selected member of the base iterators current value.
bool equal | ( | class_type const & | rhs | ) | const [inline] |
Evaluates two instances for equality.
References member_selector_iterator::m_it, member_selector_iterator::m_member, and STLSOFT_ASSERT.
class_type& operator-- | ( | ) | [inline] |
Pre-decrement iterator.
Referenced by member_selector_iterator::operator--().
class_type operator-- | ( | int | ) | [inline] |
Post-decrement iterator.
References member_selector_iterator::operator--().
class_type& operator+= | ( | difference_type | n | ) | [inline] |
Moves the iterator forward.
n | The amount by which to increment the iterator's current position |
class_type& operator-= | ( | difference_type | n | ) | [inline] |
Moves the iterator backward.
n | The amount by which to decrement the iterator's current position |
value_type& operator[] | ( | difference_type | index | ) | [inline] |
Access the element at the given index.
index | The required offset from the iterator's position |
value_type const& operator[] | ( | difference_type | index | ) | const [inline] |
Access the element at the given index.
index | The required offset from the iterator's position |
difference_type distance | ( | class_type const & | rhs | ) | const [inline] |