h5cpp  0.3.3
A modern C++ wrapper for the HDF5 C library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Friends | List of all members
hdf5::node::Link Class Reference

a link More...

#include <link.hpp>

Public Member Functions

 Link (const file::File &file, const Path &parent_path, const std::string &link_name)
 constructor More...
 
 Link ()=default
 default constructor More...
 
 Link (const Link &)=default
 copy 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::Filefile () 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

DLL_EXPORT friend bool operator== (const Link &lhs, const Link &rhs)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Link() [1/3]

hdf5::node::Link::Link ( const file::File file,
const Path parent_path,
const std::string &  link_name 
)
Parameters
filereference to the file via which the link was accessed
parent_paththe object path to the links parent

◆ Link() [2/3]

hdf5::node::Link::Link ( )
default

Leaves a link of type LinkType::ERROR.

◆ Link() [3/3]

hdf5::node::Link::Link ( const Link )
default

Member Function Documentation

◆ exists()

bool hdf5::node::Link::exists ( ) const

◆ file()

const file::File& hdf5::node::Link::file ( ) const

◆ is_resolvable()

bool hdf5::node::Link::is_resolvable ( ) const

◆ operator*()

Node hdf5::node::Link::operator* ( ) const

Return an instance to the node referenced by this particular link.

all intermediate links exist and the final link must be resolvable.

◆ parent()

Group hdf5::node::Link::parent ( ) const

Return a const reference to the parent group of the link.

◆ path()

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.

◆ target()

LinkTarget hdf5::node::Link::target ( const property::LinkAccessList lapl = property::LinkAccessList()) const

Return the path to the object which is reference by this link.

◆ type()

LinkType hdf5::node::Link::type ( const property::LinkAccessList lapl = property::LinkAccessList()) const

Friends And Related Function Documentation

◆ operator==

DLL_EXPORT friend bool operator== ( const Link lhs,
const Link rhs 
)
friend

The documentation for this class was generated from the following file: