MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ on_count()

HookId MayaFlux::Nodes::Generator::Counter::on_count ( uint32_t  target,
const TypedHook< GeneratorContext > &  callback 
)

Registers a callback fired when the counter reaches a specific raw value.

Parameters
targetRaw counter value to match
callbackReceives GeneratorContext when count == target

Definition at line 40 of file Counter.cpp.

41{
42 return m_count_callbacks.add(adapt_hook(callback), callback.target_type(), 0, { static_cast<double>(target), 0.0 });
43}
PickCallback callback
Definition Picker.cpp:22
HookId add(NodeHook hook, const std::type_info &key, uint8_t tag=0, std::array< double, 2 > params={})
Appends a hook with no duplicate check and returns its id.
NodeHook adapt_hook(const TypedHook< ContextT > &hook)
Wraps a context-typed hook into a NodeHook.

References MayaFlux::Nodes::adapt_hook(), MayaFlux::Nodes::HookList::add(), callback, and m_count_callbacks.

+ Here is the call graph for this function: