13#include "../H5PropertyList.hpp"
19enum class IndexType : std::underlying_type<H5_index_t>::type {
27template <
typename Derivate>
57 typename std::enable_if<
58 std::is_same<typename details::inspector<T>::base_type, details::Boolean>::value,
59 int>::type* =
nullptr>
67 typename std::enable_if<
68 !std::is_same<typename details::inspector<T>::base_type, details::Boolean>::value,
69 int>::type* =
nullptr>
94 template <std::
size_t N>
124 bool parents =
true);
148 bool rename(
const std::string& src_path,
149 const std::string& dest_path,
150 bool parents =
true)
const;
164 bool exist(
const std::string& node_name)
const;
169 void unlink(
const std::string& node_name)
const;
184 template <
typename T,
typename = decltype(&T::getPath)>
186 static_assert(!std::is_same<T, Attribute>::value,
187 "hdf5 doesn't support soft links to Attributes");
199 const std::string& obj_path,
202 const bool parents =
true);
205 const std::string& h5_file,
206 const std::string& obj_path,
209 const bool parents =
true);
212 using derivate_type = Derivate;
217 bool _exist(
const std::string& node_name,
bool raise_errors =
true)
const;
220 Object _open(
const std::string& node_name,
Class representing a dataset.
Definition H5DataSet.hpp:30
Class representing the space (dimensions) of a dataset.
Definition H5DataSpace.hpp:25
HDF5 Data Type.
Definition H5DataType.hpp:54
A structure representing a set of fixed-length strings.
Definition H5DataType.hpp:284
Represents an hdf5 group.
Definition H5Group.hpp:46
NodeTraits: Base class for Group and File.
Definition H5Node_traits.hpp:28
Group getGroup(const std::string &group_name) const
open an existing group with the name group_name
Definition H5Node_traits_misc.hpp:167
std::vector< std::string > listObjectNames(IndexType idx_type=IndexType::NAME) const
list all leaf objects name of the node / group
Definition H5Node_traits_misc.hpp:222
void unlink(const std::string &node_name) const
unlink the given dataset or group
Definition H5Node_traits_misc.hpp:274
void createExternalLink(const std::string &link_name, const std::string &h5_file, const std::string &obj_path, LinkCreateProps linkCreateProps=LinkCreateProps(), const LinkAccessProps &linkAccessProps=LinkAccessProps(), const bool parents=true)
Definition H5Node_traits_misc.hpp:341
DataSet getDataSet(const std::string &dataset_name, const DataSetAccessProps &accessProps=DataSetAccessProps::Default()) const
get an existing dataset in the current file
Definition H5Node_traits_misc.hpp:120
void createSoftLink(const std::string &linkName, const T &obj)
A shorthand to create softlink to any object which provides getPath The link will be created with def...
Definition H5Node_traits.hpp:185
Group createGroup(const std::string &group_name, bool parents=true)
create a new group, and eventually intermediate groups
Definition H5Node_traits_misc.hpp:133
DataSet createDataSet(const std::string &dataset_name, const DataSpace &space, const DataType &type, const DataSetCreateProps &createProps=DataSetCreateProps::Default(), const DataSetAccessProps &accessProps=DataSetAccessProps::Default(), bool parents=true)
createDataSet Create a new dataset in the current file of datatype type and of size space
Definition H5Node_traits_misc.hpp:34
bool rename(const std::string &src_path, const std::string &dest_path, bool parents=true) const
moves an object and its content within an HDF5 file.
Definition H5Node_traits_misc.hpp:202
bool exist(const std::string &node_name) const
check a dataset or group exists in the current node / group
Definition H5Node_traits_misc.hpp:261
ObjectType getObjectType(const std::string &node_name) const
A shorthand to get the kind of object pointed to (group, dataset, type...)
Definition H5Node_traits_misc.hpp:315
size_t getNumberObjects() const
return the number of leaf objects of the node / group
Definition H5Node_traits_misc.hpp:178
std::string getObjectName(size_t index) const
return the name of the object with the given index
Definition H5Node_traits_misc.hpp:188
LinkType getLinkType(const std::string &node_name) const
Returns the kind of link of the given name (soft, hard...)
Definition H5Node_traits_misc.hpp:301
DataSet createDataSet(const std::string &dataset_name, const DataSpace &space, const DataSetCreateProps &createProps=DataSetCreateProps::Default(), const DataSetAccessProps &accessProps=DataSetAccessProps::Default(), bool parents=true)
Definition H5Object.hpp:54
HDF5 property Lists.
Definition H5PropertyList.hpp:79
static const PropertyList< T > & Default() noexcept
Return the Default property type object.
Definition H5PropertyList.hpp:97
Definition H5_definitions.hpp:15
PropertyList< PropertyType::LINK_CREATE > LinkCreateProps
Definition H5PropertyList.hpp:118
PropertyList< PropertyType::LINK_ACCESS > LinkAccessProps
Definition H5PropertyList.hpp:119
LinkType
The possible types of group entries (link concept)
Definition H5Node_traits.hpp:228
ObjectType
Enum of the types of objects (H5O api)
Definition H5Object.hpp:24
IndexType
Definition H5Node_traits.hpp:19