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

◆ remove_hook()

bool MayaFlux::Nodes::Generator::Logic::remove_hook ( const NodeHook callback)
overridevirtual

Removes a previously registered callback.

Parameters
callbackThe callback function to remove
Returns
True if the callback was found and removed, false otherwise

Reimplemented from MayaFlux::Nodes::Node.

Definition at line 589 of file Logic.cpp.

590{
591 auto it = std::remove_if(m_all_callbacks.begin(), m_all_callbacks.end(),
592 [&callback](const LogicCallback& cb) {
593 return cb.callback.target_type() == callback.target_type();
594 });
595
596 if (it != m_all_callbacks.end()) {
597 m_all_callbacks.erase(it, m_all_callbacks.end());
598 return true;
599 }
600 return false;
601}
std::vector< LogicCallback > m_all_callbacks
Collection of all callback functions.
Definition Logic.hpp:617

References m_all_callbacks.