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

◆ unregister_all_nodes()

void MayaFlux::Core::InputManager::unregister_all_nodes ( )

Unregister all nodes.

Definition at line 258 of file InputManager.cpp.

259{
260 std::vector<std::shared_ptr<Nodes::Input::InputNode>> released;
261
262 {
263 std::lock_guard lock(m_registry_mutex);
264
265#ifdef MAYAFLUX_PLATFORM_MACOS
266 auto* old_list = m_registrations.load();
268 retire_list(old_list);
269#else
270 m_registrations.store(std::make_shared<const RegistrationList>());
271#endif
272
273 released = std::move(m_tracked_nodes);
274 m_tracked_nodes.clear();
275 }
276
277 for (const auto& node : released) {
278 node->remove_all_hooks();
279 }
280
282 "Unregistered all InputNodes (Registry swapped to empty)");
283}
#define MF_DEBUG(comp, ctx,...)
std::vector< NodeRegistration > RegistrationList
std::atomic< std::shared_ptr< const RegistrationList > > m_registrations
std::vector< std::shared_ptr< Nodes::Input::InputNode > > m_tracked_nodes
To keep nodes alive.
@ InputManagement
Input management (Core::InputManager)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Journal::InputManagement, m_registrations, m_registry_mutex, m_tracked_nodes, and MF_DEBUG.