|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Shared field description and byte layout for a CompositeArray. More...
#include <Composite.hpp>
Collaboration diagram for MayaFlux::Kakshya::CompositeLayout:Public Member Functions | |
| bool | add_dynamic_field (std::string name) |
| Declare a field with a per-element NULL, INTEGER, REAL, TEXT, or BLOB kind. | |
| template<typename T > requires (ArithmeticData<T> || std::same_as<std::remove_cvref_t<T>, std::string> || std::same_as<std::remove_cvref_t<T>, std::vector<uint8_t>>) | |
| bool | add_field (std::string name) |
| Declare a named arithmetic, text, or binary field. | |
| const std::vector< CompositeField > & | fields () const noexcept |
| Declared fields in element order, with finalized byte offsets. | |
| std::optional< size_t > | find_field (std::string_view name) const noexcept |
| Find a field index by name, or std::nullopt if absent. | |
| size_t | presence_bytes () const noexcept |
| Bytes reserved for the per-element presence bitmap. | |
| size_t | stride_bytes () const noexcept |
| Bytes per packed element after finalization. | |
Private Member Functions | |
| bool | add_field_impl (std::string name, std::type_index type, size_t size_bytes) |
| void | finalize () |
Private Attributes | |
| std::vector< CompositeField > | m_fields |
| bool | m_finalized {} |
| size_t | m_presence_bytes {} |
| size_t | m_stride_bytes {} |
Friends | |
| class | CompositeArray |
Shared field description and byte layout for a CompositeArray.
Declare fields before constructing an array. Construction finalizes the layout, placing a presence bitmap before the fields in each element. Field order determines byte offsets. A field may be an arithmetic type, std::string, binary bytes, or a dynamic value.
Usage:
Definition at line 52 of file Composite.hpp.