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

RAII class for HDF5 group. More...

#include <mckl/utility/hdf5.hpp>

Inherits mckl::HDF5ID< HDF5Group >.

Public Member Functions

 HDF5Group ()=default
 
 HDF5Group (const HDF5File &file, const std::string &groupname)
 Open a group if possible, otherwise create a new one. More...
 
 HDF5Group (const HDF5Group &group, const std::string &groupname)
 Open a group if possible, otherwise create a new one. More...
 
std::vector< std::string > links () const
 Get the names of all links in the group. More...
 
std::size_t size () const
 Get the number of links in the group. More...
 
- Public Member Functions inherited from mckl::HDF5ID< HDF5Group >
 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< HDF5Group >
::hid_t id_
 

Detailed Description

RAII class for HDF5 group.

Definition at line 196 of file hdf5.hpp.

Constructor & Destructor Documentation

◆ HDF5Group() [1/3]

mckl::HDF5Group::HDF5Group ( )
default

◆ HDF5Group() [2/3]

mckl::HDF5Group::HDF5Group ( const HDF5File file,
const std::string &  groupname 
)
inline

Open a group if possible, otherwise create a new one.

Definition at line 204 of file hdf5.hpp.

◆ HDF5Group() [3/3]

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

Open a group if possible, otherwise create a new one.

Definition at line 220 of file hdf5.hpp.

Member Function Documentation

◆ close()

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

Definition at line 257 of file hdf5.hpp.

◆ copy()

::hid_t mckl::HDF5Group::copy ( ::hid_t  )
staticdelete

◆ links()

std::vector<std::string> mckl::HDF5Group::links ( ) const
inline

Get the names of all links in the group.

Definition at line 236 of file hdf5.hpp.

◆ size()

std::size_t mckl::HDF5Group::size ( ) const
inline

Get the number of links in the group.

Definition at line 246 of file hdf5.hpp.