Factory classes¶
pni::BaseClassFactory
¶
-
class BaseClassFactory¶
base class factory
Factory class for base classes.
Public Static Functions
-
static hdf5::node::Group create(const hdf5::node::Group &parent, const hdf5::Path &path, const std::string &class_name, const hdf5::property::LinkCreationList &lcpl = hdf5::property::LinkCreationList(), const hdf5::property::GroupCreationList &gcpl = hdf5::property::GroupCreationList(), const hdf5::property::GroupAccessList &gapl = hdf5::property::GroupAccessList())¶
create a new base class
Create a new HDF5 group which satisfies the requirements of a base class. The function checks if the name of the group compiles with the NeXus standard.
- Throws:
std::runtime_error – in case of a failure
- Parameters:
parent – reference to the parent group on which to create the base class
path – reference to the path to the base class
class_name – reference to the class name of the base class
lcpl – optional reference to a link creation property list
gcpl – optional reference to a group creation property list
gapl – optional reference to a group access property list
- Returns:
an instance of hdf5::node::Group
-
static hdf5::node::Group create(const hdf5::node::Group &parent, const hdf5::Path &path, const std::string &class_name, const hdf5::property::LinkCreationList &lcpl = hdf5::property::LinkCreationList(), const hdf5::property::GroupCreationList &gcpl = hdf5::property::GroupCreationList(), const hdf5::property::GroupAccessList &gapl = hdf5::property::GroupAccessList())¶
pni::FieldFactory
¶
-
class FieldFactory¶
factory class for fields
This factory class provides two static factory functions creating HDF5 datasets which comply to the NeXus rules. In particular these functions take care that the name of the dataset is compatible with the NeXus naming rules.
Public Static Functions
-
static hdf5::node::Dataset create(const hdf5::node::Group &parent, const hdf5::Path &path, const hdf5::datatype::Datatype &type, const hdf5::dataspace::Dataspace &space, const hdf5::property::LinkCreationList &lcpl = hdf5::property::LinkCreationList(), const hdf5::property::DatasetCreationList &dcpl = hdf5::property::DatasetCreationList(), const hdf5::property::DatasetAccessList &acpl = hdf5::property::DatasetAccessList())¶
create a dataset
Forwards all arguments to the hdf5::node::Dataset constructor after checking if the name of the field complies to the NeXus naming conventions. If this is not the case std::runtime_error is thrown.
- Throws:
std::runtime_error – in case of a failure
- Parameters:
parent – reference to the parent group
path – reference to the path of the new field
type – reference to the data type of the new field
space – reference to the data space of the new field
lcpl – optional reference to a link creation property list
dcpl – optional reference to a dataset creation property list
acpl – optional reference to a dataset access property list
-
static hdf5::node::Dataset create(const hdf5::node::Group &parent, const hdf5::Path &path, const hdf5::datatype::Datatype &type, const hdf5::dataspace::Simple &space, const hdf5::Dimensions &chunk_shape, const hdf5::property::LinkCreationList &lcpl = hdf5::property::LinkCreationList(), const hdf5::property::DatasetCreationList &dcpl = hdf5::property::DatasetCreationList(), const hdf5::property::DatasetAccessList &acpl = hdf5::property::DatasetAccessList())¶
create a chunked dataset
- Throws:
std::runtime_error – in case of a failure
- Parameters:
parent – reference to the parent group
path – reference to the new path of the field
type – reference to the data type of the field
space – reference to the data space of the field
chunk_shape – reference to the chunk shape of the field
lcpl – optional reference to a link creation property list
dcpl – optional reference to a dataset creation property list
acpl – optional reference to a dataset access property list
-
static hdf5::node::Dataset create(const hdf5::node::Group &parent, const hdf5::Path &path, const hdf5::datatype::Datatype &type, const hdf5::dataspace::Dataspace &space, const hdf5::property::LinkCreationList &lcpl = hdf5::property::LinkCreationList(), const hdf5::property::DatasetCreationList &dcpl = hdf5::property::DatasetCreationList(), const hdf5::property::DatasetAccessList &acpl = hdf5::property::DatasetAccessList())¶
pni::DatatypeFactory
¶
-
class DatatypeFactory¶
creates HDF5 datatypes from type_id_t values
This service class provides a static method constructing HDF5 datatypes from type_id_t enumerations.
Public Static Functions