hops
H5Attribute.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c), 2017, Ali Can Demiralp <ali.demiralp@rwth-aachen.de>
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 H5ATTRIBUTE_HPP
10 #define H5ATTRIBUTE_HPP
11 
12 #include <vector>
13 
14 #include "H5DataSpace.hpp"
15 #include "H5DataType.hpp"
16 #include "H5Object.hpp"
17 
18 namespace HighFive {
19 
23 class Attribute : public Object {
24  public:
25 
27 
31  std::string getName() const;
32 
33  size_t getStorageSize() const;
34 
39  DataType getDataType() const;
40 
45  DataSpace getSpace() const;
46 
52  DataSpace getMemSpace() const;
53 
61  template <typename T>
62  void read(T& array) const;
63 
67  template <typename T>
68  void read(T* array) const;
69 
77  template <typename T>
78  void write(const T& buffer);
79 
83  template <typename T>
84  void write_raw(const T& buffer);
85 
86  private:
87  Attribute() = default;
88 
89  template <typename Derivate> friend class ::HighFive::AnnotateTraits;
90 };
91 
92 } // namespace HighFive
93 
94 
95 #endif // H5ATTRIBUTE_HPP
HighFive::Attribute::getSpace
DataSpace getSpace() const
getSpace
Definition: H5Attribute_misc.hpp:46
H5Object.hpp
HighFive::DataType
HDF5 Data Type.
Definition: H5DataType.hpp:42
HighFive::Attribute::read
void read(T &array) const
Definition: H5Attribute_misc.hpp:58
HighFive::Attribute::getMemSpace
DataSpace getMemSpace() const
getMemSpace
Definition: H5Attribute_misc.hpp:55
HighFive::Object
Definition: H5Object.hpp:36
H5DataSpace.hpp
H5DataType.hpp
HighFive::ObjectType::Attribute
@ Attribute
HighFive::ObjectType
ObjectType
Enum of the types of objects (H5O api)
Definition: H5Object.hpp:25
HighFive::Attribute::write_raw
void write_raw(const T &buffer)
Definition: H5Attribute_misc.hpp:131
HighFive::Attribute
Class representing an attribute of a dataset or group.
Definition: H5Attribute.hpp:23
HighFive::Attribute::getStorageSize
size_t getStorageSize() const
Definition: H5Attribute_misc.hpp:36
HighFive::Attribute::getDataType
DataType getDataType() const
getDataType
Definition: H5Attribute_misc.hpp:40
HighFive::DataSpace
Class representing the space (dimensions) of a dataset.
Definition: H5DataSpace.hpp:37
HighFive::Attribute::getName
std::string getName() const
return the name of the current attribute
Definition: H5Attribute_misc.hpp:30
string
NAME string(REPLACE ".cpp" "_bin" example_name ${example_filename}) if($
Definition: hops/Third-party/HighFive/src/examples/CMakeLists.txt:6
HighFive::Attribute::type
const static ObjectType type
Definition: H5Attribute.hpp:26
HighFive
Definition: H5_definitions.hpp:15
HighFive::Attribute::write
void write(const T &buffer)
Definition: H5Attribute_misc.hpp:106