h5gt 0.2.0
C++ wrapper for HDF5 library (based on HighFive project)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
h5gt::FixedLenStringArray< N > Class Template Reference

A structure representing a set of fixed-length strings. More...

#include <H5DataType.hpp>

Public Types

using iterator = typename vector_t::iterator
 
using const_iterator = typename vector_t::const_iterator
 
using reverse_iterator = typename vector_t::reverse_iterator
 
using const_reverse_iterator = typename vector_t::const_reverse_iterator
 
using value_type = typename vector_t::value_type
 

Public Member Functions

 FixedLenStringArray (const char array[][N], std::size_t length)
 Create a FixedStringArray from a raw contiguous buffer.
 
 FixedLenStringArray (const std::vector< std::string > &vec)
 Create a FixedStringArray from a sequence of strings.
 
 FixedLenStringArray (const std::string *iter_begin, const std::string *iter_end)
 
 FixedLenStringArray (const std::initializer_list< std::string > &)
 
void push_back (const std::string &)
 Append an std::string to the buffer structure.
 
void push_back (const std::array< char, N > &)
 
std::string getString (std::size_t index) const
 Retrieve a string from the structure as std::string.
 
const char * operator[] (std::size_t i) const noexcept
 
const char * at (std::size_t i) const
 
bool empty () const noexcept
 
std::size_t size () const noexcept
 
void resize (std::size_t n)
 
const char * front () const
 
const char * back () const
 
char * data () noexcept
 
const char * data () const noexcept
 
iterator begin () noexcept
 
iterator end () noexcept
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator end () const noexcept
 
const_iterator cend () const noexcept
 
reverse_iterator rbegin () noexcept
 
reverse_iterator rend () noexcept
 
const_reverse_iterator rbegin () const noexcept
 
const_reverse_iterator rend () const noexcept
 

Detailed Description

template<std::size_t N>
class h5gt::FixedLenStringArray< N >

A structure representing a set of fixed-length strings.

Although fixed-len arrays can be created 'raw' without the need for this structure, to retrieve results efficiently it must be used.

Constructor & Destructor Documentation

◆ FixedLenStringArray()

template<std::size_t N>
h5gt::FixedLenStringArray< N >::FixedLenStringArray ( const std::vector< std::string > & vec)
inlineexplicit

Create a FixedStringArray from a sequence of strings.

Such conversion involves a copy, original vector is not modified


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