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

Array of elements of type. More...

#include <sarray_impl.h>

Public Types

using value_type = T
 
using reference = T &
 
using const_reference = const T &
 
using pointer = T *
 
using const_pointer = const T *
 
using view_policy = mem::data_view_policy_aos< T >
 
using difference_type = sarr_detail::difference_type
 
using size_type = sarr_detail::size_type
 
using iterator = pointer
 
using const_iterator = const_pointer
 
using iterator_category = core::random_access_iterator_tag
 

Public Member Functions

constexpr sarr (core::zero_t) noexcept
 Zero-initialization constructor. Because sarr is not aggretate type, doing: sarr<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 >
constexpr sarr (InputIt first, InputIt last) noexcept
 
constexpr sarr (std::initializer_list< T > il)
 
constexpr sarr (const sarr &other)
 
constexpr sarr (sarr &&other) noexcept
 
sarroperator= (std::initializer_list< T > il)
 
constexpr sarroperator= (const sarr &other)
 
constexpr sarroperator= (sarr &&other) noexcept
 
GAIA_NODISCARD constexpr pointer data () noexcept
 
GAIA_NODISCARD constexpr const_pointer data () const noexcept
 
GAIA_NODISCARD constexpr decltype(auto) operator[] (size_type pos) noexcept
 
GAIA_NODISCARD constexpr decltype(auto) operator[] (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 constexpr decltype(auto) front () noexcept
 
GAIA_NODISCARD constexpr decltype(auto) front () const noexcept
 
GAIA_NODISCARD constexpr decltype(auto) back () noexcept
 
GAIA_NODISCARD constexpr decltype(auto) back () const noexcept
 
GAIA_NODISCARD constexpr auto begin () noexcept
 
GAIA_NODISCARD constexpr auto begin () const noexcept
 
GAIA_NODISCARD constexpr auto cbegin () const noexcept
 
GAIA_NODISCARD constexpr auto rbegin () noexcept
 
GAIA_NODISCARD constexpr auto rbegin () const noexcept
 
GAIA_NODISCARD constexpr auto crbegin () const noexcept
 
GAIA_NODISCARD constexpr auto end () noexcept
 
GAIA_NODISCARD constexpr auto end () const noexcept
 
GAIA_NODISCARD constexpr auto cend () const noexcept
 
GAIA_NODISCARD constexpr auto rend () noexcept
 
GAIA_NODISCARD constexpr auto rend () const noexcept
 
GAIA_NODISCARD constexpr auto crend () const noexcept
 
GAIA_NODISCARD constexpr bool operator== (const sarr &other) const
 
GAIA_NODISCARD constexpr bool operator!= (const sarr &other) const
 

Public Attributes

mem::raw_data_holder< T, allocated_bytes > m_data
 

Static Public Attributes

static constexpr size_t value_size = sizeof(T)
 
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_detail::size_type N>
class gaia::cnt::sarr< T, N >

Array of elements of type.

Template Parameters
Twith fixed size and capacity
Nallocated on stack. Interface compatiblity with std::array where it matters.

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