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

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

References m_all_callbacks.