template<typename T>
class msl::ConstIterator< T >
Read-only iterator to a container.
- Note
- This iterator stores the container it iterates on, as opposed to iterators from the standard C++ library.
|
|
| ConstIterator (T const &container={}) |
| | Create an iterator at the beginning of a container.
|
|
| ConstIterator (ConstIterator< T > const &)=default |
|
| ConstIterator (ConstIterator< T > &&)=default |
|
ConstIterator< T > & | operator= (ConstIterator< T > const &)=default |
|
ConstIterator< T > & | operator= (ConstIterator< T > &&)=default |
|
T const & | container () const |
| | Return the container.
|
|
void | setContainer (T const &container) |
| | Set the container, reset the counter.
|
|
std::size_t | index () const |
| | Return the current index.
|
|
T::value_type const & | item () const |
| | Return the current item.
|
|
std::size_t | end () const |
| | Return the end value.
|
|
ConstIterator & | reset () |
| | Reset the iterator to the start of the container.
|
| ConstIterator & | operator++ () |
| | Move to the next element.
|
|
bool | first () const |
| | Test if the index is 0.
|
|
bool | last () const |
| | Test if the index is equal to end-1.
|
|
bool | done () const |
| | Test if the index is equal to end.
|