h5cpp  0.5.0
A modern C++ wrapper for the HDF5 C library
type.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 // Authors:
23 // Eugen Wintersberger <eugen.wintersberger@desy.de>
24 // Martin Shetty <martin.shetty@esss.se>
25 // Created on: Aug 24, 2017
26 //
27 #pragma once
28 
29 #include <iostream>
30 #include <type_traits>
31 #include <h5cpp/core/hdf5_capi.hpp>
32 #include <h5cpp/core/windows.hpp>
33 
34 namespace hdf5 {
35 namespace dataspace {
36 
43 enum class Type : std::underlying_type<H5S_class_t>::type {
47  Scalar = H5S_SCALAR,
48 
52  Simple = H5S_SIMPLE,
53 
59  NoData = H5S_NULL
60 };
61 
62 DLL_EXPORT std::ostream &operator<<(std::ostream &stream, const Type &t);
63 
71 enum class SelectionType : std::underlying_type<H5S_sel_type>::type {
75  None = H5S_SEL_NONE,
79  Points = H5S_SEL_POINTS,
83  Hyperslab = H5S_SEL_HYPERSLABS,
87  All = H5S_SEL_ALL
88 };
89 
90 DLL_EXPORT std::ostream &operator<<(std::ostream &stream, const SelectionType &t);
91 
95 enum class SelectionOperation : std::underlying_type<H5S_seloper_t>::type {
99  Set = H5S_SELECT_SET,
104  Or = H5S_SELECT_OR,
109  And = H5S_SELECT_AND,
114  XOr = H5S_SELECT_XOR,
119  NotB = H5S_SELECT_NOTB,
124  NotA = H5S_SELECT_NOTA,
129  Append = H5S_SELECT_APPEND,
134  Prepend = H5S_SELECT_PREPEND
135 };
136 
137 DLL_EXPORT std::ostream &operator<<(std::ostream &stream, const SelectionOperation &o);
138 
139 } // namespace dataspace
140 } // namespace hdf5
hdf5::dataspace::SelectionOperation::And
@ And
hdf5::dataspace::Type
Type
Definition: type.hpp:43
hdf5::dataspace::SelectionOperation::XOr
@ XOr
hdf5::dataspace::Scalar
scalar dataspace
Definition: scalar.hpp:44
hdf5::dataspace::SelectionOperation::Or
@ Or
hdf5::dataspace::SelectionOperation::NotA
@ NotA
hdf5::dataspace::SelectionOperation::Set
@ Set
windows.hpp
hdf5::dataspace::Simple
simple multidimensional dataspace
Definition: simple.hpp:43
hdf5::dataspace::Type::NoData
@ NoData
hdf5::dataspace::SelectionOperation
SelectionOperation
selection operator
Definition: type.hpp:95
hdf5::dataspace::Points
point selection implementation
Definition: points.hpp:41
hdf5::dataspace::operator<<
std::ostream & operator<<(std::ostream &stream, const Type &t)
hdf5::dataspace::SelectionType::None
@ None
hdf5::dataspace::SelectionType
SelectionType
selection type
Definition: type.hpp:71
DLL_EXPORT
#define DLL_EXPORT
Definition: windows.hpp:29
hdf5::dataspace::SelectionOperation::NotB
@ NotB
hdf5::dataspace::SelectionOperation::Append
@ Append
hdf5::dataspace::SelectionType::All
@ All
hdf5::dataspace::Hyperslab
hyperslab selection class
Definition: hyperslab.hpp:52
hdf5_capi.hpp
hdf5::dataspace::SelectionOperation::Prepend
@ Prepend
hdf5
top-level namespace of the entire library
Definition: attribute.hpp:45