h5cpp
0.5.0
A modern C++ wrapper for the HDF5 C library
link.hpp
Go to the documentation of this file.
1
//
2
// (c) Copyright 2017 DESY,ESS
3
//
4
// This file is part of h5cpp.
5
//
6
// This library is free software; you can redistribute it and/or modify it
7
// under the terms of the GNU Lesser General Public License as published
8
// by the Free Software Foundation; either version 2.1 of the License, or
9
// (at your option) any later version.
10
//
11
// This library is distributed in the hope that it will be useful, but
12
// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY
13
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14
// License for more details.
15
//
16
// You should have received a copy of the GNU Lesser General Public License
17
// along with this library; if not, write to the
18
// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
19
// Boston, MA 02110-1301 USA
20
// ===========================================================================
21
//
22
// Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
23
// Created on: Sep 11, 2017
24
//
25
#pragma once
26
27
#include <
h5cpp/file/file.hpp
>
28
#include <
h5cpp/core/path.hpp
>
29
#include <
h5cpp/core/windows.hpp
>
30
#include <
h5cpp/property/link_access.hpp
>
31
#include <
h5cpp/node/types.hpp
>
32
33
namespace
hdf5
{
34
namespace
node {
35
36
class
Group
;
37
class
Node;
38
49
class
DLL_EXPORT
LinkTarget
50
{
51
public
:
55
LinkTarget
();
56
65
explicit
LinkTarget
(
const
hdf5::Path
&object_path);
66
75
explicit
LinkTarget
(
const
hdf5::Path
&object_path,
const
fs::path &file_path);
76
82
fs::path file_path()
const
;
83
89
hdf5::Path
object_path()
const
;
90
91
private
:
92
#ifdef _MSC_VER
93
#pragma warning(push)
94
#pragma warning(disable: 4251)
95
#endif
96
fs::path file_;
97
#ifdef _MSC_VER
98
#pragma warning(pop)
99
#endif
100
hdf5::Path
object_path_;
101
};
102
113
class
DLL_EXPORT
Link
114
{
115
public
:
123
Link
(
const
file::File
&file,
124
const
Path
&parent_path,
125
const
std::string &link_name);
126
132
Link
() =
default
;
133
140
Path
path()
const
;
141
146
LinkTarget
target(
const
property::LinkAccessList
&lapl =
property::LinkAccessList
())
const
;
147
148
152
LinkType
type(
const
property::LinkAccessList
&lapl =
property::LinkAccessList
())
const
;
153
159
Group
parent()
const
;
160
161
const
file::File
&file()
const
;
162
170
Node
operator*()
const
;
171
172
176
bool
exists()
const
;
177
181
bool
is_resolvable()
const
;
182
183
197
DLL_EXPORT
friend
bool
operator==
(
const
Link
&lhs,
const
Link
&rhs);
198
199
private
:
200
file::File
parent_file_;
201
Path
parent_path_;
202
#ifdef _MSC_VER
203
#pragma warning(push)
204
#pragma warning(disable: 4251)
205
#endif
206
std::string name_;
207
#ifdef _MSC_VER
208
#pragma warning(pop)
209
#endif
210
211
H5L_info_t get_link_info(
const
property::LinkAccessList
&lapl)
const
;
212
std::string get_link_value(
const
property::LinkAccessList
&lapl)
const
;
213
LinkTarget
get_soft_link_target(
const
property::LinkAccessList
&lapl)
const
;
214
LinkTarget
get_external_link_target(
const
property::LinkAccessList
&lapl)
const
;
215
};
216
217
DLL_EXPORT
bool
operator!=
(
const
Link
&lhs,
const
Link
&rhs);
218
219
DLL_EXPORT
std::ostream &
operator<<
(std::ostream &stream,
const
Link
&
link
);
220
221
}
// namespace node
222
}
// namespace hdf5
types.hpp
hdf5::property::LinkAccessList
link access property list
Definition:
link_access.hpp:43
hdf5::file::File
Definition:
file.hpp:51
hdf5::node::Node
Definition:
node.hpp:39
link_access.hpp
file.hpp
hdf5::node::Group
Definition:
group.hpp:50
windows.hpp
hdf5::node::operator!=
bool operator!=(const Link &lhs, const Link &rhs)
hdf5::node::Link
an HDF5 link
Definition:
link.hpp:113
hdf5::file::SearchFlags::Group
@ Group
hdf5::node::LinkType
LinkType
link type enumeration
Definition:
types.hpp:71
DLL_EXPORT
#define DLL_EXPORT
Definition:
windows.hpp:29
hdf5::node::operator<<
std::ostream & operator<<(std::ostream &stream, const Link &link)
path.hpp
hdf5::node::LinkTarget
link target descriptor
Definition:
link.hpp:49
hdf5::node::link
void link(const Node &target, const Group &link_base, const Path &link_path, const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::LinkAccessList &lapl=property::LinkAccessList())
Create a soft or external link.
hdf5::Path
path to a node object
Definition:
path.hpp:53
hdf5
top-level namespace of the entire library
Definition:
attribute.hpp:45
hdf5::node::operator==
bool operator==(const Node &lhs, const Node &rhs)
h5cpp
src
h5cpp
node
link.hpp
Generated on Mon May 2 2022 08:20:20 for h5cpp by
1.8.17