libSplash
Public Types | Public Member Functions | Friends | List of all members
splash::H5IdWrapper< T_CloseMethod, T_DestructionPolicy > Struct Template Reference

#include <H5IdWrapper.hpp>

Inheritance diagram for splash::H5IdWrapper< T_CloseMethod, T_DestructionPolicy >:
Inheritance graph
[legend]
Collaboration diagram for splash::H5IdWrapper< T_CloseMethod, T_DestructionPolicy >:
Collaboration graph
[legend]

Public Types

typedef T_DestructionPolicy< hid_t > DestructionPolicy
 

Public Member Functions

 H5IdWrapper (hid_t id)
 
 H5IdWrapper (const H5IdWrapper &rhs)
 
H5IdWrapperoperator= (const H5IdWrapper &rhs)
 
void close ()
 
void reset (hid_t id)
 
hid_t release ()
 
 operator hid_t () const
 
 operator bool () const
 

Friends

void swap (H5IdWrapper &lhs, H5IdWrapper &rhs)
 

Detailed Description

template<H5_DLL herr_t(*)(hid_t) T_CloseMethod, template< class > class T_DestructionPolicy>
struct splash::H5IdWrapper< T_CloseMethod, T_DestructionPolicy >

RAII wrapper for a hid_t (HDF5 identifier) Calls T_CloseMethod on destruction and allows implicit conversion Calls T_DestructionPolicy::copy on copy which should return the id to store Calls T_DestructionPolicy::release on close/destruction which should return true if the handle should be closed

Definition at line 90 of file H5IdWrapper.hpp.

Member Function Documentation

◆ close()

template<H5_DLL herr_t(*)(hid_t) T_CloseMethod, template< class > class T_DestructionPolicy>
void splash::H5IdWrapper< T_CloseMethod, T_DestructionPolicy >::close ( )
inline

Sets the id to invalid closing it if required

Definition at line 118 of file H5IdWrapper.hpp.

◆ release()

template<H5_DLL herr_t(*)(hid_t) T_CloseMethod, template< class > class T_DestructionPolicy>
hid_t splash::H5IdWrapper< T_CloseMethod, T_DestructionPolicy >::release ( )
inline

Resets the internal id to invalid without closing it.

Returns
Old id

Definition at line 132 of file H5IdWrapper.hpp.

Here is the caller graph for this function:

◆ reset()

template<H5_DLL herr_t(*)(hid_t) T_CloseMethod, template< class > class T_DestructionPolicy>
void splash::H5IdWrapper< T_CloseMethod, T_DestructionPolicy >::reset ( hid_t  id)
inline

Resets the id closing the current one if required

Definition at line 124 of file H5IdWrapper.hpp.

Here is the caller graph for this function:

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