Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::ecs::IterDisabled Class Referencefinal

Iterator for iterating disabled entities. More...

#include <chunk_iterator.h>

+ Inheritance diagram for gaia::ecs::IterDisabled:

Additional Inherited Members

- Public Member Functions inherited from gaia::ecs::detail::ChunkIterImpl< Constraints::DisabledOnly >
 ChunkIterImpl (ChunkIterImpl &&) noexcept=default
 
 ChunkIterImpl (const ChunkIterImpl &)=delete
 
ChunkIterImploperator= (ChunkIterImpl &&) noexcept=default
 
ChunkIterImploperator= (const ChunkIterImpl &)=delete
 
void set_world (const World *pWorld)
 
GAIA_NODISCARD Worldworld ()
 
GAIA_NODISCARD const Worldworld () const
 
void set_archetype (const Archetype *pArchetype)
 
GAIA_NODISCARD const Archetypearchetype () const
 
void set_chunk (Chunk *pChunk)
 
void set_chunk (Chunk *pChunk, uint16_t from, uint16_t to)
 
GAIA_NODISCARD const Chunkchunk () const
 
void set_comp_indices (const uint8_t *pCompIndices)
 
void set_inherited_data (InheritedTermDataView inheritedData)
 
void set_term_ids (const Entity *pTermIds)
 
GAIA_NODISCARD const uint8_t * comp_indices () const
 
GAIA_NODISCARD InheritedTermDataView inherited_data () const
 
GAIA_NODISCARD const Entityterm_ids () const
 
void set_write_im (bool value)
 
GAIA_NODISCARD bool write_im () const
 
void clear_touched_writes ()
 
GAIA_NODISCARD const Entityentity_snapshot ()
 
GAIA_NODISCARD auto touched_comp_indices () const
 
GAIA_NODISCARD auto touched_terms () const
 
GAIA_NODISCARD auto entity_rows ()
 
GAIA_NODISCARD auto entity_view_set (Entity termId, bool writeIm)
 
GAIA_NODISCARD auto entity_soa_view_set (Entity termId, bool writeIm)
 
void set_group_id (GroupId groupId)
 
GAIA_NODISCARD GroupId group_id () const
 
GAIA_NODISCARD CommandBufferSTcmd_buffer_st () const
 
GAIA_NODISCARD CommandBufferMTcmd_buffer_mt () const
 
GAIA_NODISCARD bool uses_out_of_line_component () const
 
void touch_comp_idx (uint8_t compIdx)
 
void touch_term (Entity term)
 
void touch_term_by_type ()
 
GAIA_NODISCARD Entity fallback_term_id (uint32_t termIdx) const
 
GAIA_NODISCARD auto view_any () const
 Returns a read-only entity or component view that can resolve non-direct storage. This is the fallback accessor for terms that may come from outside the chunk column, such as inherited, sparse, out-of-line, or other entity-backed storage.
 
GAIA_NODISCARD auto view_any (uint32_t termIdx)
 Returns a read-only entity or component view for a query-term index that can resolve non-direct storage. Use this when the term may resolve to inherited, sparse, out-of-line, or other entity-backed storage instead of a dense chunk column.
 
GAIA_NODISCARD auto view () const
 Returns a read-only entity or component view for the owned chunk-backed fast path. This assumes the resolved term is stored directly in the current chunk range and therefore skips all non-direct dispatch. Use view_any() when the term may resolve to inherited, sparse, out-of-line, or otherwise entity-backed storage.
 
GAIA_NODISCARD auto view (uint32_t termIdx) const
 Returns a read-only entity or component view for a query-term owned chunk-backed term. The caller is responsible for passing a term index that maps to a dense chunk column. Use view_any(termIdx) when the term may resolve to inherited, sparse, out-of-line, or other non-direct storage.
 
GAIA_NODISCARD auto view_mut_any ()
 Returns a mutable entity or component view that can resolve non-direct storage. This is the fallback accessor for inherited, sparse, out-of-line, or other entity-backed terms that are not guaranteed to be backed by the current chunk column.
 
GAIA_NODISCARD auto view_mut_any (uint32_t termIdx)
 Returns a mutable entity or component view for a query-term index that can resolve non-direct storage. Use this when the term may resolve to inherited, sparse, out-of-line, or other entity-backed storage instead of a dense chunk column. Updates world versioning for chunk-backed terms before handing out mutable access.
 
GAIA_NODISCARD auto view_mut ()
 Returns a mutable entity or component view for the owned chunk-backed fast path. Updates world versioning through the underlying chunk view and skips all non-direct dispatch. Use view_mut_any() when the term may resolve to inherited, sparse, out-of-line, or other entity-backed storage.
 
GAIA_NODISCARD auto view_mut (uint32_t termIdx)
 Returns a mutable entity or component view for a query-term owned chunk-backed term. Updates world versioning for the selected chunk column before handing out mutable access. Use view_mut_any(termIdx) when the term may resolve to inherited, sparse, out-of-line, or other non-direct storage.
 
GAIA_NODISCARD auto sview_mut_any ()
 Returns a mutable component view that can resolve non-direct storage. This is the fallback accessor for inherited, sparse, out-of-line, or other entity-backed terms that are not guaranteed to be backed by the current chunk column. Doesn't update the world version when the access is acquired.
 
GAIA_NODISCARD auto sview_mut_any (uint32_t termIdx)
 Returns a mutable component view for a query-term index that can resolve non-direct storage. Use this when the term may resolve to inherited, sparse, out-of-line, or other entity-backed storage instead of a dense chunk column. Doesn't update the world version when the access is acquired.
 
GAIA_NODISCARD auto sview_mut ()
 Returns a mutable component view for the owned chunk-backed fast path. Doesn't update the world version when the access is acquired and skips all non-direct dispatch. Use sview_mut_any() when the term may resolve to inherited, sparse, out-of-line, or other entity-backed storage.
 
GAIA_NODISCARD auto sview_mut (uint32_t termIdx)
 Returns a mutable component view for a query-term owned chunk-backed term. Doesn't update the world version when the access is acquired. Use sview_mut_any(termIdx) when the term may resolve to inherited, sparse, out-of-line, or other non-direct storage.
 
void modify ()
 Marks the component T as modified. Best used with sview to manually trigger an update at user's whim. If.
 
GAIA_NODISCARD auto view_auto ()
 Returns either a mutable or immutable entity/component view for the owned chunk-backed fast path. Value and const types are treated as immutable. Mutable references select the mutable path. Use view_auto_any() when the term may resolve to inherited, sparse, out-of-line, or other non-direct storage.
 
GAIA_NODISCARD auto view_auto_any ()
 Returns either a mutable or immutable entity/component view that can resolve non-direct storage. Value and const types are considered immutable. Anything else is mutable. Use this when the term may resolve to inherited, sparse, out-of-line, or other entity-backed storage.
 
GAIA_NODISCARD auto sview_auto_any ()
 Returns either a mutable or immutable entity/component view that can resolve non-direct storage. Value and const types are considered immutable. Anything else is mutable. Use this when the term may resolve to inherited, sparse, out-of-line, or other entity-backed storage. Doesn't update the world version when read-write access is acquired.
 
GAIA_NODISCARD auto sview_auto ()
 Returns either a mutable or immutable entity/component view for the owned chunk-backed fast path. Value and const types are treated as immutable. Mutable references select the mutable path. Doesn't update the world version when read-write access is acquired. Use sview_auto_any() when the term may resolve to inherited, sparse, out-of-line, or other non-direct storage.
 
GAIA_NODISCARD bool enabled (uint32_t index) const
 Checks if the entity at the current iterator index is enabled.
 
GAIA_NODISCARD bool has (Entity entity) const
 Checks if entity entity is present in the chunk.
 
GAIA_NODISCARD bool has (Pair pair) const
 Checks if relationship pair pair is present in the chunk.
 
GAIA_NODISCARD bool has () const
 Checks if component T is present in the chunk.
 
GAIA_NODISCARD uint16_t size () const noexcept
 Returns the number of entities accessible via the iterator.
 
GAIA_NODISCARD uint16_t row_begin () const noexcept
 Returns the first row covered by the iterator in the current chunk.
 
GAIA_NODISCARD uint16_t row_end () const noexcept
 Returns one-past-the-end row covered by the iterator in the current chunk.
 
uint32_t acc_index (uint32_t idx) const noexcept
 Returns the absolute index that should be used to access an item in the chunk. AoS indices map directly, SoA indices need some adjustments because the view is always considered {0..ChunkCapacity} instead of {FirstEnabled..ChunkSize}.
 
uint32_t acc_index_direct (uint32_t idx) const noexcept
 Returns the local row index for direct iterator views. Direct views already encode the iterator row base, so no additional adjustment is needed.
 
- Static Public Member Functions inherited from gaia::ecs::detail::ChunkIterImpl< Constraints::DisabledOnly >
static GAIA_NODISCARD uint16_t start_index (Chunk *pChunk) noexcept
 
static GAIA_NODISCARD uint16_t end_index (Chunk *pChunk) noexcept
 
static GAIA_NODISCARD uint16_t size (Chunk *pChunk) noexcept
 
- Protected Types inherited from gaia::ecs::detail::ChunkIterImpl< Constraints::DisabledOnly >
using CompIndicesBitView = core::bit_view< ChunkHeader::MAX_COMPONENTS_BITS >
 
- Protected Member Functions inherited from gaia::ecs::detail::ChunkIterImpl< Constraints::DisabledOnly >
GAIA_NODISCARD uint16_t from () const noexcept
 Returns the starting index of the iterator.
 
GAIA_NODISCARD uint16_t to () const noexcept
 Returns the ending index of the iterator (one past the last valid index)
 
- Protected Attributes inherited from gaia::ecs::detail::ChunkIterImpl< Constraints::DisabledOnly >
const Worldm_pWorld
 World pointer.
 
const Archetypem_pArchetype
 Currently iterated archetype.
 
Chunkm_pChunk
 Chunk currently associated with the iterator.
 
const uint8_t * m_pCompIndices
 ChunkHeader::MAX_COMPONENTS values for component indices mapping for the parent archetype.
 
InheritedTermDataView m_inheritedData
 Optional inherited term data view for exact semantic self-source terms.
 
const Entitym_pTermIdMapping
 Optional per-term ids used by one-row direct iterators when a term resolves semantically.
 
bool m_writeIm
 Whether mutable access should finish writes immediately or defer them until the callback returns.
 
uint8_t m_touchedCompIndices [ChunkHeader::MAX_COMPONENTS]
 Chunk-backed columns that were exposed as mutable during the current callback.
 
uint8_t m_touchedCompCnt
 
Entity m_touchedTerms [ChunkHeader::MAX_COMPONENTS]
 Entity-backed terms that were exposed as mutable during the current callback.
 
uint8_t m_touchedTermCnt
 
Entity m_entitySnapshot [ChunkHeader::MAX_CHUNK_ENTITIES]
 Stable copy of the currently iterated entity rows for mutable entity-backed views.
 
bool m_entitySnapshotValid
 
uint16_t m_from
 Row of the first entity we iterate from.
 
uint16_t m_to
 Row of the last entity we iterate to.
 
GroupId m_groupId
 GroupId. 0 if not set.
 

Detailed Description

Iterator for iterating disabled entities.


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