Supports a simple iteration over a generic collection.
Public Properties | |
| virtual auto | current () const -> const type_t &=0 |
| Gets the element in the collection at the current position of the enumerator. | |
Public Methods | |
| virtual auto | move_next () -> bool=0 |
| Advances the enumerator to the next element of the collection. | |
| virtual auto | reset () -> void=0 |
| Sets the enumerator to its initial position, which is before the first element in the collection. | |
|
nodiscardpure virtual |
Gets the element in the collection at the current position of the enumerator.
Implemented in xtd::collections::generic::enumerator< type_t >, xtd::collections::generic::enumerator< xtd::any_object >, and xtd::collections::generic::enumerator<>.
|
nodiscardpure virtual |
Advances the enumerator to the next element of the collection.
| xtd::invalid_operation_exception | The collection was modified after the enumerator was created. |
Implemented in xtd::collections::generic::enumerator< type_t >, xtd::collections::generic::enumerator< xtd::any_object >, and xtd::collections::generic::enumerator<>.
|
pure virtual |
Sets the enumerator to its initial position, which is before the first element in the collection.
| xtd::invalid_operation_exception | The collection was modified after the enumerator was created. |
| xtd::not_supported_exception | The enumerator does not support being reset. |
Implemented in xtd::collections::generic::enumerator< type_t >, xtd::collections::generic::enumerator< xtd::any_object >, and xtd::collections::generic::enumerator<>.