Horizon
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Catch::Generators::GeneratorUntypedBase Class Referenceabstract
Inheritance diagram for Catch::Generators::GeneratorUntypedBase:
Catch::Generators::IGenerator< std::vector< T > > Catch::Generators::IGenerator< Float > Catch::Generators::IGenerator< Integer > Catch::Generators::IGenerator< T > Catch::Generators::ChunkGenerator< T > Catch::Generators::FilterGenerator< T, Predicate > Catch::Generators::FixedValuesGenerator< T > Catch::Generators::Generators< T > Catch::Generators::IteratorGenerator< T > Catch::Generators::MapGenerator< T, U, Func > Catch::Generators::RangeGenerator< T > Catch::Generators::RepeatGenerator< T > Catch::Generators::SingleValueGenerator< T > Catch::Generators::TakeGenerator< T >

Public Member Functions

 GeneratorUntypedBase (GeneratorUntypedBase const &)=default
 
GeneratorUntypedBaseoperator= (GeneratorUntypedBase const &)=default
 
bool countedNext ()
 Attempts to move the generator to the next element.
 
std::size_t currentElementIndex () const
 
StringRef currentElementAsString () const
 Returns generator's current element as user-friendly string.
 

Member Function Documentation

◆ countedNext()

bool Catch::Generators::GeneratorUntypedBase::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.

◆ currentElementAsString()

StringRef Catch::Generators::GeneratorUntypedBase::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.


The documentation for this class was generated from the following files: