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>
 
   39    const auto& obj = 
static_cast<const Derivate&
>(*this);
 
   41        throw ObjectException(
"Invalid call to `PathTraits::getFile` for invalid object");
 
 
 
 
 
 
File class.
Definition H5File.hpp:25
Exception specific to HighFive Object interface.
Definition H5Exception.hpp:88
PathTraits()
Definition H5Path_traits_misc.hpp:19
std::string getPath() const
return the path to the current object
Definition H5Path_traits_misc.hpp:31
File & getFile() const
Return a reference to the File object this object belongs.
Definition H5Path_traits_misc.hpp:38
Definition assert_compatible_spaces.hpp:15