A container for caching and retrieving instances of types that share a common base class.
More...
#include <Container.h>
|
template<typename Type > |
bool | contains () const |
|
bool | contains (const std::size_t index) const |
|
template<typename Type > |
const Type & | get () const |
|
template<typename Type > |
std::enable_if< std::is_default_constructible< Type >::value, Type & >::type | get () noexcept |
|
template<typename Type > |
std::enable_if<!std::is_default_constructible< Type >::value, Type & >::type | get () |
|
const T & | get (const std::size_t &index) const |
|
T & | get (const std::size_t &index) |
|
const std::unordered_map< std::size_t, std::unique_ptr< T > > & | data () const |
|
std::unordered_map< std::size_t, std::unique_ptr< T > > & | data () |
|
template<typename T>
class smtk::resource::query::Container< T >
A container for caching and retrieving instances of types that share a common base class.
Instances are retrieved using type information as a key, allowing for simultaneous lookup and static downcast into that type. This class differs from smtk::common::TypeContainer by the requirement that each contained element have a common base class; this restriction enables us to retrieve derived elements using base element indices as keys.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/smtk/checkouts/latest/smtk/resource/query/Container.h