Customization points to customize data generation for user-defined types. More...
Classes | |
| struct | tts::rebuild< Seq, U > |
| Type conversion customization point. More... | |
Functions | |
| template<typename T , typename V > | |
| auto | tts::as_value (V const &v) |
| Single value evaluation customization point. | |
| template<typename T > | |
| auto | tts::produce (type< T > const &t, auto g, auto... others) |
| Data production customization point. | |
| auto tts::as_value | ( | V const & | v | ) |
#include <tts/engine/generator.hpp>
Single value evaluation customization point.
This function generate a T from a value v. Default behavior is to convert but this function can be overloaded to handle user-defined type.
| T | Target data type |
| v | Value used ot generate the data sample |
T obtained by conversion of v. | auto tts::produce | ( | type< T > const & | t, |
| auto | g, | ||
| auto... | others | ||
| ) |
#include <tts/engine/generator.hpp>
Data production customization point.
This function is in charge of producing data of type T using generator g and additional parameters others.... The default implementation simply calls the generator g with the provided parameters.
By default, this function also handles sequence types by producing each of their elements using the provided generator.
| T | Target data type |
| t | Type wrapper for the target data type |
| g | Data generator to use |
| others | Additional parameters forwarded to the generator |
T produced by the generator g.