Compile-time adapter that converts typed component metadata into a plain ComponentDesc.
More...
#include <component_desc.h>
|
|
using | CT = component_type_t< T > |
| | Reflected Gaia component type wrapper.
|
| |
|
using | U = typename component_type_t< T >::Type |
| | Stored C++ payload type.
|
| |
|
using | DescU = typename CT::TypeFull |
| | Fully-qualified component type used for stable symbol/hash generation.
|
| |
|
| static constexpr ComponentLookupHash | hash_lookup () |
| | Returns the stable lookup hash for the component type.
|
| |
| static constexpr auto | name () |
| | Returns the reflected component symbol name.
|
| |
| static constexpr uint32_t | size () |
| | Returns the payload size stored in chunks.
|
| |
| static constexpr uint32_t | alig () |
| | Returns the payload alignment required by the component storage policy.
|
| |
| static uint32_t | soa (std::span< uint8_t, meta::StructToTupleMaxTypes > soaSizes) |
| | Populates SoA element sizes for SoA payloads.
|
| |
| static constexpr DataStorageType | storage_type () |
| | Returns the compile-time storage mode requested for the component payload.
|
| |
| static constexpr auto | func_ctor () |
| | Builds the optional constructor callback for typed AoS payloads.
|
| |
| static constexpr auto | func_dtor () |
| | Builds the optional destructor callback for typed AoS payloads.
|
| |
| static constexpr auto | func_copy_ctor () |
| | Builds the copy-constructor callback used when typed payload storage grows or migrates.
|
| |
| static constexpr auto | func_move_ctor () |
| | Builds the move-constructor callback used when typed payload storage grows or migrates.
|
| |
| static constexpr auto | func_copy () |
| | Builds the copy-assignment callback used for typed payload writes.
|
| |
| static constexpr auto | func_move () |
| | Builds the move-assignment callback used for typed payload writes.
|
| |
| static constexpr auto | func_swap () |
| | Builds the swap callback used by storage operations.
|
| |
| static constexpr auto | func_cmp () |
| | Builds the equality comparison callback for typed payload values.
|
| |
| static constexpr auto | func_save () |
| | Builds the serializer save callback for typed payload values.
|
| |
| static constexpr auto | func_load () |
| | Builds the serializer load callback for typed payload values.
|
| |
| static ecs::ComponentDesc | make (util::str_view descName, std::span< uint8_t, meta::StructToTupleMaxTypes > soaSizes) |
| | Builds the plain descriptor used by component cache registration.
|
| |
template<typename T>
struct gaia::ecs::detail::ComponentDesc< T >
Compile-time adapter that converts typed component metadata into a plain ComponentDesc.
- Template Parameters
-
| T | Component type or component wrapper being registered. |
◆ alig()
Returns the payload alignment required by the component storage policy.
- Returns
- Component payload alignment in bytes.
◆ func_cmp()
Builds the equality comparison callback for typed payload values.
- Returns
- Equality callback using operator== when available, otherwise byte comparison.
◆ func_copy()
Builds the copy-assignment callback used for typed payload writes.
- Returns
- Copy-assignment callback for the component payload type.
◆ func_copy_ctor()
Builds the copy-constructor callback used when typed payload storage grows or migrates.
- Returns
- Copy-constructor callback for the component payload type.
◆ func_ctor()
Builds the optional constructor callback for typed AoS payloads.
- Returns
- Constructor callback, or nullptr when construction is trivial or SoA-managed.
◆ func_dtor()
Builds the optional destructor callback for typed AoS payloads.
- Returns
- Destructor callback, or nullptr when destruction is trivial or SoA-managed.
◆ func_load()
Builds the serializer load callback for typed payload values.
- Returns
- Load callback for the component payload type.
◆ func_move()
Builds the move-assignment callback used for typed payload writes.
- Returns
- Move-assignment callback for the component payload type.
◆ func_move_ctor()
Builds the move-constructor callback used when typed payload storage grows or migrates.
- Returns
- Move-constructor callback for the component payload type.
◆ func_save()
Builds the serializer save callback for typed payload values.
- Returns
- Save callback for the component payload type.
◆ func_swap()
Builds the swap callback used by storage operations.
- Returns
- Swap callback for the component payload type.
◆ hash_lookup()
Returns the stable lookup hash for the component type.
- Returns
- Component lookup hash derived from reflected type metadata.
◆ make()
Builds the plain descriptor used by component cache registration.
- Parameters
-
| descName | Normalized component symbol name. |
| soaSizes | Scratch/output storage for SoA element sizes. The returned descriptor keeps a non-owning pointer to this buffer and must be consumed before the buffer expires. |
- Returns
- Component descriptor for the current component type.
◆ name()
Returns the reflected component symbol name.
- Returns
- Reflected type name for descriptor registration.
◆ size()
Returns the payload size stored in chunks.
- Returns
- 0 for empty marker components, otherwise sizeof(payload type).
◆ soa()
Populates SoA element sizes for SoA payloads.
- Parameters
-
| soaSizes | Scratch/output storage for per-element byte sizes. |
- Returns
- Number of SoA elements, or 0 for AoS payloads.
◆ storage_type()
Returns the compile-time storage mode requested for the component payload.
- Returns
- Component storage mode.
The documentation for this struct was generated from the following file: