h5cpp  0.6.0
A modern C++ wrapper for the HDF5 C library
hdf5::VarLengthStringTrait< T > Struct Template Reference

variable length string buffer trait More...

#include <variable_length_string.hpp>

Public Types

using BufferType = VarLengthStringBuffer< char >
 
using DataType = T
 

Static Public Member Functions

static BufferType to_buffer (const T &)
 create buffer with write data More...
 
static void from_buffer (const BufferType &, DataType &)
 copy data to output More...
 

Detailed Description

template<typename T>
struct hdf5::VarLengthStringTrait< T >

Trait implementing conversion functions between T and a particular variable length string buffer type.

Member Typedef Documentation

◆ BufferType

template<typename T >
using hdf5::VarLengthStringTrait< T >::BufferType = VarLengthStringBuffer<char>

◆ DataType

template<typename T >
using hdf5::VarLengthStringTrait< T >::DataType = T

Member Function Documentation

◆ from_buffer()

template<typename T >
static void hdf5::VarLengthStringTrait< T >::from_buffer ( const BufferType ,
DataType  
)
inlinestatic

Copies data from the buffer to the user data structure. It assumes that data is allocated and all data fits into it. We usually do not have to care about this as during the reading procedure a dataspace for the data sturcture is created and H5Dread checks whether or not the data fits into the structure.

◆ to_buffer()

template<typename T >
static BufferType hdf5::VarLengthStringTrait< T >::to_buffer ( const T &  )
inlinestatic

This function creates a buffer instance which can be used for writing data to disk. The buffer must be allocated within this function to ensure that all the input data fits into it.

Returns
an instance of the variable length string buffer

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