h5cpp  0.5.1
A modern C++ wrapper for the HDF5 C library
iterator_config.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/core/hdf5_capi.hpp>
28 #include <type_traits>
29 #include <iostream>
30 #include <h5cpp/core/windows.hpp>
32 
33 namespace hdf5 {
34 
41 enum class IterationOrder : std::underlying_type<H5_iter_order_t>::type
42 {
43  Increasing = H5_ITER_INC,
44  Decreasing = H5_ITER_DEC,
45  Native = H5_ITER_NATIVE
46 };
47 
51 DLL_EXPORT std::ostream &operator<<(std::ostream &stream,const IterationOrder &order);
52 
56 enum class IterationIndex : std::underlying_type<H5_index_t>::type
57 {
59  Name = H5_INDEX_NAME,
60  CreationOrder = H5_INDEX_CRT_ORDER
61 };
62 
63 DLL_EXPORT std::ostream &operator<<(std::ostream &stream,const IterationIndex &index);
64 
72 {
73  public:
78 
84  IteratorConfig(const IteratorConfig &) = default;
85 
89  IterationOrder order() const noexcept;
90 
94  void order(IterationOrder o) noexcept;
95 
99  IterationIndex index() const noexcept;
100 
104  void index(IterationIndex i) noexcept;
105 
106  const property::LinkAccessList &link_access_list() const noexcept;
107  void link_access_list(const property::LinkAccessList &list);
108 
109  private:
110  IterationOrder order_;
111  IterationIndex index_;
112  property::LinkAccessList lapl_;
113 
114 };
115 
116 } // namespace hdf5
iterator configuration
Definition: iterator_config.hpp:72
IteratorConfig(const IteratorConfig &)=default
copy constructor
IterationOrder order() const noexcept
get the current iteration order
IteratorConfig()
default constructor
top-level namespace of the entire library
Definition: attribute.hpp:45
IterationIndex
iteration index
Definition: iterator_config.hpp:57
@ Name
using the name as index
@ CreationOrder
using creation time as index
IterationOrder
Definition: iterator_config.hpp:42
@ Decreasing
iteration in decreasing index order
@ Native
iteration in native index order
@ Increasing
iteration in increasing index order
std::ostream & operator<<(std::ostream &stream, const IterationOrder &order)
ouput stream for iteration order enumeration
#define DLL_EXPORT
Definition: windows.hpp:29