![]() |
Gaia-ECS v1.0.0
A simple and powerful entity component system
|
Fixed-size stack array with AoS storage. Interface compatiblity with std::array where it matters. More...
#include <sarray_impl.h>
Public Types | |
| using | value_type = T |
| Element type stored by the container. | |
| using | reference = T & |
| Mutable element reference type. | |
| using | const_reference = const T & |
| Read-only element reference type. | |
| using | pointer = T * |
| Mutable element pointer type. | |
| using | const_pointer = const T * |
| Read-only element pointer type. | |
| using | view_policy = mem::data_view_policy_aos< T > |
| Data-layout access policy used by the container. | |
| using | difference_type = sarr_detail::difference_type |
| Type used for iterator differences. | |
| using | size_type = sarr_detail::size_type |
| Unsigned type used for sizes and indices. | |
| using | iterator = pointer |
| Mutable random-access iterator type. | |
| using | const_iterator = const_pointer |
| Read-only random-access iterator type. | |
| using | iterator_category = core::random_access_iterator_tag |
| Iterator category exposed by the container. | |
Public Member Functions | |
| constexpr | sarr (core::zero_t) noexcept |
| Explicit value-initialization constructor for call sites that want zero/value initialization to be obvious. | |
| template<typename InputIt > | |
| constexpr | sarr (InputIt first, InputIt last) noexcept |
| Constructs a container from an iterator range. | |
| constexpr | sarr (std::initializer_list< T > il) |
| Constructs a container from an initializer list. | |
| constexpr | sarr (const sarr &)=default |
| constexpr | sarr (sarr &&) noexcept=default |
| sarr & | operator= (std::initializer_list< T > il) |
| Replaces the elements from an initializer list. | |
| constexpr sarr & | operator= (const sarr &other) |
| Copy-assigns the container. | |
| constexpr sarr & | operator= (sarr &&other) noexcept |
| Move-assigns the container. | |
| GAIA_NODISCARD constexpr pointer | data () noexcept |
| Returns a pointer to the element storage. | |
| GAIA_NODISCARD constexpr const_pointer | data () const noexcept |
| Returns a pointer to the element storage. | |
| GAIA_NODISCARD constexpr decltype(auto) | operator[] (size_type pos) noexcept |
| Accesses an element without bounds checking in optimized builds. | |
| GAIA_NODISCARD constexpr decltype(auto) | operator[] (size_type pos) const noexcept |
| Accesses an element without bounds checking in optimized builds. | |
| GAIA_NODISCARD constexpr size_type | size () const noexcept |
| Returns the number of elements. | |
| GAIA_NODISCARD constexpr bool | empty () const noexcept |
| Checks whether the container has no elements. | |
| GAIA_NODISCARD constexpr size_type | capacity () const noexcept |
| Returns the number of elements that fit without reallocation. | |
| GAIA_NODISCARD constexpr size_type | max_size () const noexcept |
| Returns the maximum number of elements supported by this container. | |
| GAIA_NODISCARD constexpr decltype(auto) | front () noexcept |
| Accesses the first element. | |
| GAIA_NODISCARD constexpr decltype(auto) | front () const noexcept |
| Accesses the first element. | |
| GAIA_NODISCARD constexpr decltype(auto) | back () noexcept |
| Accesses the last element. | |
| GAIA_NODISCARD constexpr decltype(auto) | back () const noexcept |
| Accesses the last element. | |
| GAIA_NODISCARD constexpr auto | begin () noexcept |
| Returns an iterator to the first element. | |
| GAIA_NODISCARD constexpr auto | begin () const noexcept |
| Returns an iterator to the first element. | |
| GAIA_NODISCARD constexpr auto | cbegin () const noexcept |
| Returns a read-only iterator to the first element. | |
| GAIA_NODISCARD constexpr auto | rbegin () noexcept |
| Returns a reverse traversal iterator to the last element. | |
| GAIA_NODISCARD constexpr auto | rbegin () const noexcept |
| Returns a reverse traversal iterator to the last element. | |
| GAIA_NODISCARD constexpr auto | crbegin () const noexcept |
| Returns a read-only reverse traversal iterator to the last element. | |
| GAIA_NODISCARD constexpr auto | end () noexcept |
| Returns an iterator one past the last element. | |
| GAIA_NODISCARD constexpr auto | end () const noexcept |
| Returns an iterator one past the last element. | |
| GAIA_NODISCARD constexpr auto | cend () const noexcept |
| Returns a read-only iterator one past the last element. | |
| GAIA_NODISCARD constexpr auto | rend () noexcept |
| Returns the reverse traversal sentinel preceding the first element. | |
| GAIA_NODISCARD constexpr auto | rend () const noexcept |
| Returns the reverse traversal sentinel preceding the first element. | |
| GAIA_NODISCARD constexpr auto | crend () const noexcept |
| Returns the read-only reverse traversal sentinel preceding the first element. | |
| GAIA_NODISCARD constexpr bool | operator== (const sarr &other) const |
| Compares two containers element by element. | |
| GAIA_NODISCARD constexpr bool | operator!= (const sarr &other) const |
| Checks whether two containers differ. | |
Public Attributes | |
| T | m_data [N] |
| Inline storage backing the container elements. | |
Static Public Attributes | |
| static constexpr size_t | value_size = sizeof(T) |
| Size of one element in bytes. | |
| static constexpr size_type | extent = N |
| Fixed capacity of the container. | |
Fixed-size stack array with AoS storage. Interface compatiblity with std::array where it matters.
| T | Element type stored directly in the array. |
| N | Number of elements and fixed capacity. |
|
inlineconstexprnoexcept |
Explicit value-initialization constructor for call sites that want zero/value initialization to be obvious.
Constructs a container from an iterator range.
| InputIt | Input iterator type. |
| first | Iterator to the first source element. |
| last | Iterator one past the last source element. |
|
inlineconstexpr |
Constructs a container from an initializer list.
| il | Initializer list supplying the elements. |
|
inlineconstexprnoexcept |
Accesses the last element.
Accesses the last element.
|
inlineconstexprnoexcept |
Returns an iterator to the first element.
|
inlineconstexprnoexcept |
Returns an iterator to the first element.
|
inlineconstexprnoexcept |
Returns the number of elements that fit without reallocation.
|
inlineconstexprnoexcept |
Returns a read-only iterator to the first element.
|
inlineconstexprnoexcept |
Returns a read-only iterator one past the last element.
|
inlineconstexprnoexcept |
Returns a read-only reverse traversal iterator to the last element.
|
inlineconstexprnoexcept |
Returns the read-only reverse traversal sentinel preceding the first element.
|
inlineconstexprnoexcept |
Returns a pointer to the element storage.
|
inlineconstexprnoexcept |
Returns a pointer to the element storage.
|
inlineconstexprnoexcept |
Checks whether the container has no elements.
|
inlineconstexprnoexcept |
Returns an iterator one past the last element.
|
inlineconstexprnoexcept |
Returns an iterator one past the last element.
|
inlineconstexprnoexcept |
Accesses the first element.
Accesses the first element.
|
inlineconstexprnoexcept |
Returns the maximum number of elements supported by this container.
|
inlineconstexpr |
Checks whether two containers differ.
| other | Container to copy or move from. |
Copy-assigns the container.
| other | Container to copy or move from. |
|
inlineconstexprnoexcept |
Move-assigns the container.
| other | Container to copy or move from. |
|
inline |
Replaces the elements from an initializer list.
| il | Initializer list supplying the elements. |
|
inlineconstexpr |
Compares two containers element by element.
| other | Container to copy or move from. |
|
inlineconstexprnoexcept |
Accesses an element without bounds checking in optimized builds.
| pos | Zero-based element index. |
|
inlineconstexprnoexcept |
Accesses an element without bounds checking in optimized builds.
| pos | Zero-based element index. |
|
inlineconstexprnoexcept |
Returns a reverse traversal iterator to the last element.
|
inlineconstexprnoexcept |
Returns a reverse traversal iterator to the last element.
|
inlineconstexprnoexcept |
Returns the reverse traversal sentinel preceding the first element.
|
inlineconstexprnoexcept |
Returns the reverse traversal sentinel preceding the first element.
|
inlineconstexprnoexcept |
Returns the number of elements.