Wrapper class around an hdf5 identifier, used to manage reference counts of the object this identifier refers to.
More...
#include <hdfidentifier.hh>
Wrapper class around an hdf5 identifier, used to manage reference counts of the object this identifier refers to.
◆ HDFIdentifier() [1/4]
Utopia::DataIO::HDFIdentifier::HDFIdentifier |
( |
hid_t |
id, |
|
|
std::function< herr_t(hid_t) > |
closing_func |
|
) |
| |
|
inline |
Construct HDFIdentifier from the given arguments.
- Parameters
-
id | C-Level id that is to be wrappend into an object of this class. Management of this id is then taken over by this class instance. Continuing to do so using the C-Interface outside of this class will result in errors. |
◆ HDFIdentifier() [2/4]
Utopia::DataIO::HDFIdentifier::HDFIdentifier |
( |
| ) |
|
|
inline |
◆ HDFIdentifier() [3/4]
Utopia::DataIO::HDFIdentifier::HDFIdentifier |
( |
const HDFIdentifier & |
other | ) |
|
|
inline |
Construct HDFIdentifier by copying another instance of HDFIdentifier, incrementing the refcount of the held id in the process.
- Parameters
-
◆ HDFIdentifier() [4/4]
Utopia::DataIO::HDFIdentifier::HDFIdentifier |
( |
HDFIdentifier && |
other | ) |
|
|
inline |
◆ ~HDFIdentifier()
Utopia::DataIO::HDFIdentifier::~HDFIdentifier |
( |
| ) |
|
|
inline |
◆ close()
void Utopia::DataIO::HDFIdentifier::close |
( |
| ) |
|
|
inline |
Close the identifier and render the C-Level id held invalid.
◆ decrement_refcount()
void Utopia::DataIO::HDFIdentifier::decrement_refcount |
( |
| ) |
|
|
inline |
Decrease the reference count of the object referred to by this ID by one.
◆ get_id()
hid_t Utopia::DataIO::HDFIdentifier::get_id |
( |
| ) |
const |
|
inline |
Get the HDF5 id held by this object.
- Returns
- hid_t
◆ get_refcount()
auto Utopia::DataIO::HDFIdentifier::get_refcount |
( |
| ) |
const |
|
inline |
Get the number of references currently referring to the object identified by this ID.
- Returns
- auto
◆ increment_refcount()
void Utopia::DataIO::HDFIdentifier::increment_refcount |
( |
| ) |
|
|
inline |
Increase the reference count of the object referred to by this ID by one.
◆ is_valid()
bool Utopia::DataIO::HDFIdentifier::is_valid |
( |
| ) |
const |
|
inline |
Check if thi ID refers to a valid object.
- Returns
- true
-
false
◆ open()
void Utopia::DataIO::HDFIdentifier::open |
( |
hid_t |
id, |
|
|
std::function< herr_t(hid_t) > |
closing_func |
|
) |
| |
|
inline |
Open the object and bind it to another C-Level id.
- Parameters
-
◆ operator=() [1/2]
Assign HDFIdentifier by copying another instance of HDFIdentifier, incrementing the refcount of the held id in the process.
- Parameters
-
◆ operator=() [2/2]
◆ set_id()
void Utopia::DataIO::HDFIdentifier::set_id |
( |
hid_t |
id | ) |
|
|
inline |
Set id to the given argument. Only to be used to invalidate objects upon move or similar.
- Parameters
-
◆ swap()
void Utopia::DataIO::HDFIdentifier::swap |
( |
HDFIdentifier & |
other | ) |
|
|
inline |
Exchange states between caller and 'other'.
- Parameters
-
other | Identifier to exchange states with |
◆ _closing_func
std::function< herr_t(hid_t) > Utopia::DataIO::HDFIdentifier::_closing_func |
|
private |
◆ _id
hid_t Utopia::DataIO::HDFIdentifier::_id = -1 |
|
private |
The documentation for this class was generated from the following file: