42 constexpr Entity(uint64_t
id);
66 static constexpr auto name =
"Entity";
97 this->
index =
id & 0x00000000003FFFFF;
98 this->
generation = (
id & 0x0000000FFC00000) >> 22;
99 this->
world = (
id & 0x000000FF00000000) >> 32;
106inline constexpr Entity::Entity(uint32_t world, uint32_t generation, uint32_t index)
127inline constexpr Game::Entity::operator
Ids::Id64()
const
129 return (((uint64_t)world << 32) & 0x000000FF00000000)
130 + (((uint64_t)generation << 22) & 0x0000000FFC00000)
131 + ((uint64_t)index & 0x00000000003FFFFF);
137inline constexpr Entity
140 return 0xFFFFFFFFFFFFFFFF;
146inline constexpr uint32_t
158 this->
index =
id & 0x00000000003FFFFF;
159 this->
generation = (
id & 0x0000000FFC00000) >> 22;
160 this->
world = (
id & 0x000000FF00000000) >> 32;
161 this->
reserved = (
id & 0xFFFFFF0000000000) >> 40;
#define ID_32_TYPE(x)
Definition id.h:16
Game::EditorState.
Definition graphicsmanager.h:60
uint32_t WorldId
Definition entity.h:28
uint64_t Id64
Definition id.h:137
static constexpr size_t field_byte_offsets[num_fields]
Definition entity.h:75
static constexpr const char * field_names[num_fields]
Definition entity.h:69
static constexpr auto fully_qualified_name
Definition entity.h:67
static constexpr const char * field_typenames[num_fields]
Definition entity.h:72
static constexpr auto name
Definition entity.h:66
static constexpr size_t num_fields
Definition entity.h:68
static constexpr uint32_t fixed_column_index
This is the column that the entity "owner" will reside in, in every table.
Definition entity.h:79
An entity is essentially just an Id with some utility functions attached.
Definition entity.h:35
uint32_t reserved
Definition entity.h:39
constexpr uint32_t HashCode() const
Definition entity.h:147
const bool operator>(const Entity &rhs) const
Definition entity.h:196
static constexpr Entity Invalid()
Definition entity.h:138
const bool operator==(const Entity &rhs) const
Definition entity.h:169
uint32_t world
Definition entity.h:38
uint32_t generation
Definition entity.h:37
uint32_t index
Definition entity.h:36
const bool operator!=(const Entity &rhs) const
Definition entity.h:178
Entity & operator=(uint64_t rhs)
Definition entity.h:156
static constexpr Entity FromId(Ids::Id64 id)
Definition entity.h:118
const bool operator<(const Entity &rhs) const
Definition entity.h:187
Maps an entity to a table and instance id.
Definition entity.h:87
MemDb::RowId instance
Definition entity.h:89
MemDb::TableId table
Definition entity.h:88
row identifier
Definition tableid.h:18
Table identifier.
Definition tableid.h:14