echelon  0.8.0
dimension_scale.hpp
1 // Copyright (c) 2013-2014 Christopher Hinz
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 #ifndef ECHELON_DIMENSION_SCALE_HPP
7 #define ECHELON_DIMENSION_SCALE_HPP
8 
9 #include <echelon/hdf5/dimension_scale.hpp>
10 
11 #include <string>
12 
13 namespace echelon
14 {
15 
16 class dataset;
17 class type;
18 
22 {
23 public:
27 
28  explicit dimension_scale(hdf5::dimension_scale native_handle_);
29 
32  std::vector<hsize_t> shape() const;
33 
44  template <typename T>
45  friend void operator<<=(dimension_scale& sink, const T& source)
46  {
47  sink.dim_scale_handle_ <<= source;
48  }
49 
58  template <typename T>
59  friend void operator<<=(T& sink, const dimension_scale& source)
60  {
61  sink <<= source.dim_scale_handle_;
62  }
63 
67 
68 private:
69  hdf5::dimension_scale dim_scale_handle_;
70 };
71 }
72 
73 #endif
echelon&#39;s core namespace
Definition: attribute.cpp:10
std::vector< hsize_t > shape() const
The shape of the dimension scale.
Definition: dimension_scale.cpp:18
friend void operator<<=(T &sink, const dimension_scale &source)
Reads the content of the dimension scale into a data sink.
Definition: dimension_scale.hpp:59
friend void operator<<=(dimension_scale &sink, const T &source)
Writes the content of a data source into the dimension scale.
Definition: dimension_scale.hpp:45
A handle to a dimension scale.
Definition: hdf5/dimension_scale.hpp:26
native_handle_type native_handle() const
The underlying HDF5 low-level handle.
Definition: dimension_scale.cpp:23
A handle to a dimension scale.
Definition: dimension_scale.hpp:21