MayaFlux 0.4.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 91 of file SubsystemManager.cpp.

92{
93 auto tokens = subsystem->get_tokens();
94 auto handle = std::make_unique<SubsystemProcessingHandle>(
100 tokens);
101
102 subsystem->initialize(*handle);
103 subsystem->register_callbacks();
104
105 m_subsystems[type] = subsystem;
106 m_handles[type] = std::move(handle);
107}
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
std::shared_ptr< InputManager > m_input_manager

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