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

◆ get_nodes()

const std::vector< std::shared_ptr< Node > > & MayaFlux::Nodes::NodeGraphManager::get_nodes ( ProcessingToken  token,
uint32_t  channel = 0 
) const

Get all nodes from their respective root nodes for a specific token and/or channel.

Parameters
tokenProcessing domain (AUDIO_RATE, VISUAL_RATE, etc.)
channelChannel within that domain
Returns
Vector of shared pointers to the nodes for that token and channel root

Definition at line 50 of file NodeGraphManager.cpp.

51{
52
53 auto token_it = m_token_roots.find(token);
54 if (token_it == m_token_roots.end()) {
57 "Attempted to get nodes for non-existent token {}. Returning empty vector.",
59 return empty;
60 }
61 auto channel_it = token_it->second.find(channel);
62
63 if (channel_it == token_it->second.end()) {
66 "Attempted to get nodes for token {} channel {} which does not exist. Returning empty vector.",
67 Reflect::enum_to_string(token), channel);
68 return empty;
69 }
70
71 return channel_it->second->nodes();
72}
#define MF_ERROR(comp, ctx,...)
std::unordered_map< ProcessingToken, std::unordered_map< unsigned int, std::shared_ptr< RootNode > > > m_token_roots
Multi-modal map of processing tokens to their channel root nodes.
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.
constexpr std::string_view enum_to_string(EnumType value) noexcept
Universal enum to string converter using magic_enum (original case)

References MayaFlux::Reflect::enum_to_string(), m_token_roots, MF_ERROR, MayaFlux::Journal::NodeProcessing, and MayaFlux::Journal::Nodes.

+ Here is the call graph for this function: