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

◆ remove_conditional_hook()

bool MayaFlux::Nodes::Generator::Logic::remove_conditional_hook ( const NodeCondition callback)
overridevirtual

Removes a previously registered conditional callback.

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

Reimplemented from MayaFlux::Nodes::Node.

Definition at line 603 of file Logic.cpp.

604{
605 auto it = std::remove_if(m_all_callbacks.begin(), m_all_callbacks.end(),
606 [&callback](const LogicCallback& cb) {
607 return cb.event_type == LogicEventType::CONDITIONAL && cb.condition && cb.condition->target_type() == callback.target_type();
608 });
609
610 if (it != m_all_callbacks.end()) {
611 m_all_callbacks.erase(it, m_all_callbacks.end());
612 return true;
613 }
614 return false;
615}
std::vector< LogicCallback > m_all_callbacks
Collection of all callback functions.
Definition Logic.hpp:617

References m_all_callbacks.