h5cpp  0.6.0
A modern C++ wrapper for the HDF5 C library
dataspace.hpp
Go to the documentation of this file.
1 //
2 // (c) Copyright 2017 DESY,ESS
3 //
4 // This file is part of h5cpp.
5 //
6 // This library is free software; you can redistribute it and/or modify it
7 // under the terms of the GNU Lesser General Public License as published
8 // by the Free Software Foundation; either version 2.1 of the License, or
9 // (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY
13 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 // License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public License
17 // along with this library; if not, write to the
18 // Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
19 // Boston, MA 02110-1301 USA
20 // ===========================================================================
21 //
22 // Authors:
23 // Eugen Wintersberger <eugen.wintersberger@desy.de>
24 // Martin Shetty <martin.shetty@esss.se>
25 // Created on: Aug 24, 2017
26 //
27 #pragma once
28 
29 #include <h5cpp/dataspace/type.hpp>
31 #include <h5cpp/core/types.hpp>
33 #include <h5cpp/core/windows.hpp>
34 
35 namespace hdf5 {
36 namespace dataspace {
37 
42  public:
48  virtual ~Dataspace();
49 
60 
70 
76  Dataspace(Dataspace &&type) = default;
77 
81  Dataspace(const Dataspace &space);
82 
86  Dataspace &operator=(const Dataspace &space);
87 
93  virtual hssize_t size() const;
94 
106  explicit operator hid_t() const {
107  return static_cast<hid_t>(handle_);
108  }
109 
115  Type type() const;
116 
134  bool is_valid() const;
135 
145 
146  protected:
148  private:
149  ObjectHandle handle_;
150 
154  void swap(const Dataspace &space);
155 
156 };
157 
158 } // namespace dataspace
159 } // namespace hdf5
Wrapper for hid_t object identifiers.
Definition: object_handle.hpp:67
dataspace base class
Definition: dataspace.hpp:41
SelectionManager selection
access to selection manager
Definition: dataspace.hpp:144
Type type() const
get the type of the dataspace
virtual hssize_t size() const
number of elements in the dataspace
Dataspace(ObjectHandle &&handle)
constructor
bool is_valid() const
check validity of the dataspace
virtual ~Dataspace()
destructor
Dataspace()
default constructor
Dataspace(Dataspace &&type)=default
move constructor
Dataspace(const Dataspace &space)
copy constructor
Dataspace & operator=(const Dataspace &space)
copy assignment
interface for selection management
Definition: selection_manager.hpp:46
Type
Definition: type.hpp:43
top-level namespace of the entire library
Definition: attribute.hpp:45
#define DLL_EXPORT
Definition: windows.hpp:29