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

◆ shutdown()

void MayaFlux::Core::InputSubsystem::shutdown ( )
overridevirtual

Shutdown and cleanup subsystem resources.

Implements MayaFlux::Core::ISubsystem.

Definition at line 165 of file InputSubsystem.cpp.

166{
167 if (!m_ready.load())
168 return;
169
170 stop();
171
172 {
173 std::unique_lock lock(m_backends_mutex);
174 for (auto& [type, backend] : m_backends) {
175 backend->shutdown();
176 }
177 m_backends.clear();
178 }
179
181
182 auto& registry = Registry::BackendRegistry::instance();
183 registry.unregister_service<Registry::Service::InputService>();
184 m_input_service.reset();
185
186 m_ready.store(false);
187
189 "Input Subsystem shutdown complete");
190}
#define MF_INFO(comp, ctx,...)
void unregister()
unregister all nodes from InputManager
std::shared_ptr< Registry::Service::InputService > m_input_service
SubsystemProcessingHandle * m_handle
std::unordered_map< InputType, std::unique_ptr< IInputBackend > > m_backends
void stop() override
Stop the subsystem's processing/event loops.
static BackendRegistry & instance()
Get the global registry instance.
@ InputSubsystem
Input subsystem operations (device management, event dispatch)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Core::SubsystemProcessingHandle::inputs, MayaFlux::Journal::InputSubsystem, MayaFlux::Registry::BackendRegistry::instance(), m_backends, m_backends_mutex, m_handle, m_input_service, m_ready, MF_INFO, stop(), and MayaFlux::Core::InputManagerHandle::unregister().

Referenced by ~InputSubsystem().

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