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

◆ get_all_channel_root_nodes()

const std::unordered_map< unsigned int, std::shared_ptr< RootNode > > & MayaFlux::Nodes::NodeGraphManager::get_all_channel_root_nodes ( ProcessingToken  token = ProcessingToken::AUDIO_RATE) const

Gets all channel root nodes for the AUDIO_RATE domain.

Parameters
tokenProcessing domain to get the root nodes for (default is AUDIO_RATE)
Returns
Constant reference to the map of channel indices to root nodes

This provides access to all channel root nodes of the specified domain that have been created. Useful for processing all channels or inspecting the node graph structure. For multi-modal access, use get_token_roots().

Definition at line 41 of file NodeGraphManager.cpp.

42{
43 static std::unordered_map<unsigned int, std::shared_ptr<RootNode>> audio_roots;
44 audio_roots.clear();
45
46 auto it = m_token_roots.find(token);
47 if (it != m_token_roots.end()) {
48 for (const auto& [channel, root] : it->second) {
49 audio_roots[channel] = root;
50 }
51 }
52 return audio_roots;
53}
static MayaFlux::Nodes::ProcessingToken token
Definition Timers.cpp:8
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.

References m_token_roots, and token.