Class GeneratorUntypedBase

Inheritance Relationships

Derived Types

Class Documentation

class GeneratorUntypedBase

Subclassed by Catch::Generators::IGenerator< Float >, Catch::Generators::IGenerator< std::vector< T > >, Catch::Generators::IGenerator< Integer >, Catch::Generators::IGenerator< T >

Public Functions

GeneratorUntypedBase() = default
GeneratorUntypedBase(GeneratorUntypedBase const&) = default
GeneratorUntypedBase &operator=(GeneratorUntypedBase const&) = default
virtual ~GeneratorUntypedBase()
bool countedNext()

Attempts to move the generator to the next element

Serves as a non-virtual interface to next, so that the top level interface can provide sanity checking and shared features.

As with next, returns true iff the move succeeded and the generator has new valid element to provide.

inline std::size_t currentElementIndex() const
StringRef currentElementAsString() const

Returns generator’s current element as user-friendly string.

By default returns string equivalent to calling Catch::Detail::stringify on the current element, but generators can customize their implementation as needed.

Not thread-safe due to internal caching.

The returned ref is valid only until the generator instance is destructed, or it moves onto the next element, whichever comes first.