Declare the struct of controls the grammar's rules read, and return it.
- Template Parameters
-
| C | A described struct whose members are all Control. |
Call once, before the first rewrite() and before any thread sets or reads the controls. A rule reads them through Environment::controls<C>().
emit({ 'F', s.parameters[0] * env.controls<Bloom>().rate.value() });
});
rewrite->set<Bloom>({ .rate = 0.3, .angle = lfo });
#define MF_DESCRIBE(...)
Requests a generated member description for a struct at namespace scope.
One named control of a network or operator: empty, a value, or a mapped source.
std::function< bool(Symbol)> EmitSymbol
Append a symbol; false on a bound violation.
RewriteResult rewrite(uint64_t steps=1, std::span< const double > inputs={})
Rewrite the draft word on the producer lane, without submitting it.
Definition at line 184 of file RewriteOperator.hpp.
185 {
188 };
189 m_read = [
this](std::string_view name) {
191 };
194 }
static std::optional< double > read_named(const C &controls, std::string_view name)
C & declare_controls()
Create the operator's controls struct and keep it alive.
C snapshot_controls() const
A copy of the declared struct, for an operator whose controls type is not fixed.
std::function< std::shared_ptr< const void >()> m_hold
static const void * controls_tag() noexcept
A tag that is the same for every use of one type C in a module, and differs between types.
std::function< std::optional< double >(std::string_view)> m_read
References controls_tag(), MayaFlux::Nodes::Network::NetworkOperator::declare_controls(), m_held_tag, m_hold, m_read, MayaFlux::ControlValueStore< Control >::read_named(), and MayaFlux::Nodes::Network::NetworkOperator::snapshot_controls().