Explicit component/entity access declarations used for scheduling decisions.
More...
#include <query_common.h>
|
|
cnt::sarray< Entity, MAX_ITEMS_IN_QUERY > | reads |
| | Component/entity ids read by the callback outside the query terms.
|
| |
|
cnt::sarray< Entity, MAX_ITEMS_IN_QUERY > | writes |
| | Component/entity ids written by the callback outside the query terms.
|
| |
|
uint8_t | readCnt = 0 |
| | Number of valid entries in reads.
|
| |
|
uint8_t | writeCnt = 0 |
| | Number of valid entries in writes.
|
| |
Explicit component/entity access declarations used for scheduling decisions.
Queries derive read/write access from their positive query terms. This small side-band set stores accesses that are not part of the query shape, for example a component fetched manually inside the query callback.
- Note
- This metadata is intentionally not part of query identity. It does not affect query hashing, matching, cache sharing, or cache invalidation.
◆ access()
| GAIA_NODISCARD QueryAccess gaia::ecs::QueryAccessSet::access |
( |
Entity |
entity | ) |
const |
|
inline |
Returns explicitly declared access for an id.
- Parameters
-
| entity | Component/entity id to look up. |
- Returns
- Write if explicitly written, Read if explicitly read, None otherwise.
◆ add_read()
| void gaia::ecs::QueryAccessSet::add_read |
( |
Entity |
entity | ) |
|
|
inline |
Declares that an id is read.
- Parameters
-
| entity | Component/entity id read by user code. |
◆ add_write()
| void gaia::ecs::QueryAccessSet::add_write |
( |
Entity |
entity | ) |
|
|
inline |
Declares that an id is written.
- Parameters
-
| entity | Component/entity id written by user code. |
◆ reads_view()
| GAIA_NODISCARD std::span< const Entity > gaia::ecs::QueryAccessSet::reads_view |
( |
| ) |
const |
|
inline |
Returns the explicitly declared read ids.
- Returns
- Read-only span over explicit read ids.
◆ writes_view()
| GAIA_NODISCARD std::span< const Entity > gaia::ecs::QueryAccessSet::writes_view |
( |
| ) |
const |
|
inline |
Returns the explicitly declared write ids.
- Returns
- Read-only span over explicit write ids.
The documentation for this struct was generated from the following file: