h5cpp  0.5.0
A modern C++ wrapper for the HDF5 C library
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 #ifdef __clang__
47 #pragma clang diagnostic push
48 #pragma clang diagnostic ignored "-Wweak-vtables"
49 #endif
50 class DLL_EXPORT Group : public Node
51 {
52  public:
55 
62  Group();
63 
67  Group(const Group &group);
68 
76  Group(const Node &node);
77 
87  Group(const Group &parent,const Path &path,
91 
92  virtual ~Group() override {}
93 
97  Group &operator=(const Group &group);
98 
99 #if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,0))
100  void flush() const;
106 #endif
107 
115  {
116  return iter_config_;
117  }
118 
125  const IteratorConfig &iterator_config() const noexcept
126  {
127  return iter_config_;
128  }
129 
137  bool exists(const std::string &name,
138  const property::LinkAccessList &lapl = property::LinkAccessList()) const;
139 
140 
144  Group create_group(const std::string &name,
148 
152  Dataset create_dataset(const std::string &name,
153  const datatype::Datatype &type,
154  const dataspace::Dataspace &space,
158  ) const;
159 
160 
170  Node operator[](const Path &path) const;
171 
193  void create_link(const Path &link_path,
194  const fs::path &target_file,
195  const Path &target_path,
198 
215  void create_link(const Path &link_path,
216  const Path &target_path,
219 
237  void create_link(const Path &link_path,
238  const Node &target,
241 
257  void copy_here(const Path &link_path,
258  const Node &target,
261 
276  void copy_here(const Node &target,
279 
294  void move_here(const Path &link_path,
295  const Node &target,
298 
310  void move_here(const Node &target,
313 
325  void remove(const Path &path,
327 
328 
336  bool has_group(const Path &path,
337  const property::LinkAccessList &lapl = property::LinkAccessList()) const noexcept;
338 
346  bool has_dataset(const Path &path,
347  const property::LinkAccessList &lapl = property::LinkAccessList()) const noexcept;
348 
349 
373  Group get_group(const Path &path,
374  const property::LinkAccessList &lapl = property::LinkAccessList()) const;
375 
396  Dataset get_dataset(const Path &path,
397  const property::LinkAccessList &lapl = property::LinkAccessList()) const;
398 
399 
400  private:
401  IteratorConfig iter_config_;
402 
403 };
404 #ifdef __clang__
405 #pragma clang diagnostic pop
406 #endif
407 
408 
409 } // namespace node
410 } // namespace hdf5
object_copy.hpp
hdf5::node::NodeView
Definition: node_view.hpp:38
hdf5::property::LinkAccessList
link access property list
Definition: link_access.hpp:43
hdf5::property::GroupCreationList
Definition: group_creation.hpp:36
dataset.hpp
node.hpp
hdf5::node::Group::iterator_config
const IteratorConfig & iterator_config() const noexcept
get reference to the interator configuration
Definition: group.hpp:125
hdf5::node::Group::~Group
virtual ~Group() override
Definition: group.hpp:92
datatype.hpp
hdf5::node::Node
Definition: node.hpp:39
hdf5::node::get_group
Group get_group(const Group &base, const Path &path, const property::LinkAccessList &lapl=property::LinkAccessList())
get group
hdf5::property::LinkCreationList
Definition: link_creation.hpp:35
node_view.hpp
hdf5::node::Group
Definition: group.hpp:50
hdf5::node::LinkView
Definition: link_view.hpp:40
hdf5::IteratorConfig
iterator configuration
Definition: iterator_config.hpp:71
hdf5::node::Dataset
Definition: dataset.hpp:59
hdf5::node::remove
void remove(const Group &base, const Path &object_path, const property::LinkAccessList &lapl=property::LinkAccessList())
remove node from group
hdf5::property::DatasetCreationList
dataset creation property list
Definition: dataset_creation.hpp:111
dataset_access.hpp
hdf5::property::ObjectCopyList
Definition: object_copy.hpp:207
group_access.hpp
hdf5::property::DatasetAccessList
dataset access property list
Definition: dataset_access.hpp:76
DLL_EXPORT
#define DLL_EXPORT
Definition: windows.hpp:29
hdf5::dataspace::Dataspace
dataspace base class
Definition: dataspace.hpp:41
group_creation.hpp
hdf5::node::Group::nodes
NodeView nodes
Definition: group.hpp:54
dataset_creation.hpp
iterator_config.hpp
dataspace.hpp
hdf5::property::GroupAccessList
Definition: group_access.hpp:35
hdf5::node::Group::iterator_config
IteratorConfig & iterator_config() noexcept
get reference to the iterator configuration
Definition: group.hpp:114
hdf5::node::Group::links
LinkView links
Definition: group.hpp:53
hdf5::Path
path to a node object
Definition: path.hpp:53
hdf5::datatype::Datatype
base class for all data types
Definition: datatype.hpp:41
hdf5
top-level namespace of the entire library
Definition: attribute.hpp:45
hdf5::node::get_dataset
Dataset get_dataset(const Group &base, const Path &path, const property::LinkAccessList &lapl=property::LinkAccessList())
get dataset