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 ArchetypeIdHash = core::direct_hash_key<uint32_t>;
23 return id == other.id;
26 return id != other.id;
30 static constexpr ArchetypeId ArchetypeIdBad = (ArchetypeId)-1;
42 GAIA_NODISCARD
static LookupHash calc(ArchetypeId
id) {
43 return {
static_cast<uint32_t
>(core::calculate_hash64(
id))};
46 static constexpr bool IsDirectHashKey =
true;
52 GAIA_NODISCARD
size_t hash()
const {
53 return (
size_t)m_hash.hash;
59 if GAIA_LIKELY (m_hash != other.m_hash)
62 return m_id == other.m_id;
Definition archetype_common.h:33
Wrapper for two types forming a relationship pair. Depending on what types are used to form a pair it...
Definition id.h:202
Definition robin_hood.h:720
Checks if endianess was detected correctly at compile-time.
Definition bitset.h:9
Definition archetype_common.h:18