asge::ecs
Namespaces
Classes & Structs
ComponentCapacity
Struct
ComponentPool
Class
Entity
Struct
EntityAllocator
Class
EntityPair
Struct
IComponentPool
Class
IResourceHolder
Class
Registry
Class
ResourceHolder
Class
View
Class
Typedefs
using ComponentTypeId = std::size_tDense, monotonically-assigned identifier for a component type.
using EntityIndex = std::uint32_tusing EntityGeneration = std::uint32_tVariables
static constexpr std::size_t component_cap_v = ComponentCapacity<T>::valuestatic constexpr std::size_t kMaxEntities = 4096Maximum number of entities in the EntityAllocator.
Functions
ComponentTypeId NextComponentTypeId() noexceptHands out the next unused ComponentTypeId.
Not meant to be called directly — GetComponentTypeId<T>() is the only intended caller, using it to lazily assign each type its own id once.
The counter is a plain, unsynchronized static: concurrent first calls for different types from multiple threads would race.
template<typename T> ComponentTypeId GetComponentTypeId() noexceptReturns the stable ComponentTypeId for type T.
The id is assigned the first time this is called for T and cached in a function-local static, so every later call for the same T returns that same value for the rest of the program's run. Assignment order depends on call order, so ids must not be persisted or assumed equal across separate runs, builds, or processes.
T | Component type to identify. |
std::uint64_t PackEntity(Entity inE) noexceptPacks an Entity's index+generation into one orderable integer — the basis for EntityPair's operator<.
EntityPair MakeCanonicalPair(Entity inA, Entity inB) noexceptBuilds an EntityPair with the lower-packed Entity always first, so (a, b) and (b, a) produce the same key.