H5DataSpace.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 H5DATASPACE_HPP
10 #define H5DATASPACE_HPP
11 
12 #include <vector>
13 #include <array>
14 #include <cstdint>
15 #include <type_traits>
16 #include <initializer_list>
17 
18 #ifdef H5_USE_BOOST
19 #include <boost/multi_array.hpp>
20 #include <boost/numeric/ublas/matrix.hpp>
21 #endif
22 
23 #include "H5Object.hpp"
24 
25 namespace HighFive {
26 
27 class File;
28 class DataSet;
29 
30 class DataSpace : public Object {
31  public:
32 
33  static const size_t UNLIMITED = SIZE_MAX;
34 
39  // simple dataspace are handle directly from their dimensions
40  };
41 
47  explicit DataSpace(const std::vector<size_t>& dims);
48 
52  explicit DataSpace(std::initializer_list<size_t> items);
53 
56  template<typename... Args>
57  explicit DataSpace(size_t dim1, Args... dims);
58 
62  template <typename IT, typename = typename std::enable_if<!std::is_integral<IT>::value,IT>::type>
63  DataSpace(const IT begin,
64  const IT end);
65 
69  explicit DataSpace(const std::vector<size_t>& dims,
70  const std::vector<size_t>& maxdims);
71 
75  explicit DataSpace(DataspaceType dtype);
76 
79  DataSpace clone() const;
80 
85  size_t getNumberDimensions() const;
86 
90  std::vector<size_t> getDimensions() const;
91 
95  std::vector<size_t> getMaxDimensions() const;
96 
100  template <typename ScalarValue>
101  static DataSpace From(const ScalarValue& scalar_value);
102 
108  template <typename Value>
109  static DataSpace From(const std::vector<Value>& vec);
110 
113  template <typename Value, std::size_t N>
114  static DataSpace From(const std::array<Value, N>&);
115 
116 
117 #ifdef H5_USE_BOOST
118  template <typename Value, std::size_t Dims>
119  static DataSpace From(const boost::multi_array<Value, Dims>& container);
120 
121  template <typename Value>
122  static DataSpace From(const boost::numeric::ublas::matrix<Value>& mat);
123 #endif
124 
125  protected:
126  explicit DataSpace();
127 
128  friend class Attribute;
129  friend class File;
130  friend class DataSet;
131 };
132 }
133 
134 #include "bits/H5Dataspace_misc.hpp"
135 
136 #endif // H5DATASPACE_HPP
HighFive::DataSpace::DataspaceType
DataspaceType
dataspace type
Definition: H5DataSpace.hpp:36
H5Object.hpp
HighFive::DataSpace::UNLIMITED
static const size_t UNLIMITED
Definition: H5DataSpace.hpp:33
HighFive::DataSpace::getDimensions
std::vector< size_t > getDimensions() const
getDimensions
Definition: H5Dataspace_misc.hpp:104
HighFive::DataSpace::datascape_null
@ datascape_null
Definition: H5DataSpace.hpp:38
H5Dataspace_misc.hpp
HighFive::DataSpace::From
static DataSpace From(const ScalarValue &scalar_value)
Definition: H5Dataspace_misc.hpp:130
HighFive::Object
Definition: H5Object.hpp:21
HighFive::DataSpace::DataSpace
DataSpace()
Definition: H5Dataspace_misc.hpp:85
HighFive::DataSpace::getMaxDimensions
std::vector< size_t > getMaxDimensions() const
getMaxDimensions
Definition: H5Dataspace_misc.hpp:116
HighFive::File
File class.
Definition: H5File.hpp:25
HighFive::Attribute
Definition: H5Attribute.hpp:23
HighFive::DataSpace::datascape_scalar
@ datascape_scalar
Definition: H5DataSpace.hpp:37
HighFive::DataSpace
Definition: H5DataSpace.hpp:30
HighFive::DataSpace::clone
DataSpace clone() const
Definition: H5Dataspace_misc.hpp:87
HighFive::DataSpace::getNumberDimensions
size_t getNumberDimensions() const
getNumberDimensions
Definition: H5Dataspace_misc.hpp:95
HighFive::DataSet
Definition: H5DataSet.hpp:27
HighFive
Definition: H5Annotate_traits.hpp:14


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23