18template <
typename Derivate>
20 static_assert(std::is_same<Derivate, Group>::value || std::is_same<Derivate, DataSet>::value ||
21 std::is_same<Derivate, Attribute>::value,
22 "PathTraits can only be applied to Group, DataSet and Attribute");
23 const auto& obj =
static_cast<const Derivate&
>(*this);
25 const hid_t file_id = detail::h5i_get_file_id<PropertyException>(obj.getId());
26 _file_obj.reset(
new File(file_id));
30template <
typename Derivate>
32 return details::get_name([
this](
char* buffer,
size_t length) {
33 return detail::h5i_get_name(
static_cast<const Derivate&
>(*this).getId(), buffer, length);
37template <
typename Derivate>
File class.
Definition H5File.hpp:24
PathTraits()
Definition H5Path_traits_misc.hpp:19
File & getFile() const noexcept
Return a reference to the File object this object belongs.
Definition H5Path_traits_misc.hpp:38
std::string getPath() const
return the path to the current object
Definition H5Path_traits_misc.hpp:31
Definition H5_definitions.hpp:22