h5cpp
0.6
A modern C++ wrapper for the HDF5 C library
|
Unique ID of an HDF5 object. More...
#include <object_id.hpp>
Public Member Functions | |
ObjectId () | |
default constructor More... | |
ObjectId (const ObjectHandle &handle) | |
constructor More... | |
bool | operator== (const ObjectId &other) const |
Equality operator for IDs. More... | |
bool | operator!= (const ObjectId &other) const |
Inequality operator for IDs. More... | |
bool | operator< (const ObjectId &other) const |
Allows sorting of IDs. More... | |
unsigned long | file_number () const noexcept |
Get the HDF5 file number. More... | |
haddr_t | object_address () const noexcept |
Get object address. More... | |
fs::path | file_name () const noexcept |
Get file name. More... | |
Static Public Member Functions | |
static std::string | get_file_name (const ObjectHandle &handle) |
get the name of the file More... | |
static H5O_info_t_ | get_info (const ObjectHandle &handle) |
get object info More... | |
Such an ID is constructed from an ObjectHandle instance. However, no reference to that handle is stored in the class. An instance of ObjectId allows the unique identification of an HDF5 object within the context of a program. The ID is currently formed from the
Optinally we also provide the name of the the object is stored in.
|
inline |
We need the default constructor for compliance with STL containers as we may want to store IDs in one.
hdf5::ObjectId::ObjectId | ( | const ObjectHandle & | handle | ) |
Construct an ID from a handler instance. If the handler is default constructed and thus invalid a default constructed Id instance will be returned.
handle | reference to an object handler |
|
noexcept |
Return the name fo the file the object referenced by this ID is stored in. An empty path is returned in the case of a default constructed ID.
|
noexcept |
Return the HDF5 file number of the file the object referenced by this ID belongs to. If the ID is default constructed this method returns 0.
|
static |
Obtains the name of the file where the object is stored in.
|
static |
H5O_info_t
Gets object info.
For HDF5 version 1.12.0 and higher, this explicitly returns a H5O_info1_t structure. For versions <= 1.10.5 it returns H5O_info_t.
|
noexcept |
Return the address of the referenced object within its file. If the ID instance is default constructed this method returns 0.
bool hdf5::ObjectId::operator!= | ( | const ObjectId & | other | ) | const |
bool hdf5::ObjectId::operator< | ( | const ObjectId & | other | ) | const |
bool hdf5::ObjectId::operator== | ( | const ObjectId & | other | ) | const |