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

◆ safe_remove_conditional_callback()

bool MayaFlux::Nodes::safe_remove_conditional_callback ( std::vector< std::pair< NodeHook, NodeCondition > > &  callbacks,
const NodeCondition callback 
)

Removes all conditional callbacks whose condition target_type() matches.

Returns
True if at least one entry was removed.

Definition at line 32 of file NodeUtils.cpp.

33{
34 bool removed = false;
35 auto it = callbacks.begin();
36
37 while (it != callbacks.end()) {
38 if (it->second.target_type() == callback.target_type()) {
39 it = callbacks.erase(it);
40 removed = true;
41 } else {
42 ++it;
43 }
44 }
45
46 return removed;
47}

Referenced by MayaFlux::Nodes::Node::remove_conditional_hook().

+ Here is the caller graph for this function: