2#include "gaia/config/config.h"
6#include "gaia/cnt/darray.h"
7#include "gaia/cnt/map.h"
8#include "gaia/core/hashing_policy.h"
14 using ArchetypeId = uint32_t;
15 using ArchetypeDArray = cnt::darray<Archetype*>;
16 using CArchetypeDArray = cnt::darray<const Archetype*>;
17 using ArchetypeIdHash = core::direct_hash_key<uint32_t>;
24 return id == other.id;
27 return id != other.id;
31 static constexpr ArchetypeId ArchetypeIdBad = (ArchetypeId)-1;
43 GAIA_NODISCARD
static LookupHash calc(ArchetypeId
id) {
44 return {
static_cast<uint32_t
>(core::calculate_hash64(
id))};
47 static constexpr bool IsDirectHashKey =
true;
53 GAIA_NODISCARD
size_t hash()
const {
54 return (
size_t)m_hash.hash;
60 if GAIA_LIKELY (m_hash != other.m_hash)
63 return m_id == other.m_id;
Definition archetype_common.h:34
Wrapper for two types forming a relationship pair. Depending on what types are used to form a pair it...
Definition id.h:218
Definition robin_hood.h:720
Checks if endianess was detected correctly at compile-time.
Definition bitset.h:9
Definition archetype_common.h:19