File indexing completed on 2026-09-27 09:14:27
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include <vector>
0012
0013 #include "H5DataSpace.hpp"
0014 #include "H5DataType.hpp"
0015 #include "H5Object.hpp"
0016 #include "bits/H5_definitions.hpp"
0017 #include "bits/H5Annotate_traits.hpp"
0018 #include "bits/H5Slice_traits.hpp"
0019 #include "bits/H5Path_traits.hpp"
0020 #include "bits/H5_definitions.hpp"
0021
0022 namespace HighFive {
0023
0024
0025
0026
0027 class DataSet: public Object,
0028 public SliceTraits<DataSet>,
0029 public AnnotateTraits<DataSet>,
0030 public PathTraits<DataSet> {
0031 public:
0032 const static ObjectType type = ObjectType::Dataset;
0033
0034
0035
0036
0037
0038 uint64_t getStorageSize() const;
0039
0040
0041
0042
0043
0044 uint64_t getOffset() const;
0045
0046
0047
0048
0049
0050 DataType getDataType() const;
0051
0052
0053
0054
0055
0056 DataSpace getSpace() const;
0057
0058
0059
0060
0061
0062
0063 DataSpace getMemSpace() const;
0064
0065
0066
0067
0068
0069
0070
0071 void resize(const std::vector<size_t>& dims);
0072
0073 #if H5_VERSION_GE(1, 10, 0)
0074
0075 void flush();
0076 #endif
0077
0078 #if H5_VERSION_GE(1, 10, 2)
0079
0080 void refresh();
0081 #endif
0082
0083
0084
0085
0086
0087 inline std::vector<size_t> getDimensions() const {
0088 return getSpace().getDimensions();
0089 }
0090
0091
0092
0093
0094
0095
0096 inline size_t getElementCount() const {
0097 return getSpace().getElementCount();
0098 }
0099
0100
0101 DataSetCreateProps getCreatePropertyList() const {
0102 return details::get_plist<DataSetCreateProps>(*this, H5Dget_create_plist);
0103 }
0104
0105
0106 DataSetAccessProps getAccessPropertyList() const {
0107 return details::get_plist<DataSetAccessProps>(*this, H5Dget_access_plist);
0108 }
0109
0110 DataSet() = default;
0111
0112 protected:
0113 using Object::Object;
0114
0115 explicit DataSet(Object&& o) noexcept
0116 : Object(std::move(o)) {}
0117
0118 friend class Reference;
0119 template <typename Derivate>
0120 friend class NodeTraits;
0121 };
0122
0123 }