tess 0.4.0
Performance-first tile and path simulation substrate
Loading...
Searching...
No Matches
tess::EntityHandleAdapter Concept Reference

#include <tess/ecs/adapter.h>

Concept definition

template<typename A>
concept EntityHandleAdapter = requires(const A& adapter, EntityHandle handle,
const typename A::entity_type& entity) {
typename A::entity_type;
{ adapter.to_handle(entity) } noexcept -> std::same_as<EntityHandle>;
{
adapter.to_entity(handle)
} noexcept -> std::same_as<typename A::entity_type>;
}
Definition adapter.h:36
Definition entity_handle.h:16

Detailed Description

Lossless conversion contract between a native entity and EntityHandle.

Implementations must map the native null entity to kNullEntityHandle in both directions.