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

◆ add()

HookId MayaFlux::Nodes::HookList::add ( NodeHook  hook,
const std::type_info &  key,
uint8_t  tag = 0,
std::array< double, 2 >  params = {} 
)

Appends a hook with no duplicate check and returns its id.

Definition at line 149 of file NodeUtils.cpp.

150{
151 const HookId id = next_id();
152 mutate([&](std::vector<HookEntry>& entries) {
153 entries.push_back(HookEntry { id, &key, tag, params, hook, std::nullopt });
154 return true;
155 });
156 return id;
157}
bool mutate(const std::function< bool(std::vector< HookEntry > &)> &edit)
uint64_t HookId
Identifies one registration inside a HookList.
Definition NodeUtils.hpp:60

References mutate(), and next_id().

Referenced by MayaFlux::Nodes::Input::InputNode::add_input_callback(), MayaFlux::Nodes::Generator::Counter::on_count(), MayaFlux::Nodes::Generator::Counter::on_increment(), MayaFlux::Nodes::Filters::Filter::on_tick(), MayaFlux::Nodes::Generator::Generator::on_tick(), MayaFlux::Nodes::Input::InputNode::on_tick(), and MayaFlux::Nodes::Generator::Counter::on_wrap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: