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

Additional options for query terms. This can be used to configure source lookup, traversal and access mode without relying on many positional overloads. More...

#include <query_common.h>

Public Member Functions

QueryTermOptionssrc (Entity source)
 Selects a fixed or variable source entity for the term.
 
QueryTermOptionstrav (Entity relation=ChildOf)
 Traverses the source and its relation targets without a user depth limit.
 
QueryTermOptionstrav_up (Entity relation=ChildOf)
 Traverses relation targets without checking the source itself.
 
QueryTermOptionstrav_parent (Entity relation=ChildOf)
 Checks only the immediate relation target of the source.
 
QueryTermOptionstrav_self_parent (Entity relation=ChildOf)
 Checks the source and its immediate relation target.
 
QueryTermOptionstrav_down (Entity relation=ChildOf)
 Traverses entities targeting the source without a user depth limit.
 
QueryTermOptionstrav_self_down (Entity relation=ChildOf)
 Checks the source and recursively traverses entities targeting it.
 
QueryTermOptionstrav_child (Entity relation=ChildOf)
 Checks only immediate entities targeting the source.
 
QueryTermOptionstrav_self_child (Entity relation=ChildOf)
 Checks the source and immediate entities targeting it.
 
QueryTermOptionstrav_kind (QueryTravKind kind)
 Replaces the traversal filter without changing its relation or depth.
 
QueryTermOptionstrav_depth (uint8_t maxDepth)
 Sets the maximum traversal distance.
 
QueryTermOptionsread ()
 Requests read-only access to the term.
 
QueryTermOptionswrite ()
 Requests mutable access to the term.
 
QueryTermOptionsdirect ()
 Restricts the term to direct storage matches.
 
QueryTermOptionsin ()
 Allows direct and inherited matches for the term.
 

Public Attributes

Entity entSrc = EntityBad
 Source entity to query from.
 
Entity entTrav = EntityBad
 Optional traversal relation used for source lookup.
 
QueryTravKind travKind = QueryTravKind::Self | QueryTravKind::Up
 Source traversal filter.
 
uint8_t travDepth = TravDepthUnlimited
 Maximum number of traversal steps. 0 means unlimited traversal depth (bounded internally, at most MAX_TRAV_DEPTH steps).
 
QueryAccess access = QueryAccess::None
 Access mode for the term. When None, typed query terms infer read/write access from template mutability.
 
QueryMatchKind matchKind = QueryMatchKind::Semantic
 Match semantics for terms with special meaning, such as Pair(Is, X).
 

Static Public Attributes

static constexpr uint8_t TravDepthUnlimited = QueryInput::TravDepthUnlimited
 Traversal-depth value selecting the internally bounded unlimited mode.
 

Detailed Description

Additional options for query terms. This can be used to configure source lookup, traversal and access mode without relying on many positional overloads.

Member Function Documentation

◆ direct()

QueryTermOptions & gaia::ecs::QueryTermOptions::direct ( )
inline

Restricts the term to direct storage matches.

Returns
This options object.

◆ in()

QueryTermOptions & gaia::ecs::QueryTermOptions::in ( )
inline

Allows direct and inherited matches for the term.

Returns
This options object.

◆ read()

QueryTermOptions & gaia::ecs::QueryTermOptions::read ( )
inline

Requests read-only access to the term.

Returns
This options object.

◆ src()

QueryTermOptions & gaia::ecs::QueryTermOptions::src ( Entity  source)
inline

Selects a fixed or variable source entity for the term.

Parameters
sourceSource entity or variable identifier.
Returns
This options object.

◆ trav()

QueryTermOptions & gaia::ecs::QueryTermOptions::trav ( Entity  relation = ChildOf)
inline

Traverses the source and its relation targets without a user depth limit.

Parameters
relationRelation to traverse.
Returns
This options object.

◆ trav_child()

QueryTermOptions & gaia::ecs::QueryTermOptions::trav_child ( Entity  relation = ChildOf)
inline

Checks only immediate entities targeting the source.

Parameters
relationRelation to traverse in reverse.
Returns
This options object.

◆ trav_depth()

QueryTermOptions & gaia::ecs::QueryTermOptions::trav_depth ( uint8_t  maxDepth)
inline

Sets the maximum traversal distance.

Parameters
maxDepthMaximum steps, or TravDepthUnlimited for the internal limit.
Returns
This options object.

◆ trav_down()

QueryTermOptions & gaia::ecs::QueryTermOptions::trav_down ( Entity  relation = ChildOf)
inline

Traverses entities targeting the source without a user depth limit.

Parameters
relationRelation to traverse in reverse.
Returns
This options object.

◆ trav_kind()

QueryTermOptions & gaia::ecs::QueryTermOptions::trav_kind ( QueryTravKind  kind)
inline

Replaces the traversal filter without changing its relation or depth.

Parameters
kindTraversal locations to inspect.
Returns
This options object.

◆ trav_parent()

QueryTermOptions & gaia::ecs::QueryTermOptions::trav_parent ( Entity  relation = ChildOf)
inline

Checks only the immediate relation target of the source.

Parameters
relationRelation to traverse.
Returns
This options object.

◆ trav_self_child()

QueryTermOptions & gaia::ecs::QueryTermOptions::trav_self_child ( Entity  relation = ChildOf)
inline

Checks the source and immediate entities targeting it.

Parameters
relationRelation to traverse in reverse.
Returns
This options object.

◆ trav_self_down()

QueryTermOptions & gaia::ecs::QueryTermOptions::trav_self_down ( Entity  relation = ChildOf)
inline

Checks the source and recursively traverses entities targeting it.

Parameters
relationRelation to traverse in reverse.
Returns
This options object.

◆ trav_self_parent()

QueryTermOptions & gaia::ecs::QueryTermOptions::trav_self_parent ( Entity  relation = ChildOf)
inline

Checks the source and its immediate relation target.

Parameters
relationRelation to traverse.
Returns
This options object.

◆ trav_up()

QueryTermOptions & gaia::ecs::QueryTermOptions::trav_up ( Entity  relation = ChildOf)
inline

Traverses relation targets without checking the source itself.

Parameters
relationRelation to traverse.
Returns
This options object.

◆ write()

QueryTermOptions & gaia::ecs::QueryTermOptions::write ( )
inline

Requests mutable access to the term.

Returns
This options object.

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