TTS v4.1.0
The Tiny Test System
Loading...
Searching...
No Matches
Data Generators Customization Points

Customization points of the data generation for user-defined types. More...

Classes

struct  tts::conversion< T, V >
 How a value is read as another type. More...
struct  tts::enumeration< T >
 Enumerates the values of a type in increasing order. More...
struct  tts::generation< T >
 How a value of a given type is built from a generator. More...
struct  tts::is_randoms< G >
 Detects tts::randoms and the classes derived from it. More...
struct  tts::rebuild< Seq, U >
 Type conversion customization point. More...

Functions

template<typename T, typename V>
auto tts::convert_as (V const &v, type< T > const &)
 Single value evaluation customization point.
template<typename T>
auto tts::produce (type< T > const &t, auto g, auto... others)
 Produces a value of type T from a generator.

Function Documentation

◆ produce()

template<typename T>
auto tts::produce ( type< T > const & t,
auto g,
auto... others )

#include <tts/engine/generator.hpp>

Produces a value of type T from a generator.

If tts::generation is specialized for T, calls tts::generation<T>::make(g, others...). Otherwise, calls g with t and others... for a scalar type, or fills a sequence type element by element, each element produced by g.

Template Parameters
TTarget data type
Parameters
tType wrapper for the target data type
gData generator to use
othersIndex and size of the element when a sequence is filled, forwarded to g
Returns
A value of type T produced by the generator g.