MayaFlux 0.2.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 280 of file NodeStructure.cpp.

281{
282 update_context(value);
283 auto& ctx = get_last_context();
284
285 for (const auto& callback : m_callbacks) {
286 callback(ctx);
287 }
288
289 for (const auto& [callback, condition] : m_conditional_callbacks) {
290 if (condition(ctx)) {
291 callback(ctx);
292 }
293 }
294}
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:403
std::vector< std::pair< NodeHook, NodeCondition > > m_conditional_callbacks
Collection of conditional callback functions with their predicates.
Definition Node.hpp:413

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: