|
msl 1.3.0
|
Read/write iterator to a container.
#include <Iterator.h>
Public Member Functions | |
| Iterator (T const &container={}) | |
| Create an iterator at the beginning of a container. | |
| Iterator (Iterator< T > const &)=default | |
| Iterator (Iterator< T > &&)=default | |
| Iterator< T > & | operator= (Iterator< T > const &)=default |
| Iterator< T > & | operator= (Iterator< T > &&)=default |
| T::value_type & | item () |
| Return the current item. | |
| Public Member Functions inherited from msl::ConstIterator< T > | |
| 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. | |
Additional Inherited Members | |
| Public Types inherited from msl::ConstIterator< T > | |
| using | Container = T |
| Type of the container iterated on. | |
| Protected Attributes inherited from msl::ConstIterator< T > | |
| Counter | _counter |
| Current position in the container. | |
| T | _container |
| Container being iterated. | |