Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mantid::Nexus::Hdf5ID< D > Class Template Reference

A very simple wrapper that holds an HDF5 object through its hid_t. More...

#include <UniqueID.h>

Inheritance diagram for Mantid::Nexus::Hdf5ID< D >:
Mantid::Nexus::UniqueID<&H5Fclose > Mantid::Nexus::SharedID< D > Mantid::Nexus::UniqueID< D >

Public Member Functions

hid_t get () const
 Return the managed HDF5 handle.
 
 Hdf5ID () noexcept
 
 Hdf5ID (hid_t const id) noexcept
 
bool isValid () const
 Return whether the UniqueId corresponds to a valid HDF5 object.
 
 operator hid_t () const
 
bool operator!= (hid_t const id) const
 
bool operator< (hid_t const id) const
 
bool operator<= (hid_t const id) const
 
bool operator== (hid_t const id) const
 

Protected Member Functions

void close ()
 Close the held object ID.
 
void close ()
 Close a held file ID, and also call garbage collection.
 

Protected Attributes

hid_t m_id
 

Detailed Description

template<herr_t(*)(hid_t) D>
class Mantid::Nexus::Hdf5ID< D >

A very simple wrapper that holds an HDF5 object through its hid_t.

Definition at line 30 of file UniqueID.h.

Constructor & Destructor Documentation

◆ Hdf5ID() [1/2]

template<herr_t(*)(hid_t) D>
Mantid::Nexus::Hdf5ID< D >::Hdf5ID ( )
inlinenoexcept

Definition at line 38 of file UniqueID.h.

◆ Hdf5ID() [2/2]

template<herr_t(*)(hid_t) D>
Mantid::Nexus::Hdf5ID< D >::Hdf5ID ( hid_t const  id)
inlinenoexcept

Definition at line 39 of file UniqueID.h.

Member Function Documentation

◆ close() [1/2]

template<herr_t(*)(hid_t) closer>
void Mantid::Nexus::Hdf5ID< closer >::close ( )
inlineprotected

Close the held object ID.

Definition at line 64 of file UniqueID.h.

References Mantid::Nexus::INVALID_HID.

Referenced by Mantid::Nexus::UniqueID< D >::~UniqueID().

◆ close() [2/2]

void Mantid::Nexus::Hdf5ID<&H5Fclose >::close ( )
inlineprotected

Close a held file ID, and also call garbage collection.

Definition at line 72 of file UniqueID.h.

References H5Fclose(), H5garbage_collect(), and Mantid::Nexus::INVALID_HID.

◆ get()

template<herr_t(*)(hid_t) D>
hid_t Mantid::Nexus::Hdf5ID< D >::get ( ) const
inline

Return the managed HDF5 handle.

Returns
the managed HDF5 handle

Definition at line 49 of file UniqueID.h.

References Mantid::Nexus::Hdf5ID< D >::m_id.

Referenced by Mantid::Nexus::NexusDescriptorLazy::loadGroups().

◆ isValid()

template<herr_t(*)(hid_t) D>
bool Mantid::Nexus::Hdf5ID< D >::isValid ( ) const
inline

Return whether the UniqueId corresponds to a valid HDF5 object.

Returns
true if it is valid; otherwise false; on error, false

Definition at line 53 of file UniqueID.h.

References H5Iis_valid(), and Mantid::Nexus::Hdf5ID< D >::m_id.

Referenced by Mantid::Nexus::NexusDescriptorLazy::initAllEntries(), and Mantid::Nexus::NexusDescriptorLazy::loadGroups().

◆ operator hid_t()

template<herr_t(*)(hid_t) D>
Mantid::Nexus::Hdf5ID< D >::operator hid_t ( ) const
inline

Definition at line 50 of file UniqueID.h.

References Mantid::Nexus::Hdf5ID< D >::m_id.

◆ operator!=()

template<herr_t(*)(hid_t) D>
bool Mantid::Nexus::Hdf5ID< D >::operator!= ( hid_t const  id) const
inline

Definition at line 43 of file UniqueID.h.

References Mantid::Nexus::Hdf5ID< D >::m_id.

◆ operator<()

template<herr_t(*)(hid_t) D>
bool Mantid::Nexus::Hdf5ID< D >::operator< ( hid_t const  id) const
inline

Definition at line 45 of file UniqueID.h.

References Mantid::Nexus::Hdf5ID< D >::m_id.

◆ operator<=()

template<herr_t(*)(hid_t) D>
bool Mantid::Nexus::Hdf5ID< D >::operator<= ( hid_t const  id) const
inline

Definition at line 44 of file UniqueID.h.

References Mantid::Nexus::Hdf5ID< D >::m_id.

◆ operator==()

template<herr_t(*)(hid_t) D>
bool Mantid::Nexus::Hdf5ID< D >::operator== ( hid_t const  id) const
inline

Definition at line 42 of file UniqueID.h.

References Mantid::Nexus::Hdf5ID< D >::m_id.

Member Data Documentation

◆ m_id

template<herr_t(*)(hid_t) D>
hid_t Mantid::Nexus::Hdf5ID< D >::m_id
protected

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