Utopia 2
Framework for studying models of complex & adaptive systems.
|
Common base class for all HDF5 classes in the DATAIO Module i.e., for all classes that wrap HDF5-C-Library functionality like HDFDataset, HDFGroup, HDFFile. This class is not intendet as something to be used independently, but only as a base class to be inherited from. More...
#include <hdfobject.hh>
Public Member Functions | |
void | swap (HDFObject &other) |
swap the state of the caller with the state of the argument | |
std::string | get_path () const |
Get the name or path object. | |
auto | get_id_object () const |
Get the id object. | |
auto | get_logger () const |
Get the logger object. | |
hid_t | get_C_id () const |
Get the C id object. | |
auto | get_refcount () |
Get the reference count of object. | |
virtual bool | is_valid () const |
Check if the object is still valid. | |
void | close () |
Close function which takes care of correctly closing the object and managing the reference counter. | |
void | bind_to (hid_t id, std::function< herr_t(hid_t) > closing_func, std::string path={}) |
Open the object and bind it to a HDF5 object identified by 'id' with name 'path'. Object should be created beforehand. | |
HDFObject () | |
Construct HDFObject from the given arguments. | |
HDFObject (HDFObject &&other) | |
Construct HDFObject by moving. | |
HDFObject (const HDFObject &other)=default | |
Construct HDFObject by copying another object. | |
HDFObject (hid_t id, std::function< herr_t(hid_t) > closing_func, std::string path={}) | |
Construct HDFObject from the given argument. | |
HDFObject & | operator= (const HDFObject &other) |
Copy assignment operator. | |
HDFObject & | operator= (HDFObject &&other) |
move assignment operator | |
virtual | ~HDFObject () |
Destroy the HDFObject object. Has to be implemented in subclass! | |
Static Public Attributes | |
static constexpr HDFCategory | category = objectcategory |
Named variable for template arg. | |
Protected Attributes | |
HDFIdentifier | _id |
Identifier object that binds an instance of this class to an HDF5 object. | |
std::string | _path |
Name of the object. | |
std::shared_ptr< spdlog::logger > | _log |
pointer to the logger for dataio | |
Common base class for all HDF5 classes in the DATAIO Module i.e., for all classes that wrap HDF5-C-Library functionality like HDFDataset, HDFGroup, HDFFile. This class is not intendet as something to be used independently, but only as a base class to be inherited from.
HDFCategory | type of object an instance of this class refers to |
|
inline |
Construct HDFObject from the given arguments.
|
inline |
Construct HDFObject by moving.
|
default |
Construct HDFObject by copying another object.
|
inline |
Construct HDFObject from the given argument.
id | C-Library identifier, by rvalue reference count. This is done such that the id is 'stolen' by this object and hence reference counts stay the same |
path | Name of the object |
|
inlinevirtual |
|
inline |
Open the object and bind it to a HDF5 object identified by 'id' with name 'path'. Object should be created beforehand.
id | id of the object to bind to, by rvalue reference. This is made such that the given id is 'stolen' by this object and reference count remains unchanged |
path | Name or path of the object to bind to |
|
inline |
Close function which takes care of correctly closing the object and managing the reference counter.
|
inline |
Get the C id object.
|
inline |
Get the id object.
|
inline |
|
inline |
|
inline |
Get the reference count of object.
|
inlinevirtual |
Check if the object is still valid.
Reimplemented in Utopia::DataIO::HDFType.
|
inline |
|
inline |
|
inline |
swap the state of the caller with the state of the argument
other |
|
protected |
Identifier object that binds an instance of this class to an HDF5 object.
|
protected |
pointer to the logger for dataio
|
protected |
Name of the object.
|
staticconstexpr |
Named variable for template arg.