Skip to main content

ConstIterator Struct

Const forward iterator for traversing the sparse set. More...

Declaration

struct helios::core::ecs::SparseSet::ConstIterator { ... }

Public Member Typedefs Index

usingDataIt = typename std::vector< T >::const_iterator
usingIdIt = typename std::vector< EntityId >::const_iterator
usingiterator_category = std::forward_iterator_tag
usingvalue_type = T
usingdifference_type = std::ptrdiff_t
usingpointer = const T *
usingreference = const T &

Public Constructors Index

ConstIterator ()=default
ConstIterator (DataIt dataIt, IdIt idIt)

Public Operators Index

referenceoperator* () const
pointeroperator-> () const
booloperator== (const ConstIterator &other) const
booloperator!= (const ConstIterator &other) const
ConstIteratoroperator++ (int)
ConstIterator &operator++ ()

Public Member Functions Index

EntityIdentityId () const

Returns the EntityId for the current element. More...

Public Member Attributes Index

DataItdataIt_
IdItidIt_

Description

Const forward iterator for traversing the sparse set.

Provides read-only access to elements and their EntityIds.

Definition at line 397 of file SparseSet.ixx.

Public Member Typedefs

DataIt

using helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::DataIt = typename std::vector<T>::const_iterator

Definition at line 398 of file SparseSet.ixx.

398 using DataIt = typename std::vector<T>::const_iterator;

difference_type

using helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::difference_type = std::ptrdiff_t

Definition at line 406 of file SparseSet.ixx.

406 using difference_type = std::ptrdiff_t;

IdIt

using helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::IdIt = typename std::vector<EntityId>::const_iterator

Definition at line 399 of file SparseSet.ixx.

399 using IdIt = typename std::vector<EntityId>::const_iterator;

iterator_category

using helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::iterator_category = std::forward_iterator_tag

Definition at line 404 of file SparseSet.ixx.

404 using iterator_category = std::forward_iterator_tag;

pointer

using helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::pointer = const T*

Definition at line 407 of file SparseSet.ixx.

407 using pointer = const T*;

reference

using helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::reference = const T&

Definition at line 408 of file SparseSet.ixx.

408 using reference = const T&;

value_type

using helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::value_type = T

Definition at line 405 of file SparseSet.ixx.

405 using value_type = T;

Public Constructors

ConstIterator()

ConstIterator()

helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::ConstIterator (DataIt dataIt, IdIt idIt)
inline

Public Operators

operator->()

pointer helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::operator-> ()
inline

operator!=()

bool helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::operator!= (const ConstIterator & other)
inline nodiscard

operator*()

reference helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::operator* ()
inline

operator++()

ConstIterator helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::operator++ (int)
inline

Definition at line 427 of file SparseSet.ixx.

428 ConstIterator tmp = *this;
429 ++(*this);
430 return tmp;
431 }

Reference helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::ConstIterator.

operator++()

ConstIterator & helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::operator++ ()
inline

operator==()

bool helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::operator== (const ConstIterator & other)
inline nodiscard

Public Member Functions

entityId()

EntityId helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::entityId ()
inline nodiscard

Returns the EntityId for the current element.

Returns

The EntityId associated with the current element.

Definition at line 422 of file SparseSet.ixx.

422 [[nodiscard]] EntityId entityId() const { return *idIt_; }

Reference helios::core::ecs::SparseSet< T, TAllowRemoval >::ConstIterator::idIt_.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.