Namespace hdf5::filter

enum hdf5::filter::Availability

availability requirement of a filter

When a filter is applied to a dataset creation property list the user in general must declare a degree of availability for the filter. A filter can be either optional or mandatory. In the former case the filter is simply omitted if not available (for instance an external filter) in the latter case the operation fails if the filter is not available.

This enumeration type is used to mark a filter as optional or mandatory.

Values:

enumerator MANDATORY
enumerator OPTIONAL
class hdf5::filter::Filter

abstract filter class

Base class for all filters. These classes are primarily intended to allow easy configuration of filters. They basically only store the fitlers parameters and apply them to the dataset creation property list.

Subclassed by hdf5::filter::Deflate, hdf5::filter::ExternalFilter, hdf5::filter::Fletcher32, hdf5::filter::Shuffle

Public Functions

Filter()

default constructor

Required for compliance with STL containers. Can use the default implementation.

virtual void operator()(const property::DatasetCreationList &dcpl, Availability flag = Availability::MANDATORY) const = 0

apply filter

Applies a filter to a particular dataset creation property list.

Throws

std::runtime_error – in case of a failure

Parameters
  • dcpl – reference to the dataset creation property list

  • flag – determines the availability requirement for a filter which is mandatory by default.

FilterID id() const noexcept

get the ID of the filter

Return the actual ID of a filter. As we do not store any particular HDF5 state in this class this function does not throw and is a constexpr.

class hdf5::filter::Deflate : public hdf5::filter::Filter

Public Functions

virtual void operator()(const property::DatasetCreationList &dcpl, Availability flag = Availability::MANDATORY) const

apply filter

Applies a filter to a particular dataset creation property list.

Throws

std::runtime_error – in case of a failure

Parameters
  • dcpl – reference to the dataset creation property list

  • flag – determines the availability requirement for a filter which is mandatory by default.

class hdf5::filter::Shuffle : public hdf5::filter::Filter

Public Functions

virtual void operator()(const property::DatasetCreationList &dcpl, Availability flag = Availability::MANDATORY) const

apply filter

Applies a filter to a particular dataset creation property list.

Throws

std::runtime_error – in case of a failure

Parameters
  • dcpl – reference to the dataset creation property list

  • flag – determines the availability requirement for a filter which is mandatory by default.

class hdf5::filter::Fletcher32 : public hdf5::filter::Filter

Fletcher32 checksum filter.

If applied to a dataset creation property list this filter will setup the fletcher32 checksum filter.

Public Functions

Fletcher32()

default constructor

virtual void operator()(const property::DatasetCreationList &dcpl, Availability flag = Availability::MANDATORY) const

apply filter

Applies the filter to a dataset creation property list.

Throws

std::runtime_error – in case of a failure

Parameters

dcpl – reference to the dataset creation property list