Namespace hdf5::property

Enumerations

DatasetFillValueStatus

enum hdf5::property::DatasetFillValueStatus

enumeration for the fill value status

Values:

enumerator UNDEFINED
enumerator DEFAULT
enumerator USER_DEFINED
std::ostream &hdf5::property::operator<<(std::ostream &stream, const DatasetFillValueStatus &status)

DatasetFillTime

enum hdf5::property::DatasetFillTime

enumeration for the fill time of a dataset

Values:

enumerator IFSET
enumerator ALLOC
enumerator NEVER
std::ostream &hdf5::property::operator<<(std::ostream &stream, const DatasetFillTime &time)

DatasetAllocTime

enum hdf5::property::DatasetAllocTime

enumeration for the dataset allocation time

The particular allocation strategy depends on the layout of the dataset.

See also

DatasetLayout

Values:

enumerator DEFAULT

choose the default allocation strategy for the particular layout

enumerator EARLY

all space is allocated when the dataset is created

enumerator INCR

space is allocated as data is written to the file

enumerator LATE

all space is allocated at the first write to the dataset

std::ostream &hdf5::property::operator<<(std::ostream &stream, const DatasetAllocTime &time)

DatasetLayout

enum hdf5::property::DatasetLayout

enumeration describing the layout of a dataset

Values:

enumerator COMPACT
enumerator CONTIGUOUS
enumerator CHUNKED
std::ostream &hdf5::property::operator<<(std::ostream &stream, const DatasetLayout &layout)

LibVersion

enum hdf5::property::LibVersion

library version enumeration

Values:

enumerator LATEST
enumerator EARLIEST
std::ostream &hdf5::property::operator<<(std::ostream &stream, const LibVersion &version)

CopyFlag

enum hdf5::property::CopyFlag

Values:

enumerator SHALLOW_HIERARCHY
enumerator EXPAND_SOFT_LINKS
enumerator EXPAND_EXTERNAL_LINKS
enumerator EXPAND_REFERENCES
enumerator WITHOUT_ATTRIBUTES
enumerator MERGE_COMMITTED_TYPES
std::ostream &hdf5::property::operator<<(std::ostream &stream, const CopyFlag &flag)
CopyFlags hdf5::property::operator|(const CopyFlag &lhs, const CopyFlag &rhs)

Classes

AttributeCreationList

class hdf5::property::AttributeCreationList : public hdf5::property::StringCreationList

Public Functions

AttributeCreationList()

default constructor

~AttributeCreationList()

destructor

ChunkCacheParameters

class ChunkCacheParameters

chunk cache parameter class

Class holding chunk cache parameters for a dataset.

Class

class hdf5::property::Class

property list class

This class implements a wrapper around HDF5s property list classes.

We have to implement this as a class as it is possible to define custom classes on the fly. Though this functionality is currently not implemented we are on the save side with a class implementation instead of an enumeration.

Public Functions

Class() = default

default constructor

Class(const Class &c) = default

copy constructor

Class &operator=(const Class &c) = default

copy assignment

explicit Class(ObjectHandle &&handle)

constructor

CopyFlags

class hdf5::property::CopyFlags

encapsulate copy flags

This class encapsulates copy flags and provides easy access to the flags without using logical operators.

Public Functions

CopyFlags() noexcept

default constructor

Setup the flags with 0.

explicit CopyFlags(unsigned flags) noexcept

constructor

Construct a CopyFlags instance from a raw unsigned value.

Parameters

flags – raw flags value

CopyFlags(const CopyFlags &flags) = default

copy constructor

Use default implementation for this.

CopyFlags &operator|=(const CopyFlag &flag) noexcept

unary logical or operator

CopyFlags &operator|=(const CopyFlags &flags) noexcept

unary logical or operator

inline explicit operator unsigned() const noexcept

allow for explicit conversion to unsigned

bool shallow_hierarchy() const noexcept

get state of the shallow hierarchy flag

void shallow_hierarchy(bool flag) noexcept

set the state of the shallo hierarchy flag

bool expand_soft_links() const noexcept

get the state of the expand soft links flag

void expand_soft_links(bool flag) noexcept

set the state of the expand soft links flag

bool expand_external_links() const noexcept

get the state of the expand external links flag

void expand_external_links(bool flag) noexcept

set the state of the expand external links flag

bool expand_references() const noexcept

get the state of the expand reference flag

void expand_references(bool flag) noexcept

set the state of the expand reference flag

bool without_attributes() const noexcept

get the state of the without attribute flag

void without_attributes(bool flag) noexcept

set the state of the without attribute flag

bool merge_committed_types() const noexcept

get the state of the merge committed attribute flag

void merge_committed_types(bool flag) noexcept

set the state of the merge comitted attribute flag

CreationOrder

class hdf5::property::CreationOrder

Public Functions

CreationOrder()

default constructor

CreationOrder(const CreationOrder &c) = default

copy constructor

Parameters

c – reference from which to copy

explicit CreationOrder(unsigned value)

constructor

Parameters

value – flags from which to construct the instance

CreationOrder &enable_tracked()

enable tracked creation order

See also

disable_tracked

Returns

reference to the modified instance

CreationOrder &disable_tracked()

disable tracked creation order

See also

enable_tracked

Returns

reference to the modified instance

CreationOrder &enable_indexed()

enable indexed creation order

This implies also tracked creation order which will be enabled by this method automatically if it is not.

See also

disable_indexed

Returns

reference to the modified instance

CreationOrder &disable_indexed()

disable indexed creation order

This does not automatically disable also tracked creation order.

See also

enable_tracked

Returns

reference to the modified instance

bool tracked() const

query if tracked creation order is enabled

Returns

true if creation order is tracked, false otherwise

bool indexed() const

query if indexed creation order is enabled

Returns

true if creation order indexed is enabled, false otherwise

inline operator unsigned() const

conversion operator

Allows the conversion of an instance of this class to an unsigned integer value which can be used with the HDF5 C-API low level functions.

DatasetAccessList

class hdf5::property::DatasetAccessList : public hdf5::property::LinkAccessList

dataset access property list

Public Functions

DatasetAccessList()

default constructor

explicit DatasetAccessList(ObjectHandle &&handle)

constructor

Construct a dataset access property list from a handler instance. This constructor will throw an exception if the handle does not reference a dataset access property list.

Throws

std::runtime_error – in case of a failure

Parameters

handle – r-value reference to a handle instance

~DatasetAccessList()

destructor

void chunk_cache_parameters(const ChunkCacheParameters &params) const

set the chunk cache parameters

Throws

std::runtime_error – in case of a failure

ChunkCacheParameters chunk_cache_parameters() const

get chunk cache parameters

Throws

std::runtime_error – in case of a failure

DatasetCreationList

class hdf5::property::DatasetCreationList : public hdf5::property::ObjectCreationList

dataset creation property list

Public Functions

DatasetCreationList()

default constructor

~DatasetCreationList()

destructor

explicit DatasetCreationList(ObjectHandle &&handle)

constructor

Construct a new dataset creation property list from an HDF5 handle. This constructor will throw an exception if the handle does not reference a dataset creation property list.

Throws

std::runtime_error – in case of a failure

Parameters

handle – r-value reference to an HDF5 handle

void layout(DatasetLayout layout) const

set dataset layout

See also

layout()

Throws

std::runtime_error – in case of failures

Parameters

layout – required dataset layout

DatasetLayout layout() const

get dataset layout

See also

layout(DatasetLayout layout)

See also

DatasetLayout

Throws

std::runtime_error – in case of failures

Returns

new instance of DatasetLayout

void chunk(const hdf5::Dimensions &chunk_dims) const

set chunk dimensions

The chunk dimensions must be of same rank as the dataspace used to create the dataset.

See also

chunk()

Throws

std::runtime_error – in case of a failure

Parameters

chunk_dims – vector with elements along each chunk dimension

hdf5::Dimensions chunk() const

get chunk dimensions

Throws

std::runtime_error – in case of a failure

Returns

an instance of hdf5::Dimensions with the number of elements along each chunk dimension

template<typename T>
void fill_value(const T &value, const datatype::Datatype &type = datatype::TypeTrait<T>::create()) const

set fill value for a dataset

By default the library tries to deduce the appropriate HDF5 data type automatically. This will succeed if

  • T is a native type already implemented in the library

  • the user has provided an appropriate type trait to construct an HDF5 datatype for T

Optionally, an HDF5 data type can be passed as a second argument to this member function. T must not necessarily be the same type used to create the dataset however, the two types must be convertible.

See also

fill_value(const datatype::Datatype &type)

Throws

std::runtime_error – in case of a failure

Parameters
  • value – the actual fill value

  • type – an optional HDF5 data type

Template Parameters

T – the type of the fill value

template<typename T>
T fill_value(const datatype::Datatype &type = datatype::TypeTrait<T>::create()) const

get the fill value

Get the fill value for a dataset stored in the property list as an instance of T. T must not necessarily be of the same type as the data type used t

Template Parameters

T – requrested type for the fill value

Parameters

type – optional HDF5 data type

void fill_time(DatasetFillTime time) const

set fill time

DatasetFillTime fill_time() const

get fill time

void allocation_time(DatasetAllocTime time) const

set allocation time

DatasetAllocTime allocation_time() const

get allocation time

See also

DatasetAllocTime

See also

allocation_time(DatasetAllocTime)

unsigned int nfilters() const

get a number of filters

DatasetTransferList

class DatasetTransferList : public hdf5::property::List

DatatypeAccessList

class DatatypeAccessList : public hdf5::property::LinkAccessList

FileAccessList

class hdf5::property::FileAccessList : public hdf5::property::List

file access property list

Class provides object oriented interface to the file access property list.

Public Functions

FileAccessList()

default constructor

~FileAccessList()

destructor

void library_version_bounds(LibVersion high, LibVersion low) const

setting library version boundaries

LibVersion library_version_bound_high() const

get library version high bound

LibVersion library_version_bound_low() const

get library version low bound

void close_degree(CloseDegree degree) const

set file close degree

CloseDegree close_degree() const

get lfile close degree

void driver(const hdf5::file::Driver &file_driver) const

set the file driver

FileCreationList

class FileCreationList : public hdf5::property::GroupCreationList

FileMountList

class hdf5::property::FileMountList : public hdf5::property::List

Public Functions

FileMountList()

default constructor

~FileMountList()

destructor

GroupAccessList

class GroupAccessList : public hdf5::property::LinkAccessList

GroupCreationList

class GroupCreationList : public hdf5::property::ObjectCreationList

Subclassed by hdf5::property::FileCreationList

LinkAccessList

class hdf5::property::LinkAccessList : public hdf5::property::List

link access property list

Subclassed by hdf5::property::DatasetAccessList, hdf5::property::DatatypeAccessList, hdf5::property::GroupAccessList

Public Functions

LinkAccessList()

default constructor

virtual ~LinkAccessList()

destructor

get maximum number of link traversals

set maximum number of link traversals

get external link prefix

Returns the prefix prepended to every path in an external link.

Throws

std::runtime_error – in case of a failure

Returns

prefix as an instance of fs

set external link prefix

Sets the external link prefix for a path. As the this information is stored internally and must be kept valid throughout the lifetime of the property list this method cannot be const.

Throws

std::runtime_error – in case of a failure

Parameters

path – reference to a fs path containing the prefix

LinkCreationList

class hdf5::property::LinkCreationList : public hdf5::property::StringCreationList

Public Functions

LinkCreationList()

default constructor

~LinkCreationList()

destructor

void enable_intermediate_group_creation() const

enable intermediate group creation

With this flag set, intermediate groups in a path to an object to be created will be created if necessary.

void disable_intermediate_group_creation() const

disable intermediate group creation

bool intermediate_group_creation() const

query intermediate group creation flag

Returns

true if intermediate group creation flag is set, false otherwise

List

class hdf5::property::List

base class for property lists

Subclassed by hdf5::property::DatasetTransferList, hdf5::property::FileAccessList, hdf5::property::FileMountList, hdf5::property::LinkAccessList, hdf5::property::ObjectCopyList, hdf5::property::ObjectCreationList, hdf5::property::StringCreationList

Public Functions

explicit List(const Class &plist_class)

constructor

Parameters

plist_class

List(const List &plist)

copy constructor

Parameters

plist

explicit List(ObjectHandle &&handle)

constructor

Construct a property list from a handler object. This constructor is particularly useful in situations where we retrieve the handler of a property list from a C-API function.

Throws

std::runtime_error – in case of a failure

Parameters

handle – r-value reference to the handle object

List &operator=(const List &type)

copy assignment

virtual ~List()

destructor

Class get_class() const

return property list class

Return an instance of the property list class the list belongs to.

Returns

class instance

inline explicit operator hid_t() const

conversion operator

Use this operator to obtain the actual HDF5 handler to the list instance.

ObjectCopyList

class ObjectCopyList : public hdf5::property::List

ObjectCreationList

class hdf5::property::ObjectCreationList : public hdf5::property::List

Subclassed by hdf5::property::DatasetCreationList, hdf5::property::GroupCreationList, hdf5::property::TypeCreationList

Public Functions

ObjectCreationList()

constructor

virtual ~ObjectCreationList()

destructor

void enable_time_tracking() const

enable object time tracking

Activates the time tracking feature on objects in the file.

See also

time_tracking

void disable_time_tracking() const

disable object time tracking

See also

time_tracking

bool time_tracking() const

return time tacking status

Queries the current status of the time tracking feature. This method returns true if time tracking is activate and false otherwise.

Throws

std::runtime_errr – in case of an error

Returns

true if time tracking is active, false otherwise

void attribute_creation_order(const CreationOrder &order) const

set the attribute creation order

Set the attribute creation order flags which will be used for all objects.

See also

CreationOrder

Parameters

order – requested attribute creation order

CreationOrder attribute_creation_order() const

retrieve current attribute creation order

See also

CreationOrder

Returns

current attribute creation order

void attribute_storage_thresholds(unsigned max_compact, unsigned min_dense) const

set storage layout thresholds

Parameters
  • max_compact – maximum number above which dense storage will be used

  • min_dense – minimum number below which compact storage will be used

unsigned attribute_storage_maximum_compact() const

get upper threshold for compact storage

Returns

unsigned attribute_storage_minimum_dense() const

get lower threshold for dense threshold

StringCreationList

class hdf5::property::StringCreationList : public hdf5::property::List

Subclassed by hdf5::property::AttributeCreationList, hdf5::property::LinkCreationList

Public Functions

StringCreationList()

constructor

virtual ~StringCreationList()

destructor

datatype::CharacterEncoding character_encoding() const

get character encoding

Returns

current character encoding

void character_encoding(datatype::CharacterEncoding encoding) const

set character encoding

Parameters

encoding – the required character encoding

TypeCreationList

class hdf5::property::TypeCreationList : public hdf5::property::ObjectCreationList

Public Functions

TypeCreationList()

default constructor

~TypeCreationList()

destructor

VirtualDataMap

class hdf5::property::VirtualDataMap

data mapping for virtual datasets

This class describes the mapping of data between the dataspace of a virtual dataset and the source dataset.

Public Functions

VirtualDataMap() = default

default constructor

Need this for STL container compliance but can rely on the compiler provided default version.

VirtualDataMap(const VirtualDataMap&) = default

copy constructor

Need this for STL container compilance but can rely on the compiler provided default version.

VirtualDataMap(const dataspace::View &target_view, const fs::path &source_file, const hdf5::Path &source_dataset, const dataspace::View &source_view)

constructor

Throws

std::runtime_error – in case of a failure

Parameters
  • target_view – dataspace view with the selection where to view the source data

  • source_file – path to the source file

  • source_dataset – path to the source dataset

  • source_view – dataspace view with selection of the source dataset

void operator()(const property::DatasetCreationList &dcpl) const

apply mapping to a dataset creation list

Throws

std::runtime_error – in case of a failure

Parameters

dcpl – reference to the dataset creation list onto which the mapping should be applied

class VirtualDataMaps : public std::vector<VirtualDataMap>

utility container for virtual data maps

This is a one to one derived type from std::vector in order to provide a convenient container for virtual data maps. The interface is exactly the same as for std::vector.