2 #include <score/tools/std/Optional.hpp>
10 template <
typename T,
bool Order>
13 template <
typename Element,
typename Model,
bool Order>
55 template <
typename tag,
typename impl>
64 template <
typename Element,
typename Model,
bool Order>
68 using value_type = impl;
77 : m_id{std::move(other.m_id)}
80 template <
typename other>
81 requires(std::is_base_of_v<tag, other>)
87 template <
typename other>
88 requires(std::is_base_of_v<tag, other>)
110 explicit id_base_t(value_type val) noexcept
111 : m_id{std::move(val)}
115 explicit id_base_t(tag& element) noexcept
121 id_base_t& operator=(tag& element) noexcept
131 return lhs.m_id == rhs.m_id;
136 return lhs.m_id != rhs.m_id;
141 return lhs.val() < rhs.val();
144 explicit operator value_type()
const noexcept {
return m_id; }
146 const value_type& val()
const noexcept {
return m_id; }
148 void setVal(value_type val) noexcept { m_id = val; }
151 mutable QPointer<QObject> m_ptr;
158 template <
typename tag>
164 template <
typename tag>
165 using OptionalId = std::optional<Id<tag>>;
169 template <
typename tag>
172 std::size_t operator()(
const Id<tag>&
id)
const
174 return std::hash<int32_t>{}(
id.val());
178 template <
typename T>
179 uint qHash(
const Id<T>&
id, uint seed)
181 return qHash(*
id.val(), seed);
A map to access child objects through their id.
Definition: IdentifiedObjectMap.hpp:16
The IdentifiedObject class.
Definition: IdentifiedObject.hpp:19
The id_base_t class.
Definition: Identifier.hpp:57
The EntityMap class.
Definition: EntityMap.hpp:36
Base toolkit upon which the software is built.
Definition: Application.cpp:90