File indexing completed on 2025-04-19 08:55:35
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
0074
0075
0076
0077
0078 inline std::vector<size_t> getDimensions() const {
0079 return getSpace().getDimensions();
0080 }
0081
0082
0083
0084
0085
0086
0087 inline size_t getElementCount() const {
0088 return getSpace().getElementCount();
0089 }
0090
0091
0092 DataSetCreateProps getCreatePropertyList() const {
0093 return details::get_plist<DataSetCreateProps>(*this, H5Dget_create_plist);
0094 }
0095
0096
0097 DataSetAccessProps getAccessPropertyList() const {
0098 return details::get_plist<DataSetAccessProps>(*this, H5Dget_access_plist);
0099 }
0100
0101
0102 H5_DEPRECATED("Default constructor creates unsafe uninitialized objects")
0103 DataSet() = default;
0104
0105 protected:
0106 using Object::Object;
0107
0108 DataSet(Object&& o) noexcept
0109 : Object(std::move(o)) {}
0110
0111 friend class Reference;
0112 template <typename Derivate>
0113 friend class NodeTraits;
0114 };
0115
0116 }