HighFive 2.9.0
HighFive - Header-only C++ HDF5 interface
Loading...
Searching...
No Matches
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#pragma once
10
11namespace HighFive {
12
13inline Selection::Selection(const DataSpace& memspace,
14 const DataSpace& file_space,
15 const DataSet& set)
16 : _mem_space(memspace)
17 , _file_space(file_space)
18 , _set(set) {}
19
20inline DataSpace Selection::getSpace() const noexcept {
21 return _file_space;
22}
23
24inline DataSpace Selection::getMemSpace() const noexcept {
25 return _mem_space;
26}
27
28inline DataSet& Selection::getDataset() noexcept {
29 return _set;
30}
31
32inline const DataSet& Selection::getDataset() const noexcept {
33 return _set;
34}
35
36// Not only a shortcut but also for templated compat with H5Dataset
37inline const DataType Selection::getDataType() const {
38 return _set.getDataType();
39}
40
41namespace detail {
42inline Selection make_selection(const DataSpace& mem_space,
43 const DataSpace& file_space,
44 const DataSet& set) {
45 return Selection(mem_space, file_space, set);
46}
47} // namespace detail
48
49} // namespace HighFive
Class representing a dataset.
Definition H5DataSet.hpp:30
DataType getDataType() const
getDataType
Definition H5DataSet_misc.hpp:28
Class representing the space (dimensions) of a DataSet.
Definition H5DataSpace.hpp:31
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 H5_definitions.hpp:22