psl::ecs::details namespace

specialized implementation of psl::sparse_array

Private implementation details for the ECS.

Unlike normal sparse_array, this variation is implemented as a cascading stage, where stage 0 is the "stale" data, stage 1 is the recently added data, and stage 2 is the removed data. This is catered towards usage within the psl::ecs solution, which is why it is part of its namespace.

In general it can be unwieldy and unsafe to use without knowing the internal workings, so avoid using this unless you know what you need it for and are sure you understand its internals.

classes

component_container_t
implementation detail that stores the component data
component_key_t
Container type for unique component types. These should be construced using the component_key_t::generate helper function.
dependency_pack
describes a set of dependencies for a given system
staged_sparse_memory_region_t
A specialized container type to store components in a type agnostic manner.

enums

stage_t : uint8_t
Defines the discrete stages the staged_sparse_memory_region_t can store.
enum classclasspublicpublic
stage_range_t : uint8_t
Defines types of ranges you can safely interact with in a contiguous way.
enum classclasspublicpublic

functions

is_valid_name
Verify the given name is valid for component name substitution.
-> bool public constexpr

concepts

psl::ecs::details::DoesComponentTypeNeedPrototypeCall Designates types that either need to be constructed, or that have a prototype definition that override their normal operations.
psl::ecs::details::HasComponentMemberPrototypeDefinition
psl::ecs::details::HasComponentTraitsPrototypeDefinition
psl::ecs::details::HasComponentTypePrototypeDefinition
psl::ecs::details::IsValidForStagedSparseMemoryRange Constraint for what types can safely be stored by staged_sparse_memory_region_t
psl::ecs::details::DoesComponentTypeNeedPrototypeCall Designates types that either need to be constructed, or that have a prototype definition that override their normal operations.
psl::ecs::details::IsValidForStagedSparseMemoryRange Constraint for what types can safely be stored by staged_sparse_memory_region_t

Function documentation

auto psl::ecs::details::is_valid_name(std::string_view name) -> bool constexpr

Brief

Verify the given name is valid for component name substitution.

Details

In general this means all characters are valid if they are also valid for that context for typenames. This means the name has to start with an alphabetical letter or underscore. Subsequent values can be alphanumeric.