41 OSSIA_INLINE
auto begin()
const INLINE_EXPORT {
return m_map.begin(); }
43 OSSIA_INLINE
auto cbegin()
const INLINE_EXPORT {
return m_map.cbegin(); }
44 OSSIA_INLINE
auto end()
const INLINE_EXPORT {
return m_map.end(); }
46 OSSIA_INLINE
auto cend()
const INLINE_EXPORT {
return m_map.cend(); }
47 OSSIA_INLINE
auto size()
const INLINE_EXPORT {
return m_map.size(); }
48 OSSIA_INLINE
bool empty()
const INLINE_EXPORT {
return m_map.empty(); }
49 OSSIA_INLINE
auto& unsafe_map() INLINE_EXPORT {
return m_map; }
50 OSSIA_INLINE
const auto& map()
const INLINE_EXPORT {
return m_map; }
51 OSSIA_INLINE
const auto& get()
const INLINE_EXPORT {
return m_map.m_map; }
52 T& at(
const Id<T>&
id) INLINE_EXPORT {
return m_map.at(
id); }
53 T& at(
const Id<T>&
id)
const INLINE_EXPORT {
return m_map.at(
id); }
54 auto find(
const Id<T>&
id)
const INLINE_EXPORT {
return m_map.find(
id); }
57 mutable Nano::Signal<void(T&)> mutable_added;
58 mutable Nano::Signal<void(
const T&)> added;
59 mutable Nano::Signal<void(
const T&)> removing;
60 mutable Nano::Signal<void(
const T&)> removed;
61 mutable Nano::Signal<void()> orderChanged;
62 mutable Nano::Signal<void()> replaced;
65 void add_quiet(T* t) INLINE_EXPORT
70 void erase(T& elt) INLINE_EXPORT
73 m_map.remove(elt.id());
77 void remove(T& elt) INLINE_EXPORT
80 m_map.remove(elt.id());
85 void remove(T* elt) INLINE_EXPORT
88 m_map.remove(elt->id());
93 void remove(
const Id<T>&
id) INLINE_EXPORT
95 auto it = m_map.m_map.find(
id);
98 auto& elt = *it->second.first;
107 auto& elt = *it->second;
116 void clear() INLINE_EXPORT
118 while(!m_map.empty())
120 remove(*m_map.begin());
130 m_map.m_map = std::move(new_map.m_map);
131 if constexpr(Ordered)
133 m_map.m_order = std::move(new_map.m_order);
154void EntityMapInserter<T, O>::add_quiet(EntityMap<T, O>& map, T* t)