struct ecs::TViewIterator

template<u32 IncludedTypeCount, u32 ExcludedTypeCount, bool InPlaceDelete>

Iterator that iterates over all entities that match the view included

& excluded type filter.

Template parameters

IncludedTypeCount

Number of types in the included type filter.

ExcludedTypeCount

Number of types in the excluded type filter.

InPlaceDelete

True if the storages support in-place delete policy.

Public

Constructors

TViewIterator<IncludedTypeCount, ExcludedTypeCount, InPlaceDelete>

TViewIterator<IncludedTypeCount, ExcludedTypeCount, InPlaceDelete>() = default

TViewIterator<IncludedTypeCount, ExcludedTypeCount, InPlaceDelete>

TViewIterator<IncludedTypeCount, ExcludedTypeCount, InPlaceDelete>(UnderlyingIterator underlyingIterator, std::array<const SparseSet *, IncludedTypeCount> includedTypeStorage, std::array<const SparseSet *, ExcludedTypeCount> excludedTypeStorage, u32 leadingTypeIndex)

Methods

GetIncludedTypeStorage

std::array<const SparseSet *, IncludedTypeCount> &GetIncludedTypeStorage()

GetIncludedTypeStorage

const std::array<const SparseSet *, IncludedTypeCount> &GetIncludedTypeStorage() const

Operators

operator++

TViewIterator<IncludedTypeCount, ExcludedTypeCount, InPlaceDelete> &operator++()

operator->

pointer operator->() const

operator*

reference operator*() const

Private

Methods

SeekToNextValidEntry

void SeekToNextValidEntry()

Increments the leading type storage to the next entry and check 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.

Fields

mUnderlyingIterator

UnderlyingIterator mUnderlyingIterator

mIncludedTypeStorage

std::array<const SparseSet *, IncludedTypeCount> mIncludedTypeStorage

mExcludedTypeStorage

std::array<const SparseSet *, ExcludedTypeCount> mExcludedTypeStorage

mLeadingTypeIndex

u32 mLeadingTypeIndex