HighFive 2.9.0
HighFive - Header-only C++ HDF5 interface
Loading...
Searching...
No Matches
H5Annotate_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#pragma once
10
11#include <string>
12
13#include "../H5Attribute.hpp"
14
15namespace HighFive {
16
17template <typename Derivate>
19 public:
27 Attribute createAttribute(const std::string& attribute_name,
28 const DataSpace& space,
29 const DataType& type);
30
38 template <typename Type>
39 Attribute createAttribute(const std::string& attribute_name, const DataSpace& space);
40
49 template <typename T>
50 Attribute createAttribute(const std::string& attribute_name, const T& data);
51
55 void deleteAttribute(const std::string& attribute_name);
56
61 Attribute getAttribute(const std::string& attribute_name) const;
62
66 size_t getNumberAttributes() const;
67
71 std::vector<std::string> listAttributeNames() const;
72
76 bool hasAttribute(const std::string& attr_name) const;
77
78 private:
79 using derivate_type = Derivate;
80};
81} // namespace HighFive
Definition H5Annotate_traits.hpp:18
Attribute createAttribute(const std::string &attribute_name, const DataSpace &space, const DataType &type)
create a new attribute with the name attribute_name
Definition H5Annotate_traits_misc.hpp:24
std::vector< std::string > listAttributeNames() const
list all attribute name of the node / group
Definition H5Annotate_traits_misc.hpp:75
void deleteAttribute(const std::string &attribute_name)
deleteAttribute let you delete an attribute by its name.
Definition H5Annotate_traits_misc.hpp:56
Attribute getAttribute(const std::string &attribute_name) const
open an existing attribute with the name attribute_name
Definition H5Annotate_traits_misc.hpp:61
bool hasAttribute(const std::string &attr_name) const
checks an attribute exists
Definition H5Annotate_traits_misc.hpp:93
size_t getNumberAttributes() const
return the number of attributes of the node / group
Definition H5Annotate_traits_misc.hpp:69
Class representing an Attribute of a DataSet or Group.
Definition H5Attribute.hpp:46
Class representing the space (dimensions) of a DataSet.
Definition H5DataSpace.hpp:31
HDF5 Data Type.
Definition H5DataType.hpp:61
Definition H5_definitions.hpp:22