Gaia-ECS v1.0.0
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::ecs::QueryInfo::QueryState::DynamicCacheState::DirectSourcePayload Struct Reference

Direct concrete-source payload for reusable dynamic caches. More...

#include <query_info.h>

Public Member Functions

GAIA_NODISCARD bool changed (const World &world, std::span< const Entity > sourceEntities) const
 Returns true when any tracked source entity changed archetype.
 
void snapshot (const World &world, std::span< const Entity > sourceEntities)
 Captures current source entity archetype versions.
 

Public Attributes

cnt::sarray< uint32_t, MAX_ITEMS_IN_QUERY > entityVersions
 Last seen archetype versions for tracked direct concrete source entities.
 

Detailed Description

Direct concrete-source payload for reusable dynamic caches.

Member Function Documentation

◆ changed()

GAIA_NODISCARD bool gaia::ecs::QueryInfo::QueryState::DynamicCacheState::DirectSourcePayload::changed ( const World world,
std::span< const Entity sourceEntities 
) const
inline

Returns true when any tracked source entity changed archetype.

Parameters
worldWorld providing current entity archetype versions.
sourceEntitiesSource entities aligned with entityVersions.
Returns
True when any source archetype version differs from its snapshot.

◆ snapshot()

void gaia::ecs::QueryInfo::QueryState::DynamicCacheState::DirectSourcePayload::snapshot ( const World world,
std::span< const Entity sourceEntities 
)
inline

Captures current source entity archetype versions.

Parameters
worldWorld providing current entity archetype versions.
sourceEntitiesSource entities whose versions are captured in order.

The documentation for this struct was generated from the following file: