h5cpp
0.3.3
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... | |
ObjectId (const ObjectId &id)=default | |
copy 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... | |
boost::filesystem::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... | |
Friends | |
DLL_EXPORT friend std::ostream & | operator<< (std::ostream &os, const ObjectId &p) |
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 |
|
default |
We need this for compliance with STL containers. As all memebers of this class support copy construction and assignment we can safely use the default implementation, provided by the compiler, here.
|
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 |
Gets object info.
|
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 |
|
friend |