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

◆ on_tick_if()

void MayaFlux::Nodes::Input::InputNode::on_tick_if ( const NodeCondition condition,
const TypedHook< InputContext > &  callback 
)

Register conditional callback for input received.

Parameters
conditionPredicate that determines when callback is triggered
callbackFunction to call when condition is met

The callback receives an InputContext with the current value and input details. Fires on every process_input() call where the condition returns true.

Definition at line 145 of file InputNode.cpp.

146{
147 m_conditional_callbacks.emplace_back([callback](NodeContext& ctx) {
148 // NOLINTNEXTLINE(cppcoreguidelines-pro-type-static-cast-downcast)
149 callback(static_cast<InputContext&>(ctx));
150 },
151 condition);
152}
std::vector< std::pair< NodeHook, NodeCondition > > m_conditional_callbacks
Collection of conditional callback functions with their predicates.
Definition Node.hpp:444

References MayaFlux::Nodes::Node::m_conditional_callbacks.

Referenced by while_in_range().

+ Here is the caller graph for this function: