h5gt 0.2.0
C++ wrapper for HDF5 library (based on HighFive project)
Loading...
Searching...
No Matches
H5Selection.hpp
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 H5SELECTION_HPP
10#define H5SELECTION_HPP
11
12#include "H5DataSet.hpp"
13#include "H5DataSpace.hpp"
14#include "bits/H5Slice_traits.hpp"
15
16namespace h5gt {
17
23class Selection : public SliceTraits<Selection> {
24public:
27 explicit Selection(const DataSpace& space) : _file_space(space) {}
28
32 DataSpace getSpace() const noexcept;
33
38 DataSpace getMemSpace() const noexcept;
39
43 DataSet& getDataset() noexcept;
44 const DataSet& getDataset() const noexcept;
45
49 const DataType getDataType() const;
50
51private:
52 Selection(const DataSpace& memspace,
53 const DataSpace& file_space,
54 const DataSet& set);
55
56 DataSpace _mem_space, _file_space;
57 DataSet _set;
58
59 template <typename Derivate> friend class ::h5gt::SliceTraits;
60 // absolute namespace naming due to GCC bug 52625
61};
62
63} // namespace h5gt
64
65#endif // H5SELECTION_HPP
Class representing a dataset.
Definition H5DataSet.hpp:28
Class representing the space (dimensions) of a dataset.
Definition H5DataSpace.hpp:37
HDF5 Data Type.
Definition H5DataType.hpp:48
Selection: represent a view on a slice/part of a dataset.
Definition H5Selection.hpp:23
DataSpace getSpace() const noexcept
getSpace
Definition H5Selection_misc.hpp:20
const DataType getDataType() const
return the datatype of the selection
Definition H5Selection_misc.hpp:37
DataSet & getDataset() noexcept
getDataSet
Definition H5Selection_misc.hpp:28
Selection(const DataSpace &space)
public constructor is needed to create virtual datasets
Definition H5Selection.hpp:27
DataSpace getMemSpace() const noexcept
getMemSpace
Definition H5Selection_misc.hpp:24
Definition H5Slice_traits.hpp:54