h5cpp  0.3.3
A modern C++ wrapper for the HDF5 C library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
group.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 // Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
23 // Author: Martin Shetty <martin.shetty@esss.se>
24 // Created on: Aug 24, 2017
25 //
26 #pragma once
27 
28 #include <h5cpp/node/node.hpp>
29 #include <h5cpp/node/link_view.hpp>
30 #include <h5cpp/node/node_view.hpp>
31 #include <h5cpp/node/dataset.hpp>
41 
42 
43 namespace hdf5 {
44 namespace node {
45 
46 class DLL_EXPORT Group : public Node
47 {
48  public:
51 
58  Group();
59 
63  Group(const Group &group);
64 
72  Group(const Node &node);
73 
83  Group(const Group &parent,const Path &path,
87 
91  Group &operator=(const Group &group);
92 
96  void flush() const;
97 
105  {
106  return iter_config_;
107  }
108 
115  const IteratorConfig &iterator_config() const noexcept
116  {
117  return iter_config_;
118  }
119 
127  bool exists(const std::string &name,
128  const property::LinkAccessList &lapl = property::LinkAccessList()) const;
129 
130 
134  Group create_group(const std::string &name,
138 
142  Dataset create_dataset(const std::string &name,
143  const datatype::Datatype &type,
144  const dataspace::Dataspace &space,
148  ) const;
149 
150 
160  Node operator[](const Path &path) const;
161 
183  void create_link(const Path &link_path,
184  const boost::filesystem::path &target_file,
185  const Path &target_path,
188 
206  void create_link(const Path &link_path,
207  const Path &target_path,
210 
228  void create_link(const Path &link_path,
229  const Node &target,
232 
248  void copy_here(const Path &link_path,
249  const Node &target,
252 
267  void copy_here(const Node &target,
270 
285  void move_here(const Path &link_path,
286  const Node &target,
289 
301  void move_here(const Node &target,
304 
316  void remove(const Path &path,
318 
319 
327  bool has_group(const Path &path,
328  const property::LinkAccessList &lapl = property::LinkAccessList()) const noexcept;
329 
337  bool has_dataset(const Path &path,
338  const property::LinkAccessList &lapl = property::LinkAccessList()) const noexcept;
339 
340 
364  Group get_group(const Path &path,
365  const property::LinkAccessList &lapl = property::LinkAccessList()) const;
366 
387  Dataset get_dataset(const Path &path,
388  const property::LinkAccessList &lapl = property::LinkAccessList()) const;
389 
390 
391  private:
392  IteratorConfig iter_config_;
393 
394 };
395 
396 
397 
398 } // namespace node
399 } // namespace hdf5
DLL_EXPORT Group get_group(const Group &base, const Path &path, const property::LinkAccessList &lapl=property::LinkAccessList())
get group
Definition: node_view.hpp:38
dataspace base class
Definition: dataspace.hpp:41
Definition: link_creation.hpp:35
Definition: group_access.hpp:35
Definition: link_view.hpp:36
Definition: dataset.hpp:49
NodeView nodes
Definition: group.hpp:50
Definition: group.hpp:46
iterator configuration
Definition: iterator_config.hpp:72
LinkView links
Definition: group.hpp:49
dataset creation property list
Definition: dataset_creation.hpp:110
dataset access property list
Definition: dataset_access.hpp:73
const IteratorConfig & iterator_config() const noexcept
get reference to the interator configuration
Definition: group.hpp:115
IteratorConfig & iterator_config() noexcept
get reference to the iterator configuration
Definition: group.hpp:104
Definition: attribute.hpp:43
Definition: node.hpp:39
Definition: group_creation.hpp:36
Definition: object_copy.hpp:175
path to a node object
Definition: path.hpp:49
#define DLL_EXPORT
Definition: windows.hpp:35
DLL_EXPORT Dataset get_dataset(const Group &base, const Path &path, const property::LinkAccessList &lapl=property::LinkAccessList())
get dataset
link access property list
Definition: link_access.hpp:39
base class for all data types
Definition: datatype.hpp:41