File indexing completed on 2026-09-13 09:13:20
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include <ctime>
0012
0013 #include "bits/H5_definitions.hpp"
0014 #include "bits/H5Friends.hpp"
0015
0016 #include "H5Exception.hpp"
0017 #include "bits/h5o_wrapper.hpp"
0018 #include "bits/h5i_wrapper.hpp"
0019
0020 namespace HighFive {
0021
0022
0023
0024
0025 enum class ObjectType {
0026 File,
0027 Group,
0028 UserDataType,
0029 DataSpace,
0030 Dataset,
0031 Attribute,
0032 Other
0033 };
0034
0035
0036 class Object {
0037 public:
0038
0039 Object(Object&& other) noexcept;
0040
0041
0042
0043
0044
0045 bool isValid() const noexcept;
0046
0047
0048
0049
0050
0051
0052 hid_t getId() const noexcept;
0053
0054
0055
0056
0057 ObjectInfo getInfo() const;
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067 haddr_t getAddress() const;
0068
0069
0070
0071
0072
0073
0074 ObjectType getType() const;
0075
0076
0077 bool operator==(const Object& other) const noexcept {
0078 return _hid == other._hid;
0079 }
0080
0081 protected:
0082
0083 Object();
0084
0085
0086 Object(const Object& other);
0087
0088
0089 explicit Object(hid_t) noexcept;
0090
0091
0092 ~Object();
0093
0094
0095 Object& operator=(const Object& other);
0096 Object& operator=(Object&& other);
0097
0098 hid_t _hid;
0099
0100 private:
0101 friend class Reference;
0102 friend class CompoundType;
0103
0104 #if HIGHFIVE_HAS_FRIEND_DECLARATIONS
0105 template <typename Derivate>
0106 friend class NodeTraits;
0107 template <typename Derivate>
0108 friend class AnnotateTraits;
0109 template <typename Derivate>
0110 friend class PathTraits;
0111 #endif
0112 };
0113
0114
0115
0116
0117
0118 class ObjectInfo {
0119 public:
0120 ObjectInfo(const Object& obj);
0121
0122
0123 size_t getRefCount() const noexcept;
0124
0125
0126 time_t getCreationTime() const noexcept;
0127
0128
0129 time_t getModificationTime() const noexcept;
0130
0131 private:
0132 detail::h5o_info1_t raw_info;
0133
0134 friend class Object;
0135 };
0136
0137 }
0138
0139 #include "bits/H5Object_misc.hpp"