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

◆ get_agent()

std::shared_ptr< Agent > MayaFlux::Nexus::Fabric::get_agent ( uint32_t  id) const

Get the Agent registered under id.

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

Definition at line 167 of file Fabric.cpp.

168{
169 auto it = m_registrations.find(id);
170 if (it == m_registrations.end())
171 return nullptr;
172 if (auto* ptr = std::get_if<std::shared_ptr<Agent>>(&it->second.member)) {
173 return *ptr;
174 }
175 return nullptr;
176}
const uint8_t * ptr
std::unordered_map< uint32_t, Registration > m_registrations
Definition Fabric.hpp:293

References m_registrations, and ptr.

Referenced by MayaFlux::Nexus::StateEncoder::encode_fabric().

+ Here is the caller graph for this function: