IdContainer< Element, Model, true > Class Template Reference
Detailed Description
template<typename Element, typename Model>
class IdContainer< Element, Model, true >
This map is for classes which inherit from IdentifiedObject<T> and don't have an id() method by themselves, e.g. all the model objects.
Additionally, items are ordered; iteration occurs on the ordered iterators.
In the implementation :
get<0>()
gets the hashed (like std::unordered_map) iterator.get<1>()
gets the ordered (like std::vector) iterator.
Public Types | |
using | model_type = Model |
using | order_t = std::list< Element * > |
using | map_t = ossia::hash_map< Id< Model >, std::pair< Element *, typename order_t::iterator > > |
using | value_type = Element |
using | iterator = score::indirect_iterator< typename order_t::iterator > |
using | const_iterator = score::indirect_iterator< typename order_t::const_iterator > |
using | const_reverse_iterator = score::indirect_iterator< typename order_t::const_reverse_iterator > |
Public Member Functions | |
IdContainer (const IdContainer &other)=delete | |
IdContainer (IdContainer &&other) noexcept=delete | |
IdContainer & | operator= (const IdContainer &other)=delete |
IdContainer & | operator= (IdContainer &&other)=delete |
auto & | ordered () INLINE_EXPORT |
const_iterator | begin () const INLINE_EXPORT |
const_reverse_iterator | rbegin () const INLINE_EXPORT |
const_iterator | cbegin () const INLINE_EXPORT |
const_iterator | end () const INLINE_EXPORT |
const_reverse_iterator | rend () const INLINE_EXPORT |
const_iterator | cend () const INLINE_EXPORT |
std::size_t | size () const INLINE_EXPORT |
bool | empty () const INLINE_EXPORT |
std::vector< Element * > | as_vec () const INLINE_EXPORT |
score::IndirectContainer< Element > | as_indirect_vec () const INLINE_EXPORT |
void | insert (value_type *t) INLINE_EXPORT |
void | remove (typename map_t::iterator it) INLINE_EXPORT |
void | remove (typename map_t::const_iterator it) INLINE_EXPORT |
void | remove (const Id< Model > &id) INLINE_EXPORT |
void | clear () INLINE_EXPORT |
const_iterator | find (const Id< Model > &id) const INLINE_EXPORT |
Element & | at (const Id< Model > &id) const INLINE_EXPORT |
Public Attributes | |
map_t | m_map |
order_t | m_order |
The documentation for this class was generated from the following file: