Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::cnt::sarr_soa< T, N > Class Template Reference

Fixed-size stack array with SoA storage. Interface compatiblity with std::array where it matters. More...

#include <sarray_soa_impl.h>

Public Types

using value_type = T
 
using reference = T &
 
using const_reference = const T &
 
using pointer = T *
 
using const_pointer = T *
 
using view_policy = mem::data_view_policy_soa< T::gaia_Data_Layout, T >
 
using difference_type = sarr_soa_detail::difference_type
 
using size_type = sarr_soa_detail::size_type
 
using iterator = sarr_soa_iterator< T >
 
using const_iterator = const_sarr_soa_iterator< T >
 
using iterator_category = core::random_access_iterator_tag
 

Public Member Functions

 sarr_soa (core::zero_t) noexcept
 Zero-initialization constructor. Because sarr_soa is not aggretate type, doing: sarr_soa<int,10> tmp{} does not zero-initialize its internals. We need to be explicit about our intent and use a special constructor.
 
template<typename InputIt >
 sarr_soa (InputIt first, InputIt last) noexcept
 
 sarr_soa (std::initializer_list< T > il)
 
 sarr_soa (const sarr_soa &other)
 
 sarr_soa (sarr_soa &&other) noexcept
 
sarr_soaoperator= (std::initializer_list< T > il)
 
sarr_soaoperator= (const sarr_soa &other)
 
sarr_soaoperator= (sarr_soa &&other) noexcept
 
GAIA_NODISCARD pointer data () noexcept
 
GAIA_NODISCARD const_pointer data () const noexcept
 
GAIA_NODISCARD decltype(autooperator[] (size_type pos) noexcept
 
GAIA_NODISCARD decltype(autooperator[] (size_type pos) const noexcept
 
GAIA_NODISCARD constexpr size_type size () const noexcept
 
GAIA_NODISCARD constexpr bool empty () const noexcept
 
GAIA_NODISCARD constexpr size_type capacity () const noexcept
 
GAIA_NODISCARD constexpr size_type max_size () const noexcept
 
GAIA_NODISCARD decltype(autofront () noexcept
 
GAIA_NODISCARD decltype(autofront () const noexcept
 
GAIA_NODISCARD decltype(autoback () noexcept
 
GAIA_NODISCARD decltype(autoback () const noexcept
 
GAIA_NODISCARD auto begin () noexcept
 
GAIA_NODISCARD auto begin () const noexcept
 
GAIA_NODISCARD auto cbegin () const noexcept
 
GAIA_NODISCARD auto rbegin () noexcept
 
GAIA_NODISCARD auto rbegin () const noexcept
 
GAIA_NODISCARD auto crbegin () const noexcept
 
GAIA_NODISCARD auto end () noexcept
 
GAIA_NODISCARD auto end () const noexcept
 
GAIA_NODISCARD auto cend () const noexcept
 
GAIA_NODISCARD auto rend () noexcept
 
GAIA_NODISCARD auto rend () const noexcept
 
GAIA_NODISCARD auto crend () const noexcept
 
GAIA_NODISCARD bool operator== (const sarr_soa &other) const
 
GAIA_NODISCARD bool operator!= (const sarr_soa &other) const
 
template<size_t Item>
auto view_mut () noexcept
 
template<size_t Item>
auto view () const noexcept
 

Public Attributes

mem::raw_data_holder< T, allocated_bytes > m_data
 

Static Public Attributes

static constexpr size_type extent = N
 
static constexpr uint32_t allocated_bytes = view_policy::get_min_byte_size(0, N)
 

Detailed Description

template<typename T, sarr_soa_detail::size_type N>
class gaia::cnt::sarr_soa< T, N >

Fixed-size stack array with SoA storage. Interface compatiblity with std::array where it matters.

Template Parameters
TElement type stored directly in the array.
NNumber of elements and fixed capacity.

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