struct ecs::RuntimeViewIterator

Iterator that iterates over all entities that match the runtime view included

& excluded type filter.

Public

Constructors

RuntimeViewIterator

RuntimeViewIterator() noexcept = default

RuntimeViewIterator

RuntimeViewIterator(UnderlyingIterator underlyingIterator, const TArray<SparseSet *> &includedTypeStorage, const TArray<SparseSet *> &excludedTypeStorage)

Operators

operator++

RuntimeViewIterator &operator++()

operator++

RuntimeViewIterator operator++(int)

operator--

RuntimeViewIterator &operator--()

operator--

RuntimeViewIterator operator--(int)

operator->

pointer operator->() const

operator*

reference operator*() const

Private

Methods

DoesEntityMatchFilter

bool DoesEntityMatchFilter(Entity entity, const TArray<SparseSet *> &includedTypeStorage, const TArray<SparseSet *> &excludedTypeStorage) const

Checks if entity matches the included & excluded type filters.

entity
Entity to check.
includedTypeStorage
Storages that must contain the entity to pass the filter.
excludedTypeStorage
Storages that must not contain the entity to pass the filter.

SeekToNextValidEntry

void SeekToNextValidEntry()

Increments the leading type storage to the next entry and checks if it matches the type filter.

If it doesn't match the type filter the next entry is searched, and so on until the first matching entry or the end of leading type storage.

SeekToPreviousValidEntry

void SeekToPreviousValidEntry()

Decrements the leading type storage to the previous entry and checks if it matches the type filter.

If it doesn't match the type filter the next entry is searched, and so on until the first matching entry or the beginning of leading type storage.

Fields

mUnderlyingIterator

UnderlyingIterator mUnderlyingIterator

mIncludedTypeStorage

const TArray<SparseSet *> * mIncludedTypeStorage

mExcludedTypeStorage

const TArray<SparseSet *> * mExcludedTypeStorage

mStorageMayContainInvalidEntries

bool mStorageMayContainInvalidEntries