Lolly 1.4.28
|
An abstract base class for iterator implementation. More...
#include <iterator.hpp>
Public Member Functions | |
iterator_rep () | |
Constructor. Increments the iterator count. | |
virtual | ~iterator_rep () |
Destructor. Decrements the iterator count. | |
virtual bool | busy ()=0 |
Returns whether the iterator has another element. | |
virtual T | next ()=0 |
Returns the current element of the iterator, and move the iterator forward. | |
virtual T | current ()=0 |
Returns the current element of the iterator. | |
virtual void | increase ()=0 |
Increase the iterator. | |
virtual int | remains () |
Returns the number of elements remaining in the iterator. | |
Public Member Functions inherited from abstract_struct | |
abstract_struct () | |
Default constructor for the abstract object. Sets the reference count to 0. | |
virtual | ~abstract_struct () |
Virtual destructor for the abstract object. Decrements the reference count. | |
Additional Inherited Members | |
Public Attributes inherited from abstract_struct | |
int | ref_count |
The reference count for the abstract object. | |
An abstract base class for iterator implementation.
T | The type for the iterator's return value. |
Definition at line 21 of file iterator.hpp.
|
inline |
Constructor. Increments the iterator count.
Definition at line 107 of file iterator.hpp.
|
inlinevirtual |
|
pure virtual |
Returns whether the iterator has another element.
Implemented in hashset_iterator_rep< T >, and hashmap_iterator_rep< T, U >.
|
pure virtual |
Returns the current element of the iterator, and move the iterator forward.
Implemented in hashset_iterator_rep< T >, and hashmap_iterator_rep< T, U >.
|
pure virtual |
Returns the current element of the iterator.
Implemented in hashset_iterator_rep< T >, and hashmap_iterator_rep< T, U >.
|
pure virtual |
Increase the iterator.
Implemented in hashset_iterator_rep< T >, and hashmap_iterator_rep< T, U >.
|
virtual |
Returns the number of elements remaining in the iterator.
Definition at line 20 of file iterator.ipp.