HighFive 2.10.0
HighFive - Header-only C++ HDF5 interface
Loading...
Searching...
No Matches
H5Selection.hpp
Go to the documentation of this file.
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#pragma once
10
11#include "H5DataSet.hpp"
12#include "H5DataSpace.hpp"
14#include "bits/H5Friends.hpp"
15
16namespace HighFive {
17
18namespace detail {
19Selection make_selection(const DataSpace&, const DataSpace&, const DataSet&);
20}
21
27class Selection: public SliceTraits<Selection> {
28 public:
33 DataSpace getSpace() const noexcept;
34
40 DataSpace getMemSpace() const noexcept;
41
46 DataSet& getDataset() noexcept;
47 const DataSet& getDataset() const noexcept;
48
52 const DataType getDataType() const;
53
54 protected:
55 Selection(const DataSpace& memspace, const DataSpace& file_space, const DataSet& set);
56
57 private:
58 DataSpace _mem_space, _file_space;
59 DataSet _set;
60
61#if HIGHFIVE_HAS_FRIEND_DECLARATIONS
62 template <typename Derivate>
63 friend class ::HighFive::SliceTraits;
64#endif
65 friend Selection detail::make_selection(const DataSpace&, const DataSpace&, const DataSet&);
66};
67
68} // namespace HighFive
Class representing a dataset.
Definition H5DataSet.hpp:30
Class representing the space (dimensions) of a DataSet.
Definition H5DataSpace.hpp:39
HDF5 Data Type.
Definition H5DataType.hpp:61
Selection: represent a view on a slice/part of a dataset.
Definition H5Selection.hpp:27
DataSpace getMemSpace() const noexcept
getMemSpace
Definition H5Selection_misc.hpp:24
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 &memspace, const DataSpace &file_space, const DataSet &set)
Definition H5Selection_misc.hpp:13
DataSpace getSpace() const noexcept
getSpace
Definition H5Selection_misc.hpp:20
Definition H5Slice_traits.hpp:350
Definition H5_definitions.hpp:22