![]() |
Gaia-ECS v1.0.0
A simple and powerful entity component system
|
Mutable byte view over SoA values. More...
#include <data_layout_policy.h>
Classes | |
| struct | accessor |
| Proxy used to assign one complete value. More... | |
| struct | data_view_policy_idx_info |
| Metadata for a selected field. More... | |
Public Types | |
| using | view_policy = data_view_policy_soa< TDataLayout, ValueType > |
| Underlying storage policy. | |
Public Member Functions | |
| data_view_policy_soa_set (std::span< uint8_t > data) | |
| Creates a mutable view over bytes. | |
| data_view_policy_soa_set (std::span< const uint8_t > data) | |
| Creates a mutable view from a byte span. | |
| template<typename C > | |
| data_view_policy_soa_set (const C &c) | |
| Creates a mutable view over a contiguous container. | |
| GAIA_NODISCARD constexpr decltype(auto) | operator[] (size_t idx) const noexcept |
| Reconstructs a read-only value by index. | |
| GAIA_NODISCARD constexpr auto | operator[] (size_t idx) noexcept |
| Returns a mutable proxy by index. | |
| template<size_t Item> | |
| GAIA_NODISCARD constexpr auto | get () const noexcept |
| Returns a read-only span over one field. | |
| template<size_t Item> | |
| GAIA_NODISCARD constexpr auto | set () noexcept |
| Returns a mutable span over one field. | |
| GAIA_NODISCARD auto | data () const noexcept |
| Returns the backing byte address. | |
| GAIA_NODISCARD auto | size () const noexcept |
| Returns the backing span size. | |
Public Attributes | |
| std::span< uint8_t > | m_data |
| Raw data pointed to by the view policy. | |
Mutable byte view over SoA values.
| TDataLayout | SoA packing layout. |
| ValueType | Stored value type. |
|
inline |
Creates a mutable view over bytes.
| data | Backing byte span. |
|
inline |
Creates a mutable view from a byte span.
| data | Backing byte span whose constness is intentionally erased. |
|
inline |
Creates a mutable view over a contiguous container.
| C | Contiguous container type. |
| c | Backing container. |
|
inlinenoexcept |
Returns the backing byte address.
|
inlineconstexprnoexcept |
Returns a read-only span over one field.
| Item | Field index. |
|
inlineconstexprnoexcept |
Reconstructs a read-only value by index.
| idx | Value index. |
|
inlineconstexprnoexcept |
Returns a mutable proxy by index.
| idx | Value index. |
|
inlineconstexprnoexcept |
Returns a mutable span over one field.
| Item | Field index. |
|
inlinenoexcept |
Returns the backing span size.