|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Mutable insertion adapter for a CompositeArray. More...
#include <CompositeInsertion.hpp>
Collaboration diagram for MayaFlux::Kakshya::CompositeInsertion:Public Member Functions | |
| size_t | append () |
| Append an empty element. | |
| std::optional< size_t > | append (const Composite &source) |
| Copy one Composite with a matching layout into this array. | |
| bool | clear (size_t index, std::string_view field_name) |
| Mark a named field absent in an existing element. | |
| CompositeInsertion (CompositeArray &array) noexcept | |
| Borrow the array into which elements and fields will be written. | |
| template<typename T > requires ArithmeticData<T> | |
| bool | set (size_t index, std::string_view field_name, T value) |
| Write an arithmetic field of an existing element. | |
| bool | set_blob (size_t index, std::string_view field_name, std::span< const uint8_t > value) |
| Write binary bytes to a fixed or dynamic BLOB field. | |
| bool | set_null (size_t index, std::string_view field_name) |
| Write a present NULL to a dynamic field. | |
| bool | set_text (size_t index, std::string_view field_name, std::string_view value) |
| Write UTF-8 bytes to a std::string field. | |
Private Attributes | |
| CompositeArray * | m_array |
Mutable insertion adapter for a CompositeArray.
Appends empty elements, writes fields by name, and copies compatible Composite values from another array. Copying an element also copies its present text values and rebases their offsets into the destination's text store. The adapter borrows its destination array and does not own storage.
Usage:
Copying between arrays with the same finalized layout:
Definition at line 34 of file CompositeInsertion.hpp.