TRIQS/h5 1.3.0
C++ interface to HDF5
Loading...
Searching...
No Matches

#include <h5/stl/string.hpp>

Detailed Description

Stores an arbitrary number of strings in a 1-dimensional std::vector<char>.

Each string is assumed to have the same length. If a string is shorter than this length, it is padded with zeros. The lengths member should have the following entries: the number of strings in each dimension and the max. allowed length of the strings + 1. For example, if the original strings are stored in a 2-dimensional array of size MxN and the longest string is of length L, then lengths = {M, N, L+1}.

The HDF5 datatype is a fixed-length string of size lengths.back() and the HDF5 dataspace is an n-dimensional array of fixed-sized strings.

Definition at line 160 of file string.hpp.

Public Member Functions

dataspace dspace () const
 Get the HDF5 dataspace.
 
datatype dtype () const
 Get the HDF5 datatype.
 

Public Attributes

std::vector< char > buffer
 Stores strings in a 1-dimensional vector.
 
v_t lengths
 Stores the number of strings in each dimension and the max. allowed length of the strings + 1.
 

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