15template <
typename Generator,
typename Index>
17 && std::invocable<std::decay_t<Generator>&, Index>
18 && !std::is_void_v<std::invoke_result_t<std::decay_t<Generator>&, Index>>;
24template <
typename Generator,
typename Index>
28 using value_type = std::invoke_result_t<generator_type&, Index>;
35template <
typename Callback,
typename Value>
37 && std::invocable<std::decay_t<Callback>&, Value>;
43template <
typename Condition,
typename Index>
45 && std::predicate<std::decay_t<Condition>&, Index>;
51template <
typename Source>
53 && std::invocable<std::decay_t<Source>&, uint64_t>
54 && std::ranges::input_range<std::invoke_result_t<std::decay_t<Source>&, uint64_t>>
55 && std::convertible_to<std::ranges::range_value_t<std::invoke_result_t<std::decay_t<Source>&, uint64_t>>,
double>;
88template <std::incrementable Index = u
int64_t,
typename Generator,
typename Callback,
typename Condition>
117template <std::incrementable Index = u
int64_t,
typename Generator,
typename Callback>
123 std::vector<double> durations,
147template <std::incrementable Index = u
int64_t,
typename Generator,
typename Callback,
typename Source>
163MAYAFLUX_API std::shared_ptr<Vruta::Routine>
pattern(
164 std::function<std::any(uint64_t)> pattern_func,
165 std::function<
void(std::any)>
callback,
166 std::function<
bool(uint64_t)> ready,
171#include "Pattern.inl"
A callable that accepts what the generator returns.
A predicate on the step index.
A callable from a pass number to the array of durations for that pass.
A callable from a step index to a value.
std::shared_ptr< Vruta::Routine > pattern(std::function< std::any(uint64_t)> pattern_func, std::function< void(std::any)> callback, std::function< bool(uint64_t)> ready, Vruta::ProcessingToken token)
The std::any, uint64_t form of the condition driven pattern.
@ SAMPLE_ACCURATE
Coroutine is sample-accurate.
std::decay_t< Generator > generator_type
std::invoke_result_t< generator_type &, Index > value_type
Types a pattern derives from its generator and index.