9#ifndef H5NODE_TRAITS_HPP
10#define H5NODE_TRAITS_HPP
14#include "../H5PropertyList.hpp"
22template <
typename Derivate>
52 template <
typename Type>
79 template <std::
size_t N>
93 const std::string& dataset_name,
125 bool rename(
const std::string& src_path,
126 const std::string& dest_path,
127 bool parents =
true)
const;
138 bool exist(
const std::string& node_name)
const;
143 void unlink(
const std::string& node_name)
const;
158 template <
typename T,
typename = decltype(&T::getPath)>
160 static_assert(!std::is_same<T, Attribute>::value,
161 "hdf5 doesn't support soft links to Attributes");
173 const std::string& obj_path,
176 const bool parents =
true);
179 const std::string& h5_file,
180 const std::string& obj_path,
183 const bool parents =
true);
186 typedef Derivate derivate_type;
191 bool _exist(
const std::string& node_name,
bool raise_errors =
true)
const;
194 Object _open(
const std::string& node_name,
Class representing a dataset.
Definition H5DataSet.hpp:31
Class representing the space (dimensions) of a dataset.
Definition H5DataSpace.hpp:37
HDF5 Data Type.
Definition H5DataType.hpp:42
A structure representing a set of fixed-length strings.
Definition H5DataType.hpp:239
Represents an hdf5 group.
Definition H5Group.hpp:25
NodeTraits: Base class for Group and File.
Definition H5Node_traits.hpp:23
Group getGroup(const std::string &group_name) const
open an existing group with the name group_name
Definition H5Node_traits_misc.hpp:127
void unlink(const std::string &node_name) const
unlink the given dataset or group
Definition H5Node_traits_misc.hpp:226
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:294
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:99
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:159
Group createGroup(const std::string &group_name, bool parents=true)
create a new group, and eventually intermediate groups
Definition H5Node_traits_misc.hpp:111
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:36
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:157
bool exist(const std::string &node_name) const
check a dataset or group exists in the current node / group
Definition H5Node_traits_misc.hpp:213
std::vector< std::string > listObjectNames() const
list all leaf objects name of the node / group
Definition H5Node_traits_misc.hpp:173
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:268
size_t getNumberObjects() const
return the number of leaf objects of the node / group
Definition H5Node_traits_misc.hpp:138
std::string getObjectName(size_t index) const
return the name of the object with the given index
Definition H5Node_traits_misc.hpp:148
LinkType getLinkType(const std::string &node_name) const
Returns the kind of link of the given name (soft, hard...)
Definition H5Node_traits_misc.hpp:256
Definition H5Object.hpp:36
HDF5 property Lists.
Definition H5PropertyList.hpp:62
static const PropertyList< T > & Default() noexcept
Return the Default property type object.
Definition H5PropertyList.hpp:81
Definition H5_definitions.hpp:15
PropertyList< PropertyType::LINK_CREATE > LinkCreateProps
Definition H5PropertyList.hpp:103
LinkType
The possible types of group entries (link concept)
Definition H5Node_traits.hpp:202
PropertyList< PropertyType::LINK_ACCESS > LinkAccessProps
Definition H5PropertyList.hpp:104
ObjectType
Enum of the types of objects (H5O api)
Definition H5Object.hpp:25