HighFive 2.7.1
HighFive - Header-only C++ HDF5 interface
Loading...
Searching...
No Matches
HighFive::Attribute Class Reference

Class representing an attribute of a dataset or group. More...

#include <H5Attribute.hpp>

Inheritance diagram for HighFive::Attribute:
Collaboration diagram for HighFive::Attribute:

Public Member Functions

std::string getName () const
 return the name of the current attribute
 
size_t getStorageSize () const
 
DataType getDataType () const
 getDataType
 
DataSpace getSpace () const
 getSpace
 
DataSpace getMemSpace () const
 getMemSpace
 
template<typename T >
read () const
 Return the attribute.
 
template<typename T >
void read (T &array) const
 
template<typename T >
void read (T *array, const DataType &dtype={}) const
 Read the attribute into a buffer.
 
template<typename T >
void write (const T &buffer)
 
template<typename T >
void write_raw (const T *buffer, const DataType &dtype={})
 Write a buffer to this attribute.
 
AttributeCreateProps getCreatePropertyList () const
 Get the list of properties for creation of this attribute.
 
 Attribute ()=delete
 
- Public Member Functions inherited from HighFive::Object
 Object (Object &&other) noexcept
 
 ~Object ()
 
bool isValid () const noexcept
 isValid
 
hid_t getId () const noexcept
 getId
 
ObjectInfo getInfo () const
 Retrieve several infos about the current object (address, dates, etc)
 
ObjectType getType () const
 Gets the fundamental type of the object (dataset, group, etc)
 
bool operator== (const Object &other) const noexcept
 
- Public Member Functions inherited from HighFive::PathTraits< Attribute >
 PathTraits ()
 
std::string getPath () const
 return the path to the current object
 
FilegetFile () const noexcept
 Return a reference to the File object this object belongs.
 

Static Public Attributes

static const ObjectType type = ObjectType::Attribute
 

Protected Member Functions

 Object (Object &&other) noexcept
 
 Object ()
 
 Object (const Object &other)
 
 Object (hid_t)
 
- Protected Member Functions inherited from HighFive::Object
 Object ()
 
 Object (const Object &other)
 
 Object (hid_t)
 
Objectoperator= (const Object &other)
 

Additional Inherited Members

- Protected Attributes inherited from HighFive::Object
hid_t _hid
 
- Protected Attributes inherited from HighFive::PathTraits< Attribute >
std::shared_ptr< File_file_obj
 

Detailed Description

Class representing an attribute of a dataset or group.

Constructor & Destructor Documentation

◆ Attribute()

HighFive::Attribute::Attribute ( )
delete

Member Function Documentation

◆ getCreatePropertyList()

AttributeCreateProps HighFive::Attribute::getCreatePropertyList ( ) const
inline

Get the list of properties for creation of this attribute.

◆ getDataType()

DataType HighFive::Attribute::getDataType ( ) const
inline

getDataType

Returns
return the datatype associated with this dataset

◆ getMemSpace()

DataSpace HighFive::Attribute::getMemSpace ( ) const
inline

getMemSpace

Returns
same than getSpace for DataSet, compatibility with Selection class

◆ getName()

std::string HighFive::Attribute::getName ( ) const
inline

return the name of the current attribute

Returns
the name of the attribute

◆ getSpace()

DataSpace HighFive::Attribute::getSpace ( ) const
inline

getSpace

Returns
return the dataspace associated with this dataset

◆ getStorageSize()

size_t HighFive::Attribute::getStorageSize ( ) const
inline

◆ Object() [1/4]

HighFive::Object::Object ( )
inlineprotected

◆ Object() [2/4]

HighFive::Object::Object ( const Object other)
inlineprotected

◆ Object() [3/4]

HighFive::Object::Object ( hid_t  hid)
inlineexplicitprotected

◆ Object() [4/4]

HighFive::Object::Object ( Object &&  other)
inlineprotectednoexcept

◆ read() [1/3]

template<typename T >
T HighFive::Attribute::read ( ) const
inline

Return the attribute.

◆ read() [2/3]

template<typename T >
void HighFive::Attribute::read ( T &  array) const
inline

Read the attribute into a buffer An exception is raised if the numbers of dimension of the buffer and of the attribute are different

The array type can be a N-pointer or a N-vector ( e.g int** integer two dimensional array )

◆ read() [3/3]

template<typename T >
void HighFive::Attribute::read ( T *  array,
const DataType dtype = {} 
) const
inline

Read the attribute into a buffer.

◆ write()

template<typename T >
void HighFive::Attribute::write ( const T &  buffer)
inline

Write the integrality N-dimension buffer to this attribute An exception is raised if the numbers of dimension of the buffer and of the attribute are different

The array type can be a N-pointer or a N-vector ( e.g int** integer two dimensional array )

◆ write_raw()

template<typename T >
void HighFive::Attribute::write_raw ( const T *  buffer,
const DataType dtype = {} 
)
inline

Write a buffer to this attribute.

Member Data Documentation

◆ type

const ObjectType HighFive::Attribute::type = ObjectType::Attribute
static

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