hdf5serie 2.0.0 HDF5 Serie

Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
HDF5SERIE_CLASS< T > Class Template Reference

A scalar, vector or matrix attribute/dataset. More...

`#include <simple.h>`

Inheritance diagram for HDF5SERIE_CLASS< T >:
[legend]

## Public Member Functions

void | write (const T &data)
| Write data. More...
T | read ()
| Read data. More...
template<>
void | write (const string &data)
template<>
string | read ()
template<>
void | write (const vector< string > &data)
template<>
vector< string > | read ()
template<>
void | write (const vector< vector< string > > &data)
template<>
vector< vector< string > > | read ()
template<>
void | write (const string &data)
template<>
string | read ()
template<>
void | write (const vector< string > &data)
template<>
vector< string > | read ()
template<>
void | write (const vector< vector< string > > &data)
template<>
vector< vector< string > > | read ()
template<>
void | write (const string &data)
template<>
string | read ()
template<>
void | write (const vector< string > &data)
template<>
vector< string > | read ()
template<>
void | write (const vector< vector< string > > &data)
template<>
vector< vector< string > > | read ()

## Protected Member Functions

| HDF5SERIE_CLASS (int dummy, HDF5SERIE_PARENTCLASS *parent_, const std::string &name_)
| Constructor for opening or creating a attribute/dataset. More...
| HDF5SERIE_CLASS (HDF5SERIE_PARENTCLASS *parent_, const std::string &name_)
void | close () override

## Private Attributes

hid_t | memDataTypeID
ScopedHID | memDataSpaceID

## Friends

class | Container< HDF5SERIE_CONTAINERBASECLASS, HDF5SERIE_PARENTCLASS >

## Detailed Description

### template<class T>
class HDF5SERIE_CLASS< T >

A scalar, vector or matrix attribute/dataset.

A HDF5 attribute/dataset of a scalar a vector or a matrix of fixed size of type CTYPE. CTYPE can be one of the folling types.

- char
- signed char
- unsigned char
- short
- unsigned short
- int
- unsigned int
- long
- unsigned long
- long long
- unsigned long long
- float
- double
- long double
- std::string

The template type T is simple CTYPE for a scalar, std::vector<CTYPE> for a vector and std::vector<std::vector<CTYPE> > for a matrix.

A NOTE if using a vector-matrix-library: See class description of VectorSerie.

## Constructor & Destructor Documentation

## ◆ HDF5SERIE_CLASS()

template<class T >

HDF5SERIE_CLASS< T >::HDF5SERIE_CLASS | ( | int | dummy,
|  | HDF5SERIE_PARENTCLASS * | parent_,
|  | const std::string & | name_
| ) |  |

protected

Constructor for opening or creating a attribute/dataset.

For a scalar value T=CTYPE: If create is true see create(), if create is false see open()

For a vector value T=std::vector<CTYPE>: The declaration of this function is HDF5SERIE_CLASS(const H5Object& parent, const std::string& name, int count=0) If count is not 0 see create(), if create is 0 see open()

For a matrix value T=std::vector<std::vector<CTYPE> >: The declaration of this function is HDF5SERIE_CLASS(const H5Object& parent, const std::string& name, int rows=0, int columns=0) If rows is not 0 and column is not 0 see create(), if rows and columns is 0 see open()

## Member Function Documentation

## ◆ read()

template<class T >

vector< vector< T > > HDF5SERIE_CLASS< T >::read | ( |  | ) |

Read data.

Read the data from the HDF5 file

## ◆ write()

template<class T >

void HDF5SERIE_CLASS< T >::write | ( | const T & | data | ) |

Write data.

Writes the data data to the HDF5 file

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

- /mbsim-env/hdf5serie/hdf5serie/hdf5serie/simple.h
- /mbsim-env/hdf5serie/hdf5serie/hdf5serie/simple.cc