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 139 of file Fabric.cpp.

140{
141 auto it = m_registrations.find(id);
142 if (it == m_registrations.end())
143 return nullptr;
144 if (auto* ptr = std::get_if<std::shared_ptr<Emitter>>(&it->second.member)) {
145 return *ptr;
146 }
147 return nullptr;
148}
const uint8_t * ptr
std::unordered_map< uint32_t, Registration > m_registrations
Definition Fabric.hpp:292

References m_registrations, and ptr.

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

+ Here is the caller graph for this function: