Skip to content

Commit 9a9f7b7

Browse files
committed
remove: ObjectInfo::getAddress
The function was moved to Object::getAddress.
1 parent 63997e6 commit 9a9f7b7

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

doc/migration_guide.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,15 @@ an address. Meaning one can't take it's address or const-references of it
262262
## Removal of `Object*Props`.
263263
To our knowledge these could not be used meaningfully. Please create an issue
264264
if you relied on these.
265+
266+
## Removal of `ObjectInfo::getAddress()`.
267+
The functionality was moved to Object::getAddress. Typically, replace
268+
```
269+
// old
270+
dataset.getInfo().getAddress()
271+
272+
// new
273+
dataset.getAddress()
274+
```
275+
Keep in mind that not all files (e.g. HSDS) have addresses. Instead they seem
276+
to have VOL tokens. This is likely best avoided in generic code.

include/highfive/H5Object.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,6 @@ class ObjectInfo {
118118
public:
119119
ObjectInfo(const Object& obj);
120120

121-
/// \brief Retrieve the address of the object (within its file)
122-
/// \deprecated Deprecated since HighFive 2.2. Soon supporting VOL tokens
123-
H5_DEPRECATED("Deprecated since HighFive 2.2. Soon supporting VOL tokens")
124-
haddr_t getAddress() const noexcept;
125-
126121
/// \brief Retrieve the number of references to this object
127122
size_t getRefCount() const noexcept;
128123

include/highfive/bits/H5Object_misc.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ inline ObjectInfo::ObjectInfo(const Object& obj) {
118118
detail::h5o_get_info1(obj.getId(), &raw_info);
119119
}
120120

121-
inline haddr_t ObjectInfo::getAddress() const noexcept {
122-
return raw_info.addr;
123-
}
124-
125121
inline size_t ObjectInfo::getRefCount() const noexcept {
126122
return raw_info.rc;
127123
}

tests/unit/tests_high_five_base.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,7 @@ TEST_CASE("DataTypeEqualTakeBack") {
871871
CHECK(s == dataset.getDataType());
872872
CHECK(d != dataset.getDataType());
873873

874-
// Test getAddress and expect deprecation warning
875-
auto addr = dataset.getInfo().getAddress();
874+
auto addr = dataset.getAddress();
876875
CHECK(addr != 0);
877876
}
878877

0 commit comments

Comments
 (0)