h5cpp
0.5.0
A modern C++ wrapper for the HDF5 C library
|
an HDF5 link More...
#include <link.hpp>
Public Member Functions | |
Link (const file::File &file, const Path &parent_path, const std::string &link_name) | |
Construct a new Link object. More... | |
Link ()=default | |
default constructor More... | |
Path | path () const |
get path of the link More... | |
LinkTarget | target (const property::LinkAccessList &lapl=property::LinkAccessList()) const |
path to reference object More... | |
LinkType | type (const property::LinkAccessList &lapl=property::LinkAccessList()) const |
get type of link More... | |
Group | parent () const |
get reference to parent group More... | |
const file::File & | file () const |
Node | operator* () const |
get the node that the link references More... | |
bool | exists () const |
returns true if the given link exists More... | |
bool | is_resolvable () const |
returns true if the object reference by the link exists More... | |
Friends | |
bool | operator== (const Link &lhs, const Link &rhs) |
equality operator for links More... | |
Class representing a link to an object within an HDF5 file. In order to store links in a container they have to be default constructable. A default constructed link has the type LinkType::Error. Instead of a node type only the handle to the parent is stored. Thus, the parent can also be a File which would identify the link as the link to the root group.
hdf5::node::Link::Link | ( | const file::File & | file, |
const Path & | parent_path, | ||
const std::string & | link_name | ||
) |
file | reference to the file object the link is locate in |
parent_path | path to the parent group for the link |
link_name | the name of the link |
|
default |
Leaves a link of type LinkType::Error.
bool hdf5::node::Link::exists | ( | ) | const |
const file::File& hdf5::node::Link::file | ( | ) | const |
bool hdf5::node::Link::is_resolvable | ( | ) | const |
Node hdf5::node::Link::operator* | ( | ) | const |
Return an instance to the node referenced by this particular link.
Group hdf5::node::Link::parent | ( | ) | const |
Return a const reference to the parent group of the link.
Path hdf5::node::Link::path | ( | ) | const |
Return the actual path of the link in the file. This is basically the path of the parent group with the name of the link as a top element.
LinkTarget hdf5::node::Link::target | ( | const property::LinkAccessList & | lapl = property::LinkAccessList() | ) | const |
Return the path to the object which is reference by this link.
LinkType hdf5::node::Link::type | ( | const property::LinkAccessList & | lapl = property::LinkAccessList() | ) | const |
Two links are considered equal under the following conditions
lhs | left hanside of the operator |
rhs | right handside of the operator |