HighFive  2.3.1
HighFive - Header-only C++ HDF5 interface
H5Selection_misc.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 #ifndef H5SELECTION_MISC_HPP
10 #define H5SELECTION_MISC_HPP
11 
12 namespace HighFive {
13 
14 inline Selection::Selection(const DataSpace& memspace,
15  const DataSpace& file_space, const DataSet& set)
16  : _mem_space(memspace)
17  , _file_space(file_space)
18  , _set(set) {}
19 
20 inline DataSpace Selection::getSpace() const noexcept {
21  return _file_space;
22 }
23 
24 inline DataSpace Selection::getMemSpace() const noexcept {
25  return _mem_space;
26 }
27 
28 inline DataSet& Selection::getDataset() noexcept {
29  return _set;
30 }
31 
32 inline const DataSet& Selection::getDataset() const noexcept {
33  return _set;
34 }
35 
36 // Not only a shortcut but also for templated compat with H5Dataset
37 inline const DataType Selection::getDataType() const {
38  return _set.getDataType();
39 }
40 
41 } // namespace HighFive
42 
43 #endif // H5SELECTION_MISC_HPP
Class representing a dataset.
Definition: H5DataSet.hpp:31
Class representing the space (dimensions) of a dataset.
Definition: H5DataSpace.hpp:37
HDF5 Data Type.
Definition: H5DataType.hpp:42
Definition: H5_definitions.hpp:15