Namespace hdf5::property

Classes

AttributeCreationList

class AttributeCreationList : public hdf5::property::StringCreationList

Public Functions

AttributeCreationList()

default constructor

~AttributeCreationList() override

destructor

ChunkCacheParameters

class ChunkCacheParameters

chunk cache parameter class

Class holding chunk cache parameters for a dataset.

Class

class 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

bool hdf5::property::operator==(const Class &lhs, const Class &rhs)
bool hdf5::property::operator!=(const Class &lhs, const Class &rhs)

CopyFlags

class 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

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

unary logical and operator

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

unary logical and 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 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 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() override

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

void virtual_view(VirtualDataView view) const

missing data handling for virtual datasets (since hdf5 1.10.0)

Throws

std::runtime_error – in case of a failure

Parameters

view – set missing data strategy

VirtualDataView virtual_view() const

get missing data strategy for virtual datasets (since hdf5 1.10.0)

DatasetCreationList

class DatasetCreationList : public hdf5::property::ObjectCreationList

dataset creation property list

Public Functions

DatasetCreationList()

default constructor

~DatasetCreationList() override

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

class for a dataset transfer property list

Public Functions

DatasetTransferList()

constructor

~DatasetTransferList() override

destructor

explicit DatasetTransferList(ObjectHandle &&handle, bool do_check = true)

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

  • do_check – perform the object handle class type check

void mpi_transfer_mode(MPITransferMode mode) const

set mpi transfer mode (for hdf5 compiled with MPI)

MPITransferMode mpi_transfer_mode() const

get mpi transfer mode (for hdf5 compiled with MPI)

void mpi_chunk_option(MPIChunkOption option) const

set mpi chunk option (for hdf5 compiled with MPI)

MPIChunkOption mpi_chunk_option() const

get mpi chunk option (for hdf5 compiled with MPI)

Public Static Functions

static inline const DatasetTransferList &get()

reference to const static DatasetTransferList object

Return a reference to const static DatasetTransferList object. The object has to be constructed directly with H5P_DATASET_XFER because during the construction kDatasetXfer does not exist.

DatatypeAccessList

class DatatypeAccessList : public hdf5::property::LinkAccessList

FileAccessList

class 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() override

destructor

void library_version_bounds(LibVersion low, LibVersion high) 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

dataset creation property list

Public Functions

FileCreationList()

default constructor

explicit FileCreationList(ObjectHandle &&handle)

constructor

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

Throws

std::runtime_error – in case of a failure

Parameters

handle – r-value reference to a handle instance

void user_block(hsize_t size) const

set user block

hsize_t user_block() const

get user block

void object_offset_size(size_t size) const

set object offset size

size_t object_offset_size() const

get object offset size

void object_length_size(size_t size) const

set object length size

size_t object_length_size() const

get object length size

void btree_rank(unsigned int ik)

set btree rank

unsigned int btree_rank() const

get btree rank

void btree_symbols(unsigned int lk)

set btree symbols

unsigned int btree_symbols() const

get btree symbols

void chunk_tree_rank(unsigned int ik)

set chunk tree rank

unsigned int chunk_tree_rank() const

get chunk tree rank

void page_size(hsize_t size)

set page size (since hdf5 1.10.1)

hsize_t page_size() const

get page size (since hdf5 1.10.1)

FileMountList

class FileMountList : public hdf5::property::List

Public Functions

FileMountList()

default constructor

~FileMountList() override

destructor

GroupAccessList

class GroupAccessList : public hdf5::property::LinkAccessList

GroupCreationList

class GroupCreationList : public hdf5::property::ObjectCreationList

Subclassed by hdf5::property::FileCreationList

LinkAccessList

class 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

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 LinkCreationList : public hdf5::property::StringCreationList

Public Functions

LinkCreationList()

default constructor

~LinkCreationList() override

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 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 – reference to the property list class

List(const List &plist)

copy constructor

Parameters

plist – reference to the original property list

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 ObjectCreationList : public hdf5::property::List

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

Public Functions

ObjectCreationList()

constructor

virtual ~ObjectCreationList() override

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

return the upper threshhold for which compat storage is used

unsigned attribute_storage_minimum_dense() const

get lower threshold for dense threshold

StringCreationList

class StringCreationList : public hdf5::property::List

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

Public Functions

StringCreationList()

constructor

virtual ~StringCreationList() override

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 TypeCreationList : public hdf5::property::ObjectCreationList

Public Functions

TypeCreationList()

default constructor

~TypeCreationList() override

destructor

VirtualDataMap

class 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.

Enumerations

DatasetFillValueStatus

enum class hdf5::property::DatasetFillValueStatus : std::underlying_type<H5D_fill_value_t>::type

enumeration for the fill value status

Values:

enumerator Undefined
enumerator Default
enumerator UserDefined
std::ostream &hdf5::property::operator<<(std::ostream &stream, const DatasetFillValueStatus &status)

DatasetFillTime

enum class hdf5::property::DatasetFillTime : std::underlying_type<H5D_fill_time_t>::type

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 class hdf5::property::DatasetAllocTime : std::underlying_type<H5D_alloc_time_t>::type

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 class hdf5::property::DatasetLayout : std::underlying_type<H5D_layout_t>::type

enumeration describing the layout of a dataset

Values:

enumerator Compact
enumerator Contiguous
enumerator Chunked
enumerator Virtual

(since hdf5 1.10.0)

std::ostream &hdf5::property::operator<<(std::ostream &stream, const DatasetLayout &layout)

LibVersion

enum class hdf5::property::LibVersion : std::underlying_type<H5F_libver_t>::type

library version enumeration

Values:

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

CopyFlag and CopyFlags

enum class hdf5::property::CopyFlag : unsigned

Values:

enumerator ShallowHierarchy
enumerator ExpandSoftLinks
enumerator ExpandExternalLinks
enumerator ExpandReferences
enumerator WithoutAttributes
enumerator MergeCommittedTypes
CopyFlags hdf5::property::operator|(const CopyFlag &lhs, const CopyFlag &rhs)
CopyFlags hdf5::property::operator|(const CopyFlags &flags, const CopyFlag &flag) noexcept

binary or operator for copy flags

CopyFlags hdf5::property::operator|(const CopyFlag &flag, const CopyFlags &flags) noexcept

binary or operator for copy flags

CopyFlags hdf5::property::operator|(const CopyFlags &flags, const CopyFlags &rhs) noexcept

binary or operator for copy flags

CopyFlags hdf5::property::operator&(const CopyFlag &lhs, const CopyFlag &rhs)
CopyFlags hdf5::property::operator&(const CopyFlags &flags, const CopyFlag &flag) noexcept

binary and operator for copy flags

CopyFlags hdf5::property::operator&(const CopyFlag &flag, const CopyFlags &flags) noexcept

binary and operator for copy flags

CopyFlags hdf5::property::operator&(const CopyFlags &flags, const CopyFlags &rhs) noexcept

binary and operator for copy flags

std::ostream &hdf5::property::operator<<(std::ostream &stream, const CopyFlag &flag)

VirtualDataView

enum class hdf5::property::VirtualDataView : std::underlying_type<H5D_vds_view_t>::type

virtual data view enumeration (since hdf5 1.10.0)

Values:

enumerator FirstMissing
enumerator LastAvailable
std::ostream &hdf5::property::operator<<(std::ostream &stream, const VirtualDataView &view)

CloseDegree

enum class hdf5::property::CloseDegree : std::underlying_type<H5F_close_degree_t>::type

close degree enumeration

Values:

enumerator Weak
enumerator Semi
enumerator Strong
enumerator Default

MPITransferMode

enum class hdf5::property::MPITransferMode : std::underlying_type<H5FD_mpio_xfer_t>::type

Values:

enumerator Independent
enumerator Collective

MPIChunkOption

enum class hdf5::property::MPIChunkOption : std::underlying_type<H5FD_mpio_chunk_opt_t>::type

Values:

enumerator OneLinkChunked
enumerator MultiChunk

Property Class variables

const Class kAttributeCreate
const Class kDatasetAccess
const Class kDatasetCreate
const Class kDatasetXfer
const Class kDatatypeAccess
const Class kDatatypeCreate
const Class kFileAccess
const Class kFileCreate
const Class kFileMount
const Class kGroupAccess
const Class kGroupCreate
const Class kLinkAccess
const Class kLinkCreate
const Class kObjectCopy
const Class kObjectCreate
const Class kStringCreate