Skip to main content

ConstIterator Struct

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

Declaration

struct helios::engine::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
ConstIterator &operator++ (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 429 of file SparseSet.ixx.

Public Member Typedefs

DataIt

using helios::engine::ecs::SparseSet< T >::ConstIterator::DataIt = typename std::vector<T>::const_iterator

Definition at line 430 of file SparseSet.ixx.

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

difference_type

using helios::engine::ecs::SparseSet< T >::ConstIterator::difference_type = std::ptrdiff_t

Definition at line 438 of file SparseSet.ixx.

438 using difference_type = std::ptrdiff_t;

IdIt

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

Definition at line 431 of file SparseSet.ixx.

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

iterator_category

using helios::engine::ecs::SparseSet< T >::ConstIterator::iterator_category = std::forward_iterator_tag

Definition at line 436 of file SparseSet.ixx.

436 using iterator_category = std::forward_iterator_tag;

pointer

using helios::engine::ecs::SparseSet< T >::ConstIterator::pointer = const T*

Definition at line 439 of file SparseSet.ixx.

439 using pointer = const T*;

reference

using helios::engine::ecs::SparseSet< T >::ConstIterator::reference = const T&

Definition at line 440 of file SparseSet.ixx.

440 using reference = const T&;

value_type

using helios::engine::ecs::SparseSet< T >::ConstIterator::value_type = T

Definition at line 437 of file SparseSet.ixx.

437 using value_type = T;

Public Constructors

ConstIterator()

ConstIterator()

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

Public Operators

operator->()

pointer helios::engine::ecs::SparseSet< T >::ConstIterator::operator-> ()
inline

Definition at line 447 of file SparseSet.ixx.

447 pointer operator->() const { return &*dataIt_; }

Reference helios::engine::ecs::SparseSet< T >::ConstIterator::dataIt_.

operator!=()

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

operator*()

reference helios::engine::ecs::SparseSet< T >::ConstIterator::operator* ()
inline

operator++()

ConstIterator & helios::engine::ecs::SparseSet< T >::ConstIterator::operator++ (int)
inline

Definition at line 459 of file SparseSet.ixx.

460 ConstIterator tmp = *this;
461 ++(*this);
462 return tmp;
463 }

Reference helios::engine::ecs::SparseSet< T >::ConstIterator::ConstIterator.

operator++()

ConstIterator & helios::engine::ecs::SparseSet< T >::ConstIterator::operator++ ()
inline

operator==()

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

Public Member Functions

entityId()

EntityId helios::engine::ecs::SparseSet< T >::ConstIterator::entityId ()
inline nodiscard

Returns the EntityId for the current element.

Returns

The EntityId associated with the current element.

Definition at line 454 of file SparseSet.ixx.

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

Reference helios::engine::ecs::SparseSet< T >::ConstIterator::idIt_.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.