MCKL
Monte Carlo Kernel Library
Public Member Functions | Static Public Member Functions | List of all members
mckl::HDF5Attribute Class Reference

RAII class for HDF5 attribute. More...

#include <mckl/utility/hdf5.hpp>

Inherits mckl::HDF5ID< HDF5Attribute >.

Public Member Functions

 HDF5Attribute ()=default
 
 HDF5Attribute (const HDF5File &file, const std::string &name)
 
 HDF5Attribute (const HDF5Group &group, const std::string &name)
 
 HDF5Attribute (const HDF5File &file, const std::string &name, const HDF5DataType &type, const HDF5DataSpace &space)
 
 HDF5Attribute (const HDF5Group &group, const std::string &name, const HDF5DataType &type, const HDF5DataSpace &space)
 
bool read (const HDF5DataType &type, void *mem) const
 
HDF5DataSpace space () const
 
HDF5DataType type () const
 
bool write (const HDF5DataType &type, const void *mem) const
 
- Public Member Functions inherited from mckl::HDF5ID< HDF5Attribute >
 HDF5ID ()
 
 HDF5ID (::hid_t id)
 
 HDF5ID (const HDF5ID &other)
 
 HDF5ID (HDF5ID &&other)
 
 ~HDF5ID ()
 
bool good () const
 
::hid_t id () const
 
 operator bool () const
 
bool operator! () const
 
HDF5IDoperator= (const HDF5ID &other)
 
HDF5IDoperator= (HDF5ID &&other)
 

Static Public Member Functions

static void close (::hid_t id)
 
::hid_t copy (::hid_t)=delete
 

Additional Inherited Members

- Protected Attributes inherited from mckl::HDF5ID< HDF5Attribute >
::hid_t id_
 

Detailed Description

RAII class for HDF5 attribute.

Definition at line 330 of file hdf5.hpp.

Constructor & Destructor Documentation

◆ HDF5Attribute() [1/5]

mckl::HDF5Attribute::HDF5Attribute ( )
default

◆ HDF5Attribute() [2/5]

mckl::HDF5Attribute::HDF5Attribute ( const HDF5File file,
const std::string &  name 
)
inline

Definition at line 337 of file hdf5.hpp.

◆ HDF5Attribute() [3/5]

mckl::HDF5Attribute::HDF5Attribute ( const HDF5Group group,
const std::string &  name 
)
inline

Definition at line 343 of file hdf5.hpp.

◆ HDF5Attribute() [4/5]

mckl::HDF5Attribute::HDF5Attribute ( const HDF5File file,
const std::string &  name,
const HDF5DataType type,
const HDF5DataSpace space 
)
inline

Definition at line 349 of file hdf5.hpp.

◆ HDF5Attribute() [5/5]

mckl::HDF5Attribute::HDF5Attribute ( const HDF5Group group,
const std::string &  name,
const HDF5DataType type,
const HDF5DataSpace space 
)
inline

Definition at line 356 of file hdf5.hpp.

Member Function Documentation

◆ close()

static void mckl::HDF5Attribute::close ( ::hid_t  id)
inlinestatic

Definition at line 387 of file hdf5.hpp.

◆ copy()

::hid_t mckl::HDF5Attribute::copy ( ::hid_t  )
staticdelete

◆ read()

bool mckl::HDF5Attribute::read ( const HDF5DataType type,
void *  mem 
) const
inline

Definition at line 376 of file hdf5.hpp.

◆ space()

HDF5DataSpace mckl::HDF5Attribute::space ( ) const
inline

Definition at line 363 of file hdf5.hpp.

◆ type()

HDF5DataType mckl::HDF5Attribute::type ( ) const
inline

Definition at line 365 of file hdf5.hpp.

◆ write()

bool mckl::HDF5Attribute::write ( const HDF5DataType type,
const void *  mem 
) const
inline

Definition at line 367 of file hdf5.hpp.