9#ifndef H5GT_H5GROUP_HPP
10#define H5GT_H5GROUP_HPP
12#include "H5Object.hpp"
13#include "bits/H5_definitions.hpp"
14#include "bits/H5Annotate_traits.hpp"
15#include "bits/H5Node_traits.hpp"
34 const static ObjectType type = ObjectType::Group;
47 return Object::_unpackSoftLink(
getPath());
51 return Object::_unlink(
getPath());
61 bool rename(
const std::string& dest_path,
70 HDF5ErrMapper::ToException<GroupException>(
71 std::string(path +
" has no parent"));
74 std::string parentPath = details::splitPathToParentAndObj(path, objName);
75 if (parentPath.empty())
76 HDF5ErrMapper::ToException<GroupException>(
77 std::string(objName +
" has no parent"));
79 return getGroup(parentPath, groupAccessProps);
89 bool operator!=(
const Group& other)
const {
90 return !(*
this == other);
93 static Group FromId(
const hid_t&
id,
const bool& increaseRefCount =
false){
94 Object obj = Object(
id, ObjectType::Group, increaseRefCount);
99 Group(
const Object& obj) : Object(obj){};
100 using Object::Object;
102 inline Group(Object&& o) noexcept : Object(std::move(o)) {};
105 friend class Reference;
106 template <
typename Derivate>
friend class ::h5gt::NodeTraits;
Definition H5Annotate_traits.hpp:19
Definition H5PropertyList.hpp:162
Represents an hdf5 group.
Definition H5Group.hpp:23
ObjectType getObjectType() const
Gets the fundamental type of the object (dataset, group, etc)
Definition H5Object_misc.hpp:195
std::string unpackSoftLink() const
unpackSoftLink retrieve the path where Soft link points to
Definition H5Group.hpp:46
bool rename(const std::string &dest_path, const LinkCreateProps &linkCreateProps=LinkCreateProps(), const LinkAccessProps &linkAccessProps=LinkAccessProps()) const
rename move link within container
Definition H5Group.hpp:61
bool operator==(const Group &other) const
operator == Check if objects reside in the same file and equal to each other
Definition H5Group.hpp:85
Definition H5PropertyList.hpp:138
Definition H5PropertyList.hpp:129
Definition H5Object.hpp:200
NodeTraits: Base class for Group and File.
Definition H5Node_traits.hpp:23
bool rename(const std::string &src_path, const std::string &dest_path, const LinkCreateProps &linkCreateProps=LinkCreateProps(), const LinkAccessProps &linkAccessProps=LinkAccessProps()) const
moves an object and its content within an HDF5 file.
Definition H5Node_traits_misc.hpp:200
Group getGroup(const std::string &group_name, const GroupAccessProps &groupAccessProps=GroupAccessProps()) const
open an existing group with the name group_name
Definition H5Node_traits_misc.hpp:142
Definition H5Object.hpp:55
LinkInfo _getLinkInfo(const std::string &objPath) const
getLinkInfo retrieve link info from an object with 'objPath'. This object must reside in the same con...
Definition H5Object_misc.hpp:216
ObjectType getObjectType() const
Gets the fundamental type of the object (dataset, group, etc)
Definition H5Object_misc.hpp:195
std::string getPath() const
return the path to the current group, dataset, datatype or attribute's holder
Definition H5Object_misc.hpp:185
bool operator==(const Object &other) const
When coparing objects h5gt::File must be open.
Definition H5Object_misc.hpp:105