hops
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
Functions
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
Variables
Typedefs
b
d
e
f
m
o
p
r
s
u
v
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
~
Variables
_
a
b
c
d
e
i
l
m
n
o
p
r
s
t
u
v
w
Typedefs
b
c
e
f
h
i
m
r
s
t
u
v
Enumerations
Enumerator
Related Functions
:
a
c
d
f
h
n
o
r
s
t
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
w
Functions
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
w
Variables
Typedefs
c
d
f
n
p
Enumerations
Enumerator
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
include
hops
Third-party
HighFive
include
highfive
bits
H5Iterables_misc.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (c), 2017, Adrien Devresse <adrien.devresse@epfl.ch>
3
*
4
* Distributed under the Boost Software License, Version 1.0.
5
* (See accompanying file LICENSE_1_0.txt or copy at
6
* http://www.boost.org/LICENSE_1_0.txt)
7
*
8
*/
9
#ifndef H5ITERABLE_MISC_HPP
10
#define H5ITERABLE_MISC_HPP
11
12
#include <exception>
13
#include <string>
14
#include <vector>
15
16
#include <H5Ipublic.h>
17
18
namespace
HighFive
{
19
20
namespace
details {
21
22
// iterator for H5 iterate
23
24
struct
HighFiveIterateData
{
25
inline
HighFiveIterateData
(std::vector<std::string>& my_names)
26
:
names
(my_names),
err
(NULL) {}
27
28
std::vector<std::string>&
names
;
29
std::exception*
err
;
30
31
inline
void
throwIfError
() {
32
if
(
err
) {
33
throw
*
err
;
34
}
35
}
36
};
37
38
template
<
typename
InfoType>
39
inline
herr_t
internal_high_five_iterate
(
40
hid_t
/*id*/
,
const
char
* name,
const
InfoType*
/*info*/
,
void
* op_data) {
41
auto
* data =
static_cast<
HighFiveIterateData
*
>
(op_data);
42
try
{
43
data->
names
.emplace_back(name);
44
return
0;
45
}
catch
(...) {
46
data->err =
47
new
ObjectException
(
"Exception during H5Iterate, abort listing"
);
48
}
49
return
-1;
50
}
51
52
}
// end details
53
}
54
55
#endif // H5ITERABLE_MISC_HPP
HighFive::details::HighFiveIterateData::HighFiveIterateData
HighFiveIterateData(std::vector< std::string > &my_names)
Definition:
H5Iterables_misc.hpp:25
HighFive::details::HighFiveIterateData::err
std::exception * err
Definition:
H5Iterables_misc.hpp:29
HighFive::details::internal_high_five_iterate
herr_t internal_high_five_iterate(hid_t, const char *name, const InfoType *, void *op_data)
Definition:
H5Iterables_misc.hpp:39
HighFive::details::HighFiveIterateData
Definition:
H5Iterables_misc.hpp:24
HighFive::details::HighFiveIterateData::names
std::vector< std::string > & names
Definition:
H5Iterables_misc.hpp:28
HighFive::ObjectException
Exception specific to HighFive Object interface.
Definition:
H5Exception.hpp:75
HighFive::details::HighFiveIterateData::throwIfError
void throwIfError()
Definition:
H5Iterables_misc.hpp:31
HighFive
Definition:
H5_definitions.hpp:15
Generated by
1.8.17