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

◆ get_emitter()

std::shared_ptr< Emitter > MayaFlux::Nexus::Fabric::get_emitter ( uint32_t  id) const

Get the Emitter registered under id.

Returns
The Emitter, or nullptr if id is not an Emitter or not registered.

Definition at line 126 of file Fabric.cpp.

127{
128 auto it = m_registrations.find(id);
129 if (it == m_registrations.end())
130 return nullptr;
131 if (auto* ptr = std::get_if<std::shared_ptr<Emitter>>(&it->second.member)) {
132 return *ptr;
133 }
134 return nullptr;
135}
std::unordered_map< uint32_t, Registration > m_registrations
Definition Fabric.hpp:225

References m_registrations.

Referenced by MayaFlux::Nexus::StateDecoder::decode(), MayaFlux::Nexus::StateEncoder::encode(), and MayaFlux::Nexus::StateDecoder::reconstruct().

+ Here is the caller graph for this function: