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

Relation-version payload for reusable dynamic caches with relation dependencies. More...

#include <query_info.h>

Public Member Functions

GAIA_NODISCARD bool changed (const World &world, std::span< const Entity > relations) const
 Returns true when any tracked relation version changed.
 
void snapshot (const World &world, std::span< const Entity > relations)
 Captures current relation versions.
 

Public Attributes

cnt::sarray< uint32_t, MAX_ITEMS_IN_QUERY > versions
 Last seen versions for tracked dynamic relation dependencies.
 

Detailed Description

Relation-version payload for reusable dynamic caches with relation dependencies.

Member Function Documentation

◆ changed()

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

Returns true when any tracked relation version changed.

Parameters
worldWorld providing current relation topology versions.
relationsRelations aligned with versions.
Returns
True when any current version differs from its snapshot.

◆ snapshot()

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

Captures current relation versions.

Parameters
worldWorld providing current relation topology versions.
relationsRelations whose versions are captured in order.

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