MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Kakshya::CompositeAccess Class Reference

Validated, non-owning access to packed Composite NDData storage. More...

#include <CompositeAccess.hpp>

+ Collaboration diagram for MayaFlux::Kakshya::CompositeAccess:

Public Member Functions

std::optional< Composite > at (size_t index) const noexcept
 Borrow an element by index.
 
const DataVariant & blob_data () const noexcept
 Borrow the binary byte DataVariant without conversion.
 
std::vector< DataDimension > byte_dimensions () const
 Describe packed bytes as [elements, bytes-per-element].
 
std::span< const uint8_t > element_bytes () const noexcept
 Borrow all packed element bytes without conversion.
 
const DataVariant & element_data () const noexcept
 Borrow the packed-element DataVariant without conversion.
 
const CompositeLayout & layout () const noexcept
 Layout used to interpret packed elements.
 
size_t size () const noexcept
 Number of packed elements in the current element store.
 
std::optional< CompositeSlice > slice (const Region &region) const
 Borrow the elements selected by a one-dimensional Region.
 
std::optional< CompositeSlice > slice (size_t start, size_t count) const noexcept
 Borrow count consecutive elements starting at start.
 
const DataVariant & text_data () const noexcept
 Borrow the UTF-8 byte DataVariant without conversion.
 

Private Member Functions

 CompositeAccess (const DataVariant &elements, const DataVariant &text, const DataVariant &blob, const CompositeLayout &layout) noexcept
 

Private Attributes

const DataVariant * m_blob
 
const DataVariant * m_elements
 
const CompositeLayout * m_layout
 
const DataVariant * m_text
 

Friends

MAYAFLUX_API std::optional< CompositeAccess > as_composite_access (const DataVariant &, const DataVariant &, const DataVariant &, const CompositeLayout &)
 Validate and borrow packed Composite-compatible NDData.
 

Detailed Description

Validated, non-owning access to packed Composite NDData storage.

The element, text, and binary stores remain DataVariant instances holding vector<uint8_t>. The layout interprets field offsets within each packed element. No byte or field conversion occurs when creating this view.

Usage:

auto access = items.access();
auto first = access->at(0);
auto bytes = access->element_bytes();
auto dimensions = access->byte_dimensions();

Access to externally owned packed variants:

auto access = as_composite_access(elements, text, blob, layout);
friend MAYAFLUX_API std::optional< CompositeAccess > as_composite_access(const DataVariant &, const DataVariant &, const DataVariant &, const CompositeLayout &)
Validate and borrow packed Composite-compatible NDData.
const CompositeLayout & layout() const noexcept
Layout used to interpret packed elements.
Note
The backing DataVariant objects and layout must outlive this view. Do not replace their variant alternatives or mutate their storage while borrowed views are in use.

Definition at line 70 of file CompositeAccess.hpp.


The documentation for this class was generated from the following files: