HighFive 2.9.0
HighFive - Header-only C++ HDF5 interface
Loading...
Searching...
No Matches
HighFive::AnnotateTraits< Derivate > Class Template Reference

#include <H5Annotate_traits.hpp>

Public Member Functions

Attribute createAttribute (const std::string &attribute_name, const DataSpace &space, const DataType &type)
 create a new attribute with the name attribute_name
 
template<typename Type >
Attribute createAttribute (const std::string &attribute_name, const DataSpace &space)
 createAttribute create a new attribute on the current dataset with size specified by space
 
template<typename T >
Attribute createAttribute (const std::string &attribute_name, const T &data)
 createAttribute create a new attribute on the current dataset and write to it, inferring the DataSpace from data.
 
void deleteAttribute (const std::string &attribute_name)
 deleteAttribute let you delete an attribute by its name.
 
Attribute getAttribute (const std::string &attribute_name) const
 open an existing attribute with the name attribute_name
 
size_t getNumberAttributes () const
 return the number of attributes of the node / group
 
std::vector< std::string > listAttributeNames () const
 list all attribute name of the node / group
 
bool hasAttribute (const std::string &attr_name) const
 checks an attribute exists
 

Member Function Documentation

◆ createAttribute() [1/3]

template<typename Derivate >
template<typename Type >
Attribute HighFive::AnnotateTraits< Derivate >::createAttribute ( const std::string & attribute_name,
const DataSpace & space )
inline

createAttribute create a new attribute on the current dataset with size specified by space

Parameters
attribute_nameidentifier of the attribute
spaceAssociated DataSpace informations
Returns
Attribute Object

◆ createAttribute() [2/3]

template<typename Derivate >
Attribute HighFive::AnnotateTraits< Derivate >::createAttribute ( const std::string & attribute_name,
const DataSpace & space,
const DataType & type )
inline

create a new attribute with the name attribute_name

Parameters
attribute_nameidentifier of the attribute
spaceAssociated DataSpace
type
Returns
the attribute object

◆ createAttribute() [3/3]

template<typename Derivate >
template<typename T >
Attribute HighFive::AnnotateTraits< Derivate >::createAttribute ( const std::string & attribute_name,
const T & data )
inline

createAttribute create a new attribute on the current dataset and write to it, inferring the DataSpace from data.

Parameters
attribute_nameidentifier of the attribute
dataAssociated data to write, must support DataSpace::From, see DataSpace for more information
Returns
Attribute Object

◆ deleteAttribute()

template<typename Derivate >
void HighFive::AnnotateTraits< Derivate >::deleteAttribute ( const std::string & attribute_name)
inline

deleteAttribute let you delete an attribute by its name.

Parameters
attribute_nameidentifier of the attribute

◆ getAttribute()

template<typename Derivate >
Attribute HighFive::AnnotateTraits< Derivate >::getAttribute ( const std::string & attribute_name) const
inline

open an existing attribute with the name attribute_name

Parameters
attribute_nameidentifier of the attribute
Returns
the attribute object

◆ getNumberAttributes()

template<typename Derivate >
size_t HighFive::AnnotateTraits< Derivate >::getNumberAttributes ( ) const
inline

return the number of attributes of the node / group

Returns
number of attributes

◆ hasAttribute()

template<typename Derivate >
bool HighFive::AnnotateTraits< Derivate >::hasAttribute ( const std::string & attr_name) const
inline

checks an attribute exists

Returns
number of attributes

◆ listAttributeNames()

template<typename Derivate >
std::vector< std::string > HighFive::AnnotateTraits< Derivate >::listAttributeNames ( ) const
inline

list all attribute name of the node / group

Returns
number of attributes

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