Gaia-ECS v1.0.0
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::cnt::const_page_iterator_soa< T, Allocator, IsFwd > Struct Template Reference

Read-only iterator over structure-of-arrays elements in paged storage. More...

#include <paged_storage.h>

Public Types

using value_type = T
 Element view type returned by value.
 
using difference_type = detail::difference_type
 Type used for iterator distances.
 
using size_type = detail::size_type
 Type used for sizes and indices.
 
using iterator = const_page_iterator_soa
 Iterator type.
 
using iterator_category = core::bidirectional_iterator_tag
 Iterator category tag.
 

Public Member Functions

 const_page_iterator_soa (const page_type *pPage)
 Constructs an end iterator at a page boundary.
 
 const_page_iterator_soa (const page_type *pPage, const page_type *pPageLast)
 Constructs a read-only iterator over a page range.
 
value_type operator* () const
 Accesses the current element view.
 
value_type operator-> () const
 Accesses the current element view through arrow syntax.
 
iteratoroperator++ ()
 Advances to the next element.
 
iterator operator++ (int)
 Advances to the next element.
 
GAIA_NODISCARD bool operator== (const iterator &other) const
 Checks whether two iterators have the same position.
 
GAIA_NODISCARD bool operator!= (const iterator &other) const
 Checks whether two iterators have different positions.
 

Detailed Description

template<typename T, typename Allocator, bool IsFwd>
struct gaia::cnt::const_page_iterator_soa< T, Allocator, IsFwd >

Read-only iterator over structure-of-arrays elements in paged storage.

Template Parameters
TElement type.
AllocatorPage allocator type.
IsFwdWhether iteration proceeds forward.

Constructor & Destructor Documentation

◆ const_page_iterator_soa() [1/2]

template<typename T , typename Allocator , bool IsFwd>
gaia::cnt::const_page_iterator_soa< T, Allocator, IsFwd >::const_page_iterator_soa ( const page_type *  pPage)
inline

Constructs an end iterator at a page boundary.

Parameters
pPageBoundary page.

◆ const_page_iterator_soa() [2/2]

template<typename T , typename Allocator , bool IsFwd>
gaia::cnt::const_page_iterator_soa< T, Allocator, IsFwd >::const_page_iterator_soa ( const page_type *  pPage,
const page_type *  pPageLast 
)
inline

Constructs a read-only iterator over a page range.

Parameters
pPageFirst page to inspect.
pPageLastPage marking the range boundary.

Member Function Documentation

◆ operator!=()

template<typename T , typename Allocator , bool IsFwd>
GAIA_NODISCARD bool gaia::cnt::const_page_iterator_soa< T, Allocator, IsFwd >::operator!= ( const iterator other) const
inline

Checks whether two iterators have different positions.

Parameters
otherIterator to compare with.
Returns
True if the iterators have different positions.

◆ operator*()

template<typename T , typename Allocator , bool IsFwd>
value_type gaia::cnt::const_page_iterator_soa< T, Allocator, IsFwd >::operator* ( ) const
inline

Accesses the current element view.

Returns
Read-only view of the current element.

◆ operator++() [1/2]

template<typename T , typename Allocator , bool IsFwd>
iterator & gaia::cnt::const_page_iterator_soa< T, Allocator, IsFwd >::operator++ ( )
inline

Advances to the next element.

Returns
Reference to this advanced iterator.

◆ operator++() [2/2]

template<typename T , typename Allocator , bool IsFwd>
iterator gaia::cnt::const_page_iterator_soa< T, Allocator, IsFwd >::operator++ ( int  )
inline

Advances to the next element.

Returns
Iterator value before advancement.

◆ operator->()

template<typename T , typename Allocator , bool IsFwd>
value_type gaia::cnt::const_page_iterator_soa< T, Allocator, IsFwd >::operator-> ( ) const
inline

Accesses the current element view through arrow syntax.

Returns
Read-only view of the current element.

◆ operator==()

template<typename T , typename Allocator , bool IsFwd>
GAIA_NODISCARD bool gaia::cnt::const_page_iterator_soa< T, Allocator, IsFwd >::operator== ( const iterator other) const
inline

Checks whether two iterators have the same position.

Parameters
otherIterator to compare with.
Returns
True if both iterators have the same position.

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