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

◆ notify_tick()

void MayaFlux::Nodes::BinaryOpNode::notify_tick ( double  value)
overrideprotectedvirtual

Notifies all registered callbacks about a new output value.

Parameters
valueThe newly combined output value

This method is called internally whenever a new value is produced, creating the appropriate context with both input values and the output, and invoking all registered callbacks that should receive notification.

Implements MayaFlux::Nodes::Node.

Definition at line 157 of file NodeCombine.cpp.

158{
159 update_context(value);
160 auto& ctx = get_last_context();
161
162 for (const auto& callback : m_callbacks) {
163 callback(ctx);
164 }
165
166 for (const auto& [callback, condition] : m_conditional_callbacks) {
167 if (condition(ctx)) {
168 callback(ctx);
169 }
170 }
171}
void update_context(double value) override
updates context object for callbacks
NodeContext & get_last_context() override
Retrieves the last created context object.
std::vector< NodeHook > m_callbacks
Collection of standard callback functions.
Definition Node.hpp:406
std::vector< std::pair< NodeHook, NodeCondition > > m_conditional_callbacks
Collection of conditional callback functions with their predicates.
Definition Node.hpp:416

References get_last_context(), MayaFlux::Nodes::Node::m_callbacks, MayaFlux::Nodes::Node::m_conditional_callbacks, and update_context().

Referenced by process_sample().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: