H5Node_traits.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 H5NODE_TRAITS_HPP
10 #define H5NODE_TRAITS_HPP
11 
12 #include <string>
13 
14 namespace HighFive {
15 
16 class Attribute;
17 class DataSet;
18 class Group;
19 class DataSpace;
20 class DataType;
21 
22 template <typename Derivate>
23 class NodeTraits {
24  public:
35  DataSet createDataSet(const std::string& dataset_name,
36  const DataSpace& space, const DataType& type,
37  const DataSetCreateProps& createProps =
39  const DataSetAccessProps& accessProps =
41 
50  template <typename Type>
51  DataSet createDataSet(const std::string& dataset_name,
52  const DataSpace& space,
53  const DataSetCreateProps& createProps =
55  const DataSetAccessProps& accessProps =
57 
66  template <typename T>
67  DataSet createDataSet(const std::string& dataset_name,
68  const T& data,
69  const DataSetCreateProps& createProps =
71  const DataSetAccessProps& accessProps =
73 
79  DataSet getDataSet(const std::string& dataset_name,
80  const DataSetAccessProps& accessProps =
81  DataSetAccessProps()) const;
82 
87  Group createGroup(const std::string& group_name);
88 
93  Group getGroup(const std::string& group_name) const;
94 
98  size_t getNumberObjects() const;
99 
103  std::string getObjectName(size_t index) const;
104 
108  std::vector<std::string> listObjectNames() const;
109 
115  bool exist(const std::string& node_name) const;
116 
117  private:
118  typedef Derivate derivate_type;
119 };
120 }
121 
122 #include "H5Node_traits_misc.hpp"
123 
124 #endif // H5NODE_TRAITS_HPP
size_t getNumberObjects() const
return the number of leaf objects of the node / group
std::string getObjectName(size_t index) const
return the name of the object with the given index
bool exist(const std::string &node_name) const
check a dataset or group exists in the current node / group
DataSet getDataSet(const std::string &dataset_name, const DataSetAccessProps &accessProps=DataSetAccessProps()) const
get an existing dataset in the current file
Group getGroup(const std::string &group_name) const
open an existing group with the name group_name
HDF5 Data Type.
Definition: H5DataType.hpp:21
std::vector< std::string > listObjectNames() const
list all leaf objects name of the node / group
Group createGroup(const std::string &group_name)
create a new group with the name group_name
DataSet createDataSet(const std::string &dataset_name, const DataSpace &space, const DataType &type, const DataSetCreateProps &createProps=DataSetCreateProps(), const DataSetAccessProps &accessProps=DataSetAccessProps())
createDataSet Create a new dataset in the current file of datatype type and of size space ...


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 Mon Feb 28 2022 22:46:06