Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 08:55:34

0001 /*
0002  *  Copyright (c), 2017, Adrien Devresse <adrien.devresse@epfl.ch>
0003  *
0004  *  Distributed under the Boost Software License, Version 1.0.
0005  *    (See accompanying file LICENSE_1_0.txt or copy at
0006  *          http://www.boost.org/LICENSE_1_0.txt)
0007  *
0008  */
0009 #pragma once
0010 
0011 namespace HighFive {
0012 
0013 inline Selection::Selection(const DataSpace& memspace,
0014                             const DataSpace& file_space,
0015                             const DataSet& set)
0016     : _mem_space(memspace)
0017     , _file_space(file_space)
0018     , _set(set) {}
0019 
0020 inline DataSpace Selection::getSpace() const noexcept {
0021     return _file_space;
0022 }
0023 
0024 inline DataSpace Selection::getMemSpace() const noexcept {
0025     return _mem_space;
0026 }
0027 
0028 inline DataSet& Selection::getDataset() noexcept {
0029     return _set;
0030 }
0031 
0032 inline const DataSet& Selection::getDataset() const noexcept {
0033     return _set;
0034 }
0035 
0036 // Not only a shortcut but also for templated compat with H5Dataset
0037 inline const DataType Selection::getDataType() const {
0038     return _set.getDataType();
0039 }
0040 
0041 namespace detail {
0042 inline Selection make_selection(const DataSpace& mem_space,
0043                                 const DataSpace& file_space,
0044                                 const DataSet& set) {
0045     return Selection(mem_space, file_space, set);
0046 }
0047 }  // namespace detail
0048 
0049 }  // namespace HighFive