![]() |
Gaia-ECS v0.9.3
A simple and powerful entity component system
|
Public Types | |
| enum class | ChangeKind : uint8_t { Structural , DynamicResult , All } |
Public Member Functions | |
| QueryCache (QueryCache &&)=delete | |
| QueryCache (const QueryCache &)=delete | |
| QueryCache & | operator= (QueryCache &&)=delete |
| QueryCache & | operator= (const QueryCache &)=delete |
| GAIA_NODISCARD bool | valid (QueryHandle handle) const |
| void | clear () |
| void | clear_archetype_tracking () |
| Clears only the reverse indices that keep raw archetype pointers alive. Used during world shutdown before archetypes begin running chunk/component dtors. | |
| QueryInfo * | try_get (QueryHandle handle) |
| Returns a QueryInfo object associated with handle. | |
| QueryInfo & | get (QueryHandle handle) |
| Returns a QueryInfo object associated with handle. | |
| QueryInfo & | add (QueryCtx &&ctx, const EntityToArchetypeMap &entityToArchetypeMap, std::span< const Archetype * > allArchetypes) |
| Registers the provided query lookup context ctx. If it already exists it is returned. | |
| QueryInfo & | add_local (QueryCtx &&ctx, const EntityToArchetypeMap &entityToArchetypeMap, std::span< const Archetype * > allArchetypes) |
| Registers a cached query without deduplicating against the shared lookup map. | |
| bool | del (QueryHandle handle) |
| Deletes an existing QueryInfo object given the provided query handle. | |
| auto | begin () |
| auto | end () |
| void | invalidate_queries_for_entity (EntityLookupKey entityKey, ChangeKind changeKind) |
| Invalidates all cached queries that work with the given entity This covers the following kinds of query terms: 1) X 2) (*, X) 3) (X, *) | |
| void | invalidate_queries_for_rel (Entity relation, ChangeKind changeKind) |
| void | invalidate_sorted_queries_for_entity (Entity entity) |
| void | invalidate_sorted_queries () |
| Invalidates all cached sorted queries after chunk row order changes. | |
| void | sync_archetype_cache (QueryInfo &queryInfo) |
| void | remove_archetype_from_queries (Archetype *pArchetype) |
| void | register_archetype_with_queries (const Archetype *pArchetype) |
|
inline |
Registers the provided query lookup context ctx. If it already exists it is returned.
| ctx | Query context |
| entityToArchetypeMap | Map of all archetypes |
| allArchetypes | Array of all archetypes |
|
inline |
Deletes an existing QueryInfo object given the provided query handle.
| handle | Query handle |
|
inline |
|
inline |
Invalidates all cached queries that work with the given entity This covers the following kinds of query terms: 1) X 2) (*, X) 3) (X, *)
| entityKey | Entity lookup key |
|
inline |