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

◆ add_subsystem()

void MayaFlux::Core::SubsystemManager::add_subsystem ( SubsystemType  type,
const std::shared_ptr< ISubsystem > &  subsystem 
)

Register a subsystem instance with the manager.

Parameters
typeSubsystemType enum value identifying the subsystem category
subsystemShared pointer to the subsystem instance

Registers a pre-constructed subsystem with the manager and creates its processing handle. The subsystem is initialized but not started.

Definition at line 61 of file SubsystemManager.cpp.

62{
63 auto tokens = subsystem->get_tokens();
64 auto handle = std::make_unique<SubsystemProcessingHandle>(
69 tokens);
70
71 subsystem->initialize(*handle);
72 subsystem->register_callbacks();
73
74 m_subsystems[type] = subsystem;
75 m_handles[type] = std::move(handle);
76}
std::shared_ptr< Buffers::BufferManager > m_buffer_manager
std::shared_ptr< Nodes::NodeGraphManager > m_node_graph_manager
std::shared_ptr< Vruta::TaskScheduler > m_task_scheduler
std::shared_ptr< Core::WindowManager > m_window_manager
std::unordered_map< SubsystemType, std::unique_ptr< SubsystemProcessingHandle > > m_handles
std::unordered_map< SubsystemType, std::shared_ptr< ISubsystem > > m_subsystems

References m_buffer_manager, m_handles, m_node_graph_manager, m_subsystems, m_task_scheduler, and m_window_manager.