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

◆ get() [2/4]

template<typename U>
std::shared_ptr< U > MayaFlux::Facets::get ( const Facet< std::shared_ptr< U > > & key) const
inlinenodiscard

The shared pointer under key, or an empty one when absent.

Definition at line 168 of file Facets.hpp.

169 {
170 const auto it = m_entries.find(key.id());
171 if (it == m_entries.end()) {
172 return nullptr;
173 }
174 return static_cast<const Entry<std::shared_ptr<U>>*>(it->second.get())->value;
175 }
Memory::FlatMap< const void *, std::shared_ptr< const EntryBase > > m_entries
Definition Facets.hpp:258

References m_entries, and MayaFlux::Facets::Entry< T >::value.