HighFive 2.10.0
HighFive - Header-only C++ HDF5 interface
Loading...
Searching...
No Matches
HighFive::deprecated::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 ()=default
 
 FixedLenStringArray (const char array[][N], std::size_t n_strings)
 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 HighFive::deprecated::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.

Template Parameters
NSize of the string in bytes, including the null character. Note, that all string must be null-terminated.

Member Typedef Documentation

◆ const_iterator

template<std::size_t N>
using HighFive::deprecated::FixedLenStringArray< N >::const_iterator = typename vector_t::const_iterator

◆ const_reverse_iterator

template<std::size_t N>
using HighFive::deprecated::FixedLenStringArray< N >::const_reverse_iterator = typename vector_t::const_reverse_iterator

◆ iterator

template<std::size_t N>
using HighFive::deprecated::FixedLenStringArray< N >::iterator = typename vector_t::iterator

◆ reverse_iterator

template<std::size_t N>
using HighFive::deprecated::FixedLenStringArray< N >::reverse_iterator = typename vector_t::reverse_iterator

◆ value_type

template<std::size_t N>
using HighFive::deprecated::FixedLenStringArray< N >::value_type = typename vector_t::value_type

Constructor & Destructor Documentation

◆ FixedLenStringArray() [1/5]

template<std::size_t N>
HighFive::deprecated::FixedLenStringArray< N >::FixedLenStringArray ( )
default

◆ FixedLenStringArray() [2/5]

template<std::size_t N>
HighFive::deprecated::FixedLenStringArray< N >::FixedLenStringArray ( const char array[][N],
std::size_t n_strings )
inline

Create a FixedStringArray from a raw contiguous buffer.

The argument n_strings specifies the number of strings.

◆ FixedLenStringArray() [3/5]

template<std::size_t N>
HighFive::deprecated::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

◆ FixedLenStringArray() [4/5]

template<std::size_t N>
HighFive::deprecated::FixedLenStringArray< N >::FixedLenStringArray ( const std::string * iter_begin,
const std::string * iter_end )
inline

◆ FixedLenStringArray() [5/5]

template<std::size_t N>
HighFive::deprecated::FixedLenStringArray< N >::FixedLenStringArray ( const std::initializer_list< std::string > & init_list)
inline

Member Function Documentation

◆ at()

template<std::size_t N>
const char * HighFive::deprecated::FixedLenStringArray< N >::at ( std::size_t i) const
inline

◆ back()

template<std::size_t N>
const char * HighFive::deprecated::FixedLenStringArray< N >::back ( ) const
inline

◆ begin() [1/2]

template<std::size_t N>
const_iterator HighFive::deprecated::FixedLenStringArray< N >::begin ( ) const
inlinenoexcept

◆ begin() [2/2]

template<std::size_t N>
iterator HighFive::deprecated::FixedLenStringArray< N >::begin ( )
inlinenoexcept

◆ cbegin()

template<std::size_t N>
const_iterator HighFive::deprecated::FixedLenStringArray< N >::cbegin ( ) const
inlinenoexcept

◆ cend()

template<std::size_t N>
const_iterator HighFive::deprecated::FixedLenStringArray< N >::cend ( ) const
inlinenoexcept

◆ data() [1/2]

template<std::size_t N>
const char * HighFive::deprecated::FixedLenStringArray< N >::data ( ) const
inlinenoexcept

◆ data() [2/2]

template<std::size_t N>
char * HighFive::deprecated::FixedLenStringArray< N >::data ( )
inlinenoexcept

◆ empty()

template<std::size_t N>
bool HighFive::deprecated::FixedLenStringArray< N >::empty ( ) const
inlinenoexcept

◆ end() [1/2]

template<std::size_t N>
const_iterator HighFive::deprecated::FixedLenStringArray< N >::end ( ) const
inlinenoexcept

◆ end() [2/2]

template<std::size_t N>
iterator HighFive::deprecated::FixedLenStringArray< N >::end ( )
inlinenoexcept

◆ front()

template<std::size_t N>
const char * HighFive::deprecated::FixedLenStringArray< N >::front ( ) const
inline

◆ getString()

template<std::size_t N>
std::string HighFive::deprecated::FixedLenStringArray< N >::getString ( std::size_t index) const
inline

Retrieve a string from the structure as std::string.

◆ operator[]()

template<std::size_t N>
const char * HighFive::deprecated::FixedLenStringArray< N >::operator[] ( std::size_t i) const
inlinenoexcept

◆ push_back() [1/2]

template<std::size_t N>
void HighFive::deprecated::FixedLenStringArray< N >::push_back ( const std::array< char, N > & src)
inline

◆ push_back() [2/2]

template<std::size_t N>
void HighFive::deprecated::FixedLenStringArray< N >::push_back ( const std::string & src)
inline

Append an std::string to the buffer structure.

◆ rbegin() [1/2]

template<std::size_t N>
const_reverse_iterator HighFive::deprecated::FixedLenStringArray< N >::rbegin ( ) const
inlinenoexcept

◆ rbegin() [2/2]

template<std::size_t N>
reverse_iterator HighFive::deprecated::FixedLenStringArray< N >::rbegin ( )
inlinenoexcept

◆ rend() [1/2]

template<std::size_t N>
const_reverse_iterator HighFive::deprecated::FixedLenStringArray< N >::rend ( ) const
inlinenoexcept

◆ rend() [2/2]

template<std::size_t N>
reverse_iterator HighFive::deprecated::FixedLenStringArray< N >::rend ( )
inlinenoexcept

◆ resize()

template<std::size_t N>
void HighFive::deprecated::FixedLenStringArray< N >::resize ( std::size_t n)
inline

◆ size()

template<std::size_t N>
std::size_t HighFive::deprecated::FixedLenStringArray< N >::size ( ) const
inlinenoexcept

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