HDF5Serie

Project Page
Public Member Functions | Static Public Member Functions
H5::SimpleDataSet< T > Class Template Reference

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

#include <simpledataset.h>

List of all members.

Public Member Functions

 SimpleDataSet ()
 A stub constructor.
 SimpleDataSet (const SimpleDataSet< T > &dataset)
 Copy constructor.
 SimpleDataSet (const CommonFG &parent, const std::string &name, bool create=false)
 Constructor for opening or creating a dataset.
 SimpleDataSet (const CommonFG &parent, const std::string &name, const T &data)
 Constructor for creating and writing a dataset.
void create (const CommonFG &parent, const std::string &name)
void open (const CommonFG &parent, const std::string &name)
 Open a dataset.
void write (const T &data)
 Write data.
T read ()
 Read data.
void write (const CommonFG &parent, const std::string &name, const T &data)
 Creating and write a dataset.
T read (const CommonFG &parent, const std::string &name)
 Open and read data.
void setDescription (const std::string &description)
 Sets a description for the dataset.
std::string getDescription ()
 Return the description for the dataset.
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 ()

Static Public Member Functions

static T getData (const CommonFG &parent, const std::string &name)

Detailed Description

template<class T>
class H5::SimpleDataSet< T >

A scalar, vector or matrix dataset.

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

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

template<class T>
H5::SimpleDataSet< T >::SimpleDataSet ( const CommonFG &  parent,
const std::string &  name,
bool  create = false 
)

Constructor for opening or creating a dataset.

If create is true see create(), if create is false see open()

template<class T>
H5::SimpleDataSet< T >::SimpleDataSet ( const CommonFG &  parent,
const std::string &  name,
const T &  data 
)

Constructor for creating and writing a dataset.

See create() and write().


Member Function Documentation

template<class T>
void H5::SimpleDataSet< T >::create ( const CommonFG &  parent,
const std::string &  name 
)

Creating a dataset

Creates a dataset named name as a child of parent.

template<class T>
vector< vector< T > > H5::SimpleDataSet< T >::getData ( const CommonFG &  parent,
const std::string &  name 
) [static]

Static open and read data.

This function can be called statically. See open() and read()

References H5::SimpleDataSet< T >::read().

template<class T >
string H5::SimpleDataSet< T >::getDescription ( )

Return the description for the dataset.

Returns the value of the string attribute named Description of the dataset.

References H5::SimpleAttribute< T >::getData().

template<class T>
void H5::SimpleDataSet< T >::open ( const CommonFG &  parent,
const std::string &  name 
)

Open a dataset.

Opens the dataset named name as a child of position parent.

template<class T >
vector< vector< T > > H5::SimpleDataSet< T >::read ( )

Read data.

Read the data from the HDF5 file

Referenced by H5::SimpleDataSet< T >::getData().

template<class T>
T H5::SimpleDataSet< T >::read ( const CommonFG &  parent,
const std::string &  name 
)

Open and read data.

See open() and read()

template<class T>
void H5::SimpleDataSet< T >::setDescription ( const std::string &  description)

Sets a description for the dataset.

The value of desc is stored as an string attribute named Description in the dataset.

template<class T >
void H5::SimpleDataSet< T >::write ( const T &  data)

Write data.

Writes the data data to the HDF5 file

template<class T>
void H5::SimpleDataSet< T >::write ( const CommonFG &  parent,
const std::string &  name,
const T &  data 
)

Creating and write a dataset.

See create() and write().


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