ritsuko
Helper utilities for ArtifactDB C++ code
Loading...
Searching...
No Matches
ritsuko::hdf5::vls::Pointer< Offset_, Length_ > Struct Template Reference

Pointer into the VLS heap. More...

#include <Pointer.hpp>

Public Attributes

Offset_ offset
 
Length_ length
 

Detailed Description

template<typename Offset_, typename Length_>
struct ritsuko::hdf5::vls::Pointer< Offset_, Length_ >

Pointer into the VLS heap.

Template Parameters
Offset_Unsigned integer type for the starting offset on the heap.
Length_Unsigned integer type for the length of the string.

Each Pointer instance defines a variable length string by referencing a slice of bytes on the VLS heap. It is expected that Pointer instances are stored as a compound datatype as defined by define_pointer_datatype().

Member Data Documentation

◆ length

template<typename Offset_ , typename Length_ >
Length_ ritsuko::hdf5::vls::Pointer< Offset_, Length_ >::length

Maximum length of the string on the heap, in terms of the number of bytes. The sum of offset and length should be no greater than the length of the heap dataset.

It is not necessary to include the null terminator when setting length. However, if the slice [offset, offset + length) on the heap includes a null terminator, the string should be terminated at the first occurrence. This allows the slice to be easily reused for shorter strings when modifying a VLS inside an existing heap.

◆ offset

template<typename Offset_ , typename Length_ >
Offset_ ritsuko::hdf5::vls::Pointer< Offset_, Length_ >::offset

Starting offset of the string on the heap, in terms of the number of bytes. This should be no greater than the length of the heap dataset.


The documentation for this struct was generated from the following file: