|
|
bool | any () |
| | True if the enumerator has at least one element.
|
| |
|
template<typename S> |
| EnumeratorPtr< S > | as () |
| | Cast to an enumerator of S objects.
|
| |
| virtual EnumeratorPtr< T > | concat (EnumeratorPtr< T > other) |
| | Append all elements of other after all elements of this.
|
| |
|
uint64_t | count () |
| | Enumerate all elements and return the count.
|
| |
| virtual T | getCurrent () const =0 |
| | Get current element in the collection.
|
| |
|
template<typename Mapper> |
| EnumeratorPtr< std::invoke_result_t< Mapper, T > > | map (Mapper map) |
| | Apply specified function to all elements of this enumerator.
|
| |
| virtual bool | moveNext ()=0 |
| |
|
T | next () |
| | Next element; throws if there are no elements.
|
| |
|
T | nextOrDefault () |
| | Next element, or the default value if none exists.
|
| |
| virtual void | reset () |
| | Move back to the beginning of the collection.
|
| |
|
T | single () |
| | The only next element; throws if the enumerator does not have exactly 1 element.
|
| |
| T | singleOrDefault () |
| |
|
const char * | stateName () const |
| |
|
std::vector< T > | toVector () |
| |
|
template<typename Filter> |
| EnumeratorPtr< T > | where (Filter filter) |
| | Return an enumerator returning all elements that pass the filter.
|
| |
|
|
static EnumeratorPtr< T > | concatAll (EnumeratorPtr< EnumeratorPtr< T > > inputs) |
| | Concatenate all these collections into a single one.
|
| |
|
template<typename Container> |
| static EnumeratorPtr< typename Container::value_type > | createEnumerator (const Container &data) |
| |
|
template<typename Iter> |
| static EnumeratorPtr< typename Iter::value_type > | createEnumerator (Iter begin, Iter end) |
| |
|
template<typename Iter> |
| static EnumeratorPtr< typename Iter::value_type > | createEnumerator (iterator_range< Iter > range) |
| |
|
static EnumeratorPtr< T > | emptyEnumerator () |
| |
template<class T>
class P4::Util::Enumerator< T >
Type-erased Enumerator interface.