h5cpp 0.7.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
32
33namespace hdf5 {
34namespace property {
35
36#ifdef __clang__
37#pragma clang diagnostic push
38#pragma clang diagnostic ignored "-Wpadded"
39#endif
41 public:
46
51 CreationOrder(const CreationOrder &c) = default;
52
57 explicit CreationOrder(unsigned value);
58
65
72
82
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
Definition: creation_order.hpp:40
CreationOrder & disable_tracked()
disable tracked creation order
CreationOrder & disable_indexed()
disable indexed creation order
CreationOrder(unsigned value)
constructor
bool tracked() const
query if tracked creation order is enabled
bool indexed() const
query if indexed creation order is enabled
CreationOrder()
default constructor
CreationOrder & enable_indexed()
enable indexed creation order
CreationOrder & enable_tracked()
enable tracked creation order
CreationOrder(const CreationOrder &c)=default
copy constructor
top-level namespace of the entire library
Definition: attribute.hpp:45
#define DLL_EXPORT
Definition: windows.hpp:29