Handle Class Reference#

DiFfRG: DiFfRG::hdf5::Handle Class Reference
DiFfRG

#include <handle.hh>

Public Member Functions

 Handle ()=default
 
 Handle (hid_t id)
 
 Handle (const Handle &o)
 
 Handle (Handle &&o) noexcept
 
Handleoperator= (const Handle &o)
 
Handleoperator= (Handle &&o) noexcept
 
 ~Handle ()
 
void reset () noexcept
 
hid_t get () const noexcept
 
bool valid () const noexcept
 
hid_t release () noexcept
 

Static Public Member Functions

static Handle take (hid_t id)
 

Private Attributes

hid_t id_ = H5I_INVALID_HID
 

Detailed Description

RAII wrapper around an HDF5 hid_t. Uses H5I ref counting so it can hold any HDF5 identifier (file, group, dataset, datatype, dataspace, attribute, property list).

Constructor & Destructor Documentation

◆ Handle() [1/4]

DiFfRG::hdf5::Handle::Handle ( )
default

◆ Handle() [2/4]

DiFfRG::hdf5::Handle::Handle ( hid_t id)
inlineexplicit

◆ Handle() [3/4]

DiFfRG::hdf5::Handle::Handle ( const Handle & o)
inline

◆ Handle() [4/4]

DiFfRG::hdf5::Handle::Handle ( Handle && o)
inlinenoexcept

◆ ~Handle()

DiFfRG::hdf5::Handle::~Handle ( )
inline

Member Function Documentation

◆ get()

hid_t DiFfRG::hdf5::Handle::get ( ) const
inlinenoexcept

◆ operator=() [1/2]

Handle & DiFfRG::hdf5::Handle::operator= ( const Handle & o)
inline

◆ operator=() [2/2]

Handle & DiFfRG::hdf5::Handle::operator= ( Handle && o)
inlinenoexcept

◆ release()

hid_t DiFfRG::hdf5::Handle::release ( )
inlinenoexcept

◆ reset()

void DiFfRG::hdf5::Handle::reset ( )
inlinenoexcept

◆ take()

static Handle DiFfRG::hdf5::Handle::take ( hid_t id)
inlinestatic

Take ownership of an id without bumping its refcount. Used when constructing from H5Fcreate/H5Dcreate2 etc. that already gave us a fresh reference.

◆ valid()

bool DiFfRG::hdf5::Handle::valid ( ) const
inlinenoexcept

Member Data Documentation

◆ id_

hid_t DiFfRG::hdf5::Handle::id_ = H5I_INVALID_HID
private

The documentation for this class was generated from the following file:
  • /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/hdf5lib/handle.hh