h5cpp
0.6.1
A modern C++ wrapper for the HDF5 C library
|
#include <group.hpp>
Public Member Functions | |
Group () | |
default constructor More... | |
Group (const Group &group) | |
copy constructor More... | |
Group (const Node &node) | |
constructor More... | |
Group (const Group &parent, const Path &path, const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::GroupCreationList &gcpl=property::GroupCreationList(), const property::GroupAccessList &gapl=property::GroupAccessList()) | |
constructor More... | |
virtual | ~Group () override |
Group & | operator= (const Group &group) |
copy assignment operator More... | |
void | flush () const |
flush the group (since hdf5 1.10.0) More... | |
IteratorConfig & | iterator_config () noexcept |
get reference to the iterator configuration More... | |
const IteratorConfig & | iterator_config () const noexcept |
get reference to the interator configuration More... | |
bool | exists (const std::string &name, const property::LinkAccessList &lapl=property::LinkAccessList()) const |
checks existence of a node More... | |
Group | create_group (const std::string &name, const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::GroupCreationList &gcpl=property::GroupCreationList(), const property::GroupAccessList &gapl=property::GroupAccessList()) const |
create a new group More... | |
Dataset | create_dataset (const std::string &name, const datatype::Datatype &type, const dataspace::Dataspace &space, const property::DatasetCreationList &dcpl=property::DatasetCreationList(), const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::DatasetAccessList &dapl=property::DatasetAccessList()) const |
create a new dataset More... | |
Node | operator[] (const Path &path) const |
get node More... | |
void | create_link (const Path &link_path, const fs::path &target_file, const Path &target_path, const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::LinkAccessList &lapl=property::LinkAccessList()) |
Create an external link. More... | |
void | create_link (const Path &link_path, const Path &target_path, const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::LinkAccessList &lapl=property::LinkAccessList()) |
Create a soft link. More... | |
void | create_link (const Path &link_path, const Node &target, const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::LinkAccessList &lapl=property::LinkAccessList()) |
Create a soft or external link. More... | |
void | copy_here (const Path &link_path, const Node &target, const property::ObjectCopyList &ocpl=property::ObjectCopyList(), const property::LinkCreationList &lcpl=property::LinkCreationList()) |
copy node object More... | |
void | copy_here (const Node &target, const property::ObjectCopyList &ocpl=property::ObjectCopyList(), const property::LinkCreationList &lcpl=property::LinkCreationList()) |
copy node object More... | |
void | move_here (const Path &link_path, const Node &target, const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::LinkAccessList &lapl=property::LinkAccessList()) |
move node object More... | |
void | move_here (const Node &target, const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::LinkAccessList &lapl=property::LinkAccessList()) |
move node object More... | |
void | remove (const Path &path, const property::LinkAccessList &lapl=property::LinkAccessList()) |
remove node from group More... | |
bool | has_group (const Path &path, const property::LinkAccessList &lapl=property::LinkAccessList()) const noexcept |
reports if group has a link to a valid group at specified path More... | |
bool | has_dataset (const Path &path, const property::LinkAccessList &lapl=property::LinkAccessList()) const noexcept |
reports if group has a link to a valid dataset at specified path More... | |
Group | get_group (const Path &path, const property::LinkAccessList &lapl=property::LinkAccessList()) const |
get group More... | |
Dataset | get_dataset (const Path &path, const property::LinkAccessList &lapl=property::LinkAccessList()) const |
get dataset More... | |
Public Member Functions inherited from hdf5::node::Node | |
Node (ObjectHandle &&handle, const Link &link) | |
constructor More... | |
Node () | |
default constructor More... | |
Node (const Node &) | |
copy constructor More... | |
Node & | operator= (const Node &node) |
copy assignment More... | |
virtual | ~Node () |
destructor More... | |
NodeType | type () const |
return the node type More... | |
ObjectId | id () const |
get unique ID More... | |
operator hid_t () const | |
bool | is_valid () const |
true if an object is valid More... | |
void | close () |
close the node More... | |
const Link & | link () const |
return link to object More... | |
Public Attributes | |
LinkView | links |
NodeView | nodes |
Public Attributes inherited from hdf5::node::Node | |
attribute::AttributeManager | attributes |
access to the attribute manager More... | |
hdf5::node::Group::Group | ( | ) |
Does nothing else than calling the default constructor of Node and leaves in valid HDF5 object.
hdf5::node::Group::Group | ( | const Group & | group | ) |
hdf5::node::Group::Group | ( | const Node & | node | ) |
hdf5::node::Group::Group | ( | const Group & | parent, |
const Path & | path, | ||
const property::LinkCreationList & | lcpl = property::LinkCreationList() , |
||
const property::GroupCreationList & | gcpl = property::GroupCreationList() , |
||
const property::GroupAccessList & | gapl = property::GroupAccessList() |
||
) |
parent | reference to the parent group of the new group |
path | the path to the new group |
lcpl | reference to the link creation property list |
gcpl | reference to the group creation property list |
gapl | reference to the group access property list |
|
inlineoverridevirtual |
void hdf5::node::Group::copy_here | ( | const Node & | target, |
const property::ObjectCopyList & | ocpl = property::ObjectCopyList() , |
||
const property::LinkCreationList & | lcpl = property::LinkCreationList() |
||
) |
Copy target
object to a new location under this Group using the original object's name. If an object of same name already exists an exception will be thrown.
The copy operation should also work across file boundaries. In all cases the source object as well as the destination group must exist.
target | object to be copied |
ocpl | optional object copy property list |
lcpl | optional link creation property list |
std::runtime_error | in case of a failure |
void hdf5::node::Group::copy_here | ( | const Path & | link_path, |
const Node & | target, | ||
const property::ObjectCopyList & | ocpl = property::ObjectCopyList() , |
||
const property::LinkCreationList & | lcpl = property::LinkCreationList() |
||
) |
Copy target
object to a new link_path
within this Group. If an object of same name already exists an exception will be thrown.
The copy operation should also work across file boundaries. In all cases the source object as well as the destination group must exist.
link_path | the destination relative path under the this group |
target | object to be copied |
ocpl | optional object copy property list |
lcpl | optional link creation property list |
std::runtime_error | in case of a failure |
Dataset hdf5::node::Group::create_dataset | ( | const std::string & | name, |
const datatype::Datatype & | type, | ||
const dataspace::Dataspace & | space, | ||
const property::DatasetCreationList & | dcpl = property::DatasetCreationList() , |
||
const property::LinkCreationList & | lcpl = property::LinkCreationList() , |
||
const property::DatasetAccessList & | dapl = property::DatasetAccessList() |
||
) | const |
Group hdf5::node::Group::create_group | ( | const std::string & | name, |
const property::LinkCreationList & | lcpl = property::LinkCreationList() , |
||
const property::GroupCreationList & | gcpl = property::GroupCreationList() , |
||
const property::GroupAccessList & | gapl = property::GroupAccessList() |
||
) | const |
void hdf5::node::Group::create_link | ( | const Path & | link_path, |
const fs::path & | target_file, | ||
const Path & | target_path, | ||
const property::LinkCreationList & | lcpl = property::LinkCreationList() , |
||
const property::LinkAccessList & | lapl = property::LinkAccessList() |
||
) |
Create an external link to an object stored in a different file. The target object is determined by the target file and an absolute path within this file. If link_path is a relative path the new link will be relative to the link_base group. Otherwise link_base is only used to determine the root group (and thus the file within which the link is placed).
std::runtime_error | in case of a failure |
link_path | absolute or relative path to the new link |
target_file | the file where the link target is stored |
target_path | absolute path to the object which we want to reference in the target file |
lcpl | optional link creation property list |
lapl | optional link access property list |
target_path
must be an absolute path void hdf5::node::Group::create_link | ( | const Path & | link_path, |
const Node & | target, | ||
const property::LinkCreationList & | lcpl = property::LinkCreationList() , |
||
const property::LinkAccessList & | lapl = property::LinkAccessList() |
||
) |
Create a link from link_path
to target
object. A soft link will be created if group and target_base
reside in the same file. Otherwise an external link is created.
The target for the link is determined by target_base
and target_path
. If the latter one is a relative path the target location is assumed relative to target_base
. If it is an absolute path, target_base
is used to retrieve the root group of the specific file.
link_path | path to the new link (either relative or absolute) |
target | the target node |
lcpl | optional link creation property list |
lapl | optional link access property list |
void hdf5::node::Group::create_link | ( | const Path & | link_path, |
const Path & | target_path, | ||
const property::LinkCreationList & | lcpl = property::LinkCreationList() , |
||
const property::LinkAccessList & | lapl = property::LinkAccessList() |
||
) |
Create a soft link to an object stored in the same file. If link_path is a relative path the new link will be relative to the link_base group.
std::runtime_error | in case of a failure |
link_path | absolute or relative path to the new link |
target_path | absolute path to the object which we want to reference in the target file |
lcpl | optional link creation property list |
lapl | optional link access property list |
target_path
must be an absolute path bool hdf5::node::Group::exists | ( | const std::string & | name, |
const property::LinkAccessList & | lapl = property::LinkAccessList() |
||
) | const |
The name must be a valid link and valid child name. This function checks whether a link of a particular name exists and can be resolved into an object.
void hdf5::node::Group::flush | ( | ) | const |
std::runtime_error | in case of a failure) |
Dataset hdf5::node::Group::get_dataset | ( | const Path & | path, |
const property::LinkAccessList & | lapl = property::LinkAccessList() |
||
) | const |
A convenience function for get_node. Returns a Dataset instance if the node referenced by path
is a dataset, otherwise throws an exception. Use this function whenever you want to work with a Dataset temporarily.
For instance
std::runtime_error | in case of a failure |
path | path to dataset |
lapl | optional link access property list |
Group hdf5::node::Group::get_group | ( | const Path & | path, |
const property::LinkAccessList & | lapl = property::LinkAccessList() |
||
) | const |
A convenience function for get_node. Returns a Group instance if the node referenced by path
is a group, otherwise throws an exception. Use this function whenever you want to work with a Group temporarily.
For instance
std::runtime_error | in case of a failure |
path | path to group |
lapl | optional link access property list |
|
noexcept |
path | path to dataset |
lapl | optional link access property list |
|
noexcept |
path | path to group |
lapl | optional link access property list |
|
inlinenoexcept |
Return a const reference to the iterator configuration of the gruop.
|
inlinenoexcept |
Return a non-const reference to the iterator configuration for the group.
void hdf5::node::Group::move_here | ( | const Node & | target, |
const property::LinkCreationList & | lcpl = property::LinkCreationList() , |
||
const property::LinkAccessList & | lapl = property::LinkAccessList() |
||
) |
Move target
object to a new location under this Group using the original object's name. If an object of same name already exists an exception will be thrown.
target | object to be moved |
lcpl | optional link creation property list |
lapl | optional link access property list |
std::runtime_error | in case of a failure |
void hdf5::node::Group::move_here | ( | const Path & | link_path, |
const Node & | target, | ||
const property::LinkCreationList & | lcpl = property::LinkCreationList() , |
||
const property::LinkAccessList & | lapl = property::LinkAccessList() |
||
) |
Move target
object to a new link_path
under this Group. If an object of same name already exists an exception will be thrown.
link_path | the destination relative path under the this group |
target | object to be moved |
lcpl | optional link creation property list |
lapl | optional link access property list |
std::runtime_error | in case of a failure |
Retrieves node from group at specified path
. Path can be relative or absolute.
path | path to node |
std::runtime_error | in case of a failure |
void hdf5::node::Group::remove | ( | const Path & | path, |
const property::LinkAccessList & | lapl = property::LinkAccessList() |
||
) |
Remove link at path
within this Group.
std::runtime_error | in case of a failure |
path | path of object to remove |
lapl | optional link access property list |
LinkView hdf5::node::Group::links |
NodeView hdf5::node::Group::nodes |