HDF5Serie |
Project Page |
A scalar, vector or matrix attribute. More...
#include <simpleattribute.h>
Public Member Functions | |
| SimpleAttribute () | |
| A stub constructor. | |
| SimpleAttribute (const SimpleAttribute< T > &attribute) | |
| Copy constructor. | |
| SimpleAttribute (const H5Object &parent, const std::string &name, bool create=false) | |
| Constructor for opening or creating a attribute. | |
| SimpleAttribute (const H5Object &parent, const std::string &name, const T &data) | |
| Constructor for creating and writing a attribute. | |
| void | create (const H5Object &parent, const std::string &name) |
| void | open (const H5Object &parent, const std::string &name) |
| Open a attribute. | |
| void | write (const T &data) |
| Write data. | |
| T | read () |
| Read data. | |
| void | write (const H5Object &parent, const std::string &name, const T &data) |
| Creating and write a attribute. | |
| T | read (const H5Object &parent, const std::string &name) |
| Open and read data. | |
| 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 H5Object &parent, const std::string &name) |
| static void | setData (const H5Object &parent, const std::string &name, const T &data) |
A scalar, vector or matrix attribute.
A HDF5 attribute 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.
| H5::SimpleAttribute< T >::SimpleAttribute | ( | const H5Object & | parent, |
| const std::string & | name, | ||
| bool | create = false |
||
| ) |
Constructor for opening or creating a attribute.
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 SimpleAttribute(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 SimpleAttribute(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()
| H5::SimpleAttribute< T >::SimpleAttribute | ( | const H5Object & | parent, |
| const std::string & | name, | ||
| const T & | data | ||
| ) |
| void H5::SimpleAttribute< T >::create | ( | const H5Object & | parent, |
| const std::string & | name | ||
| ) |
Creating a attribute
For a scalar value T=CTYPE: Creates a scalar attribute named name as a child of parent.
For a vector value T=std::vector<CTYPE>: The declaration of this function is void create(const H5Object& parent, const std::string& name, int count); Creates a vector attribute of size count named name as a child of parent.
For a matrix value T=std::vector<std::vector<CTYPE> >: The declaration of this function is void create(const H5Object& parent, const std::string& name, int rows, int columns); Creates a matrix attribute of size count x columns named name as a child of parent.
| vector< vector< T > > H5::SimpleAttribute< T >::getData | ( | const H5Object & | parent, |
| const std::string & | name | ||
| ) | [static] |
Static open and read data.
This function can be called statically. See open() and read()
References H5::SimpleAttribute< T >::read().
Referenced by H5::SimpleDataSet< T >::getDescription(), H5::MatrixSerie< T >::getDescription(), H5::VectorSerie< T >::getDescription(), and H5::StructSerie< S >::getDescription().
| void H5::SimpleAttribute< T >::open | ( | const H5Object & | parent, |
| const std::string & | name | ||
| ) |
Open a attribute.
Opens the attribute named name as a child of position parent.
| vector< vector< T > > H5::SimpleAttribute< T >::read | ( | ) |
| T H5::SimpleAttribute< T >::read | ( | const H5Object & | parent, |
| const std::string & | name | ||
| ) |
| void H5::SimpleAttribute< T >::setData | ( | const H5Object & | parent, |
| const std::string & | name, | ||
| const T & | data | ||
| ) | [static] |
Static write data.
This function can be called statically. See write()
References H5::SimpleAttribute< T >::write().
| void H5::SimpleAttribute< T >::write | ( | const T & | data | ) |
Write data.
Writes the data data to the HDF5 file
Referenced by H5::SimpleAttribute< T >::setData().
| void H5::SimpleAttribute< T >::write | ( | const H5Object & | parent, |
| const std::string & | name, | ||
| const T & | data | ||
| ) |
1.8.0