EntityHandle.ixx File
Versioned, strongly-typed handle for referencing entities. More...
Included Headers
#include <functional>
#include <cstdint>
#include <cstddef>
#include <helios.ecs.types.StrongId>
#include <helios.ecs.types.TypeDefs>
Namespaces Index
| namespace | helios |
| namespace | ecs |
| namespace | types |
Classes Index
| struct | EntityHandle<TDomainTag> |
|
A versioned handle for referencing entities in a registry. More... | |
| struct | hash<helios::ecs::types::EntityHandle< TDomainTag >> |
|
Hash specialization for EntityHandle. More... | |
Description
Versioned, strongly-typed handle for referencing entities.
File Listing
The file content with the documentation metadata removed is:
17using namespace helios::ecs::types;
18export namespace helios::ecs::types {
23 constexpr auto InvalidVersion = VersionId{0};
31 constexpr auto InitialVersion = VersionId{1};
47 struct EntityHandle {
66 using DomainTag_type = TDomainTag;
68 using StrongId_type = StrongId<TDomainTag>;
73 bool operator==(const EntityHandle<TDomainTag>&) const = default;
82 constexpr bool operator<(const EntityHandle<TDomainTag>& entityHandle) const noexcept {
83 return entityId < entityHandle.entityId;
93 constexpr bool operator>(const EntityHandle<TDomainTag>& entityHandle) const noexcept {
94 return entityId > entityHandle.entityId;
104 return versionId >= 1;
118struct std::hash<helios::ecs::types::EntityHandle<TDomainTag>> {
119 std::size_t operator()(const helios::ecs::types::EntityHandle<TDomainTag>& handle) const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.