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
SingleArray
Definition: data_types.h:107
HighFive::NodeTraits::createGroup
Group createGroup(const std::string &group_name)
create a new group with the name group_name
Definition: H5Node_traits_misc.hpp:97
HighFive::DataType
HDF5 Data Type.
Definition: H5DataType.hpp:21
HighFive::NodeTraits::getDataSet
DataSet getDataSet(const std::string &dataset_name, const DataSetAccessProps &accessProps=DataSetAccessProps()) const
get an existing dataset in the current file
Definition: H5Node_traits_misc.hpp:84
HighFive::NodeTraits::derivate_type
Derivate derivate_type
Definition: H5Node_traits.hpp:118
HighFive::NodeTraits
Definition: H5Node_traits.hpp:23
H5Node_traits_misc.hpp
HighFive::NodeTraits::getNumberObjects
size_t getNumberObjects() const
return the number of leaf objects of the node / group
Definition: H5Node_traits_misc.hpp:121
HighFive::NodeTraits::getObjectName
std::string getObjectName(size_t index) const
return the name of the object with the given index
Definition: H5Node_traits_misc.hpp:132
HighFive::DataSetCreateProps
Definition: H5PropertyList.hpp:67
HighFive::Group
Definition: H5Group.hpp:20
HighFive::NodeTraits::getGroup
Group getGroup(const std::string &group_name) const
open an existing group with the name group_name
Definition: H5Node_traits_misc.hpp:110
HighFive::DataSetAccessProps
Definition: H5PropertyList.hpp:72
HighFive::DataSpace
Definition: H5DataSpace.hpp:30
HighFive::NodeTraits::exist
bool exist(const std::string &node_name) const
check a dataset or group exists in the current node / group
Definition: H5Node_traits_misc.hpp:172
HighFive::NodeTraits::createDataSet
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
Definition: H5Node_traits_misc.hpp:36
HighFive::DataSet
Definition: H5DataSet.hpp:27
HighFive
Definition: H5Annotate_traits.hpp:14
HighFive::NodeTraits::listObjectNames
std::vector< std::string > listObjectNames() const
list all leaf objects name of the node / group
Definition: H5Node_traits_misc.hpp:152


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 Wed Mar 2 2022 00:37:23