HighFive 2.10.1
HighFive - Header-only C++ HDF5 interface
Loading...
Searching...
No Matches
HighFive::Reference Class Reference

An HDF5 (object) reference type. More...

#include <H5Reference.hpp>

Public Member Functions

 Reference ()=default
 Create an empty Reference to be initialized later.
 
 Reference (const Object &location, const Object &object)
 Create a Reference to an object residing at a given location.
 
template<typename T >
dereference (const Object &location) const
 Retrieve the Object being referenced by the Reference.
 
ObjectType getType (const Object &location) const
 Get only the type of the referenced Object.
 

Protected Member Functions

 Reference (const hobj_ref_t h5_ref)
 Create a Reference from a low-level HDF5 object reference.
 
void create_ref (hobj_ref_t *refptr) const
 Create the low-level reference and store it at refptr.
 

Detailed Description

An HDF5 (object) reference type.

HDF5 object references allow pointing to groups, datasets (and compound types). They differ from links in their ability to be stored and retrieved as data from the HDF5 file in datasets themselves.

Constructor & Destructor Documentation

◆ Reference() [1/3]

HighFive::Reference::Reference ( )
default

Create an empty Reference to be initialized later.

◆ Reference() [2/3]

HighFive::Reference::Reference ( const Object & location,
const Object & object )
inline

Create a Reference to an object residing at a given location.

Parameters
locationA File or Group where the object being referenced to resides
objectA Dataset or Group to be referenced

◆ Reference() [3/3]

HighFive::Reference::Reference ( const hobj_ref_t h5_ref)
inlineexplicitprotected

Create a Reference from a low-level HDF5 object reference.

Member Function Documentation

◆ create_ref()

void HighFive::Reference::create_ref ( hobj_ref_t * refptr) const
inlineprotected

Create the low-level reference and store it at refptr.

Parameters
refptrPointer to a memory location where the created HDF5 reference will be stored

◆ dereference()

template<typename T >
T HighFive::Reference::dereference ( const Object & location) const
inline

Retrieve the Object being referenced by the Reference.

Template Parameters
Tthe appropriate HighFive Container (either DataSet or Group)
Parameters
locationthe location where the referenced object is to be found (a File)
Returns
the dereferenced Object (either a Group or DataSet)

◆ getType()

ObjectType HighFive::Reference::getType ( const Object & location) const
inline

Get only the type of the referenced Object.

Parameters
locationthe location where the referenced object is to be found (a File)
Returns
the ObjectType of the referenced object

The documentation for this class was generated from the following files: