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

◆ remove_hook()

bool MayaFlux::Nodes::Node::remove_hook ( const NodeHook callback)
virtual

Removes a previously registered callback.

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

Unregisters a callback that was previously registered with on_tick(). After removal, the callback will no longer be triggered when the node produces new output values.

This method is useful for cleaning up callbacks when they are no longer needed, preventing memory leaks and unnecessary processing.

Reimplemented in MayaFlux::Nodes::Generator::Impulse, MayaFlux::Nodes::Generator::Logic, MayaFlux::Nodes::Generator::Phasor, and MayaFlux::Nodes::ChainNode.

Definition at line 15 of file Node.cpp.

16{
17 return safe_remove_callback(m_callbacks, callback);
18}
std::vector< NodeHook > m_callbacks
Collection of standard callback functions.
Definition Node.hpp:416
bool safe_remove_callback(std::vector< NodeHook > &callbacks, const NodeHook &callback)
Safely removes a callback from a collection.
Definition NodeUtils.cpp:51

References m_callbacks, and MayaFlux::Nodes::safe_remove_callback().

+ Here is the call graph for this function: