MayaFlux 0.1.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 586 of file Logic.cpp.

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

References m_all_callbacks.