![]() |
Gaia-ECS v1.0.0
A simple and powerful entity component system
|
Array of elements of type. More...
#include <sarray_ext_soa_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_soa< T::gaia_Data_Layout, T > |
| Data-layout access policy used by the container. | |
| using | difference_type = sarr_ext_soa_detail::difference_type |
| Type used for iterator differences. | |
| using | size_type = sarr_ext_soa_detail::size_type |
| Unsigned type used for sizes and indices. | |
| using | iterator = sarr_ext_soa_iterator< T > |
| Mutable random-access iterator type. | |
| using | const_iterator = const_sarr_ext_soa_iterator< T > |
| 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_ext_soa (core::zero_t) noexcept |
| Constructs a value-initialized container. | |
| constexpr | sarr_ext_soa (size_type count, const_reference value) noexcept |
| Constructs a container with copies of a value. | |
| constexpr | sarr_ext_soa (size_type count) noexcept |
| Constructs a container with the requested number of value-initialized elements. | |
| template<typename InputIt > | |
| constexpr | sarr_ext_soa (InputIt first, InputIt last) noexcept |
| Constructs a container from an iterator range. | |
| constexpr | sarr_ext_soa (std::initializer_list< T > il) |
| Constructs a container from an initializer list. | |
| constexpr | sarr_ext_soa (const sarr_ext_soa &other) |
| Copy-constructs a container. | |
| constexpr | sarr_ext_soa (sarr_ext_soa &&other) noexcept |
| Move-constructs a container. | |
| sarr_ext_soa & | operator= (std::initializer_list< T > il) |
| Replaces the elements from an initializer list. | |
| constexpr sarr_ext_soa & | operator= (const sarr_ext_soa &other) |
| Copy-assigns the container. | |
| constexpr sarr_ext_soa & | operator= (sarr_ext_soa &&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. | |
| constexpr void | push_back (const T &arg) noexcept |
| Appends an element. | |
| constexpr void | push_back (T &&arg) noexcept |
| Appends an element. | |
| template<typename... Args> | |
| constexpr decltype(auto) | emplace_back (Args &&... args) noexcept |
| Constructs and appends an element. | |
| constexpr void | pop_back () noexcept |
| Removes the last element. | |
| iterator | insert (iterator pos, const T &arg) noexcept |
| Insert the element to the position given by iterator pos. | |
| iterator | insert (iterator pos, T &&arg) noexcept |
| Insert the element to the position given by iterator pos. | |
| constexpr iterator | erase (iterator pos) noexcept |
| Removes the element at pos. | |
| iterator | erase (iterator first, iterator last) noexcept |
| Removes the elements in the range [first, last) | |
| iterator | erase_at (size_type pos) noexcept |
| constexpr void | clear () noexcept |
| Removes all elements. | |
| constexpr void | resize (size_type count) noexcept |
| Changes the number of elements. | |
| constexpr void | resize (size_type count, const_reference value) noexcept |
| Changes the size and initializes new elements from a value. | |
| template<typename Func > | |
| auto | retain (Func &&func) noexcept |
| Removes all elements that fail the predicate. | |
| 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_ext_soa &other) const noexcept |
| Compares two containers element by element. | |
| GAIA_NODISCARD constexpr bool | operator!= (const sarr_ext_soa &other) const noexcept |
| Checks whether two containers differ. | |
| template<size_t Item> | |
| auto | view_mut () noexcept |
| Returns a mutable view of one structure-of-arrays member. | |
| template<size_t Item> | |
| auto | view () const noexcept |
| Returns a read-only view of one structure-of-arrays member. | |
Static Public Attributes | |
| static constexpr size_type | extent = N |
| Fixed capacity of the container. | |
| static constexpr uint32_t | allocated_bytes = view_policy::get_min_byte_size(0, N) |
| Number of bytes reserved by the inline storage. | |
Array of elements of type.
| T | with fixed capacity |
| N | and variable size allocated on stack. Interface compatiblity with std::array where it matters. |
|
inlineconstexprnoexcept |
Constructs a container with copies of a value.
| count | Number of elements. |
| value | Value assigned to each new element. |
|
inlineconstexprnoexcept |
Constructs a container with the requested number of value-initialized elements.
| count | Number of elements. |
|
inlineconstexprnoexcept |
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. |
|
inlineconstexpr |
Copy-constructs a container.
| other | Container to copy or move from. |
|
inlineconstexprnoexcept |
Move-constructs a container.
| other | Container to copy or move from. |
|
inlineconstexprnoexcept |
Accesses the last element.
|
inlineconstexprnoexcept |
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 |
Constructs and appends an element.
| Args | Types of the forwarded constructor arguments. |
| args | Arguments forwarded to the element constructor. |
|
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.
Removes the elements in the range [first, last)
| first | Iterator to the element to remove |
| last | Iterator to the one beyond the last element to remove |
Removes the element at pos.
| pos | Iterator to the element to remove |
|
inlinenoexcept |
| pos |
|
inlineconstexprnoexcept |
Accesses the first element.
|
inlineconstexprnoexcept |
Accesses the first element.
Insert the element to the position given by iterator pos.
| pos | Position in the container |
| arg | Data to insert |
Insert the element to the position given by iterator pos.
| pos | Position in the container |
| arg | Data to insert |
|
inlineconstexprnoexcept |
Returns the maximum number of elements supported by this container.
|
inlineconstexprnoexcept |
Checks whether two containers differ.
| other | Container to copy or move from. |
|
inlineconstexpr |
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. |
|
inlineconstexprnoexcept |
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. |
Appends an element.
| arg | Element value to append. |
Appends an element.
| arg | Element value to append. |
|
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.
Changes the number of elements.
| count | Number of elements. |
|
inlineconstexprnoexcept |
Changes the size and initializes new elements from a value.
| count | Number of elements. |
| value | Value assigned to each new element. |
|
inlinenoexcept |
Removes all elements that fail the predicate.
| Func | Predicate callable type. |
| func | A lambda or a functor with the bool operator()(Container::value_type&) overload. |
|
inlineconstexprnoexcept |
Returns the number of elements.
|
inlinenoexcept |
Returns a read-only view of one structure-of-arrays member.
| Item | Zero-based member index in the structure-of-arrays element. |
|
inlinenoexcept |
Returns a mutable view of one structure-of-arrays member.
| Item | Zero-based member index in the structure-of-arrays element. |