h5cpp
0.5.0
A modern C++ wrapper for the HDF5 C library
creation_order.hpp
Go to the documentation of this file.
1
//
2
// (c) Copyright 2017 DESY,ESS
3
//
4
// This file is part of h5pp.
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
// Authors:
23
// Eugen Wintersberger <eugen.wintersberger@desy.de>
24
// Martin Shetty <martin.shetty@esss.se>
25
// Created on: Aug 18, 2017
26
//
27
28
#pragma once
29
30
#include <
h5cpp/core/hdf5_capi.hpp
>
31
#include <
h5cpp/core/windows.hpp
>
32
33
namespace
hdf5
{
34
namespace
property {
35
36
#ifdef __clang__
37
#pragma clang diagnostic push
38
#pragma clang diagnostic ignored "-Wpadded"
39
#endif
40
class
DLL_EXPORT
CreationOrder
{
41
public
:
45
CreationOrder
();
46
51
CreationOrder
(
const
CreationOrder
&c) =
default
;
52
57
explicit
CreationOrder
(
unsigned
value);
58
64
CreationOrder
&enable_tracked();
65
71
CreationOrder
&disable_tracked();
72
81
CreationOrder
&enable_indexed();
82
90
CreationOrder
&disable_indexed();
91
95
bool
tracked()
const
;
96
100
bool
indexed()
const
;
101
108
operator
unsigned()
const
{
109
unsigned
result = 0;
110
if
(tracked_) result |= H5P_CRT_ORDER_TRACKED;
111
112
if
(indexed_) result |= H5P_CRT_ORDER_INDEXED;
113
114
return
result;
115
116
}
117
118
private
:
119
unsigned
tracked_:1;
120
unsigned
indexed_:1;
121
#ifdef __clang__
122
#pragma clang diagnostic push
123
#pragma clang diagnostic ignored "-Wunused-private-field"
124
#endif
125
unsigned
reserved_:
sizeof
(unsigned) - 2;
126
};
127
#ifdef __clang__
128
#pragma clang diagnostic pop
129
#endif
130
131
}
// namespace property
132
}
// namespace hdf5
windows.hpp
hdf5::property::CreationOrder
Definition:
creation_order.hpp:40
DLL_EXPORT
#define DLL_EXPORT
Definition:
windows.hpp:29
hdf5_capi.hpp
hdf5
top-level namespace of the entire library
Definition:
attribute.hpp:45
h5cpp
src
h5cpp
property
creation_order.hpp
Generated on Mon May 2 2022 08:20:20 for h5cpp by
1.8.17