h5cpp
0.5.0
A modern C++ wrapper for the HDF5 C library
link_iterator.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 13, 2017
24
//
25
#pragma once
26
27
#include <functional>
28
#include <
h5cpp/core/iterator.hpp
>
29
#include <
h5cpp/node/link_view.hpp
>
30
#include <
h5cpp/node/link.hpp
>
31
#include <
h5cpp/core/windows.hpp
>
32
#include <
h5cpp/node/group.hpp
>
33
34
namespace
hdf5
{
35
namespace
node {
36
37
#ifdef __clang__
38
#pragma clang diagnostic push
39
#pragma clang diagnostic ignored "-Wweak-vtables"
40
#endif
41
class
DLL_EXPORT
LinkIterator
:
public
Iterator
42
{
43
public
:
44
using
value_type
=
Link
;
45
using
pointer
=
value_type
*;
46
using
reference
=
value_type
&;
47
using
difference_type
= ssize_t;
48
using
iterator_category
= std::bidirectional_iterator_tag;
49
50
LinkIterator
() =
delete
;
51
52
static
LinkIterator
begin(
const
Group
&group);
53
static
LinkIterator
end(
const
Group
&group);
54
55
value_type
operator*()
const
;
56
value_type
*operator->();
57
LinkIterator
&operator++();
58
LinkIterator
operator++(
int
);
59
LinkIterator
&operator--();
60
LinkIterator
operator--(
int
);
61
62
bool
operator==
(
const
LinkIterator
&a)
const
;
63
bool
operator!=
(
const
LinkIterator
&a)
const
;
64
65
private
:
66
LinkIterator
(
const
Group
&group,ssize_t index);
67
#ifdef _MSC_VER
68
#pragma warning(push)
69
#pragma warning(disable: 4251)
70
#endif
71
Group
group_;
72
#ifdef _MSC_VER
73
#pragma warning(pop)
74
#endif
75
mutable
Link
current_link_;
76
77
};
78
#ifdef __clang__
79
#pragma clang diagnostic pop
80
#endif
81
82
}
// namespace node
83
}
// namespace hdf5
hdf5::Iterator
Definition:
iterator.hpp:32
iterator.hpp
group.hpp
hdf5::node::Group
Definition:
group.hpp:50
windows.hpp
hdf5::node::LinkIterator::iterator_category
std::bidirectional_iterator_tag iterator_category
Definition:
link_iterator.hpp:48
hdf5::node::LinkIterator
Definition:
link_iterator.hpp:41
link_view.hpp
hdf5::node::operator!=
bool operator!=(const Link &lhs, const Link &rhs)
hdf5::node::Link
an HDF5 link
Definition:
link.hpp:113
link.hpp
DLL_EXPORT
#define DLL_EXPORT
Definition:
windows.hpp:29
hdf5::node::LinkIterator::difference_type
ssize_t difference_type
Definition:
link_iterator.hpp:47
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_iterator.hpp
Generated on Mon May 2 2022 08:20:20 for h5cpp by
1.8.17