23 #ifndef H5ID_WRAPPER_HPP 24 #define H5ID_WRAPPER_HPP 26 #include "splash/core/splashMacros.hpp" 38 static T copy(
const T&)
41 SPLASH_UNUSED
static char copyNotAllowed[
sizeof(T) ? -1 : 0];
44 static bool release(
const T&)
64 bool release(
const T&)
77 std::swap(lhs.refCt_, rhs.refCt_);
89 template<H5_DLL herr_t (*T_CloseMethod)(h
id_t),
template<
class>
class T_DestructionPolicy>
92 typedef T_DestructionPolicy<hid_t> DestructionPolicy;
98 id_ = DestructionPolicy::copy(rhs.id_);
110 if(DestructionPolicy::release(id_))
139 operator hid_t()
const {
return id_; }
140 operator bool()
const {
return id_ >= 0; }
144 std::swap(lhs.id_, rhs.id_);
145 std::swap(static_cast<DestructionPolicy&>(lhs), static_cast<DestructionPolicy&>(rhs));
165 template<H5_DLL herr_t (*T_CloseMethod)(h
id_t),
template<
class>
class T_DestructionPolicy>
168 return static_cast<hid_t
>(lhs) == static_cast<hid_t>(rhs);
170 template<H5_DLL herr_t (*T_CloseMethod)(h
id_t),
template<
class>
class T_DestructionPolicy>
173 return !(lhs == rhs);
H5IdWrapper< H5Oclose, policies::NoCopy > H5ObjectId
H5IdWrapper< H5Tclose, policies::NoCopy > H5TypeId
H5IdWrapper< H5Sclose, policies::NoCopy > H5DataspaceId
H5IdWrapper< H5Aclose, policies::NoCopy > H5AttributeId