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

◆ callback_exists()

template<typename ContextT >
bool MayaFlux::Nodes::callback_exists ( const std::vector< TypedHook< ContextT > > &  callbacks,
const TypedHook< ContextT > &  callback 
)

Returns true if an equivalent callback is already present in the collection.

Equivalence is determined by target_type() – the same limitation as std::function comparison everywhere in the codebase.

Definition at line 63 of file NodeUtils.hpp.

65{
66 return std::ranges::any_of(callbacks,
67 [&callback](const TypedHook<ContextT>& hook) {
68 return hook.target_type() == callback.target_type();
69 });
70}
std::function< void(ContextT &)> TypedHook
Callback function type for node processing events, parameterised on context type.
Definition NodeUtils.hpp:28

Referenced by safe_add_callback().

+ Here is the caller graph for this function: