|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
| bool MayaFlux::Nodes::safe_add_conditional_callback | ( | std::vector< std::pair< NodeHook, NodeCondition > > & | callbacks, |
| const NodeHook & | callback, | ||
| const NodeCondition & | condition | ||
| ) |
Safely adds a conditional callback if it doesn't already exist.
| callbacks | The collection of conditional callbacks to add to |
| callback | The callback function to add |
| condition | The condition function to add |
This function first checks if the exact callback-condition pair already exists in the collection, and only adds it if it's not already present. This prevents duplicate registrations of the same conditional callback.
Definition at line 42 of file NodeUtils.cpp.
References callback_pair_exists().
Referenced by MayaFlux::Nodes::Node::on_tick_if().
Here is the call graph for this function:
Here is the caller graph for this function: