HDF5 C++ API  1.10.1
 All Classes Namespaces Functions Variables Typedefs Friends Pages
Public Member Functions | Static Public Attributes | List of all members
H5::DSetCreatPropList Class Reference

Class DSetCreatPropList inherits from ObjCreatPropList and provides wrappers for the HDF5 dataset creation property functions. More...

#include <H5DcreatProp.h>

Inheritance diagram for H5::DSetCreatPropList:
H5::ObjCreatPropList H5::PropList H5::IdComponent

Public Member Functions

 DSetCreatPropList ()
 Default constructor: creates a stub dataset creation property list. More...
 
bool allFiltersAvail () const
 Queries whether all the filters set in this property list are available currently. More...
 
H5D_alloc_time_t getAllocTime () const
 Get space allocation time for this property. More...
 
void setAllocTime (H5D_alloc_time_t alloc_time) const
 Sets space allocation time for dataset during creation. More...
 
int getChunk (int max_ndims, hsize_t *dim) const
 Retrieves the size of the chunks used to store a chunked layout dataset. More...
 
void setChunk (int ndims, const hsize_t *dim) const
 Sets the size of the chunks used to store a chunked layout dataset. More...
 
void getExternal (unsigned idx, size_t name_size, char *name, off_t &offset, hsize_t &size) const
 Returns information about an external file. More...
 
int getExternalCount () const
 Returns the number of external files for a dataset. More...
 
H5D_fill_time_t getFillTime () const
 Gets fill value writing time. More...
 
void setFillTime (H5D_fill_time_t fill_time) const
 Sets fill value writing time for dataset. More...
 
void getFillValue (const DataType &fvalue_type, void *value) const
 Retrieves a dataset fill value. More...
 
void setFillValue (const DataType &fvalue_type, const void *value) const
 Sets a dataset fill value. More...
 
H5Z_filter_t getFilter (int filter_number, unsigned int &flags, size_t &cd_nelmts, unsigned int *cd_values, size_t namelen, char name[], unsigned int &filter_config) const
 Returns information about a filter in a pipeline. More...
 
void getFilterById (H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int *cd_values, size_t namelen, char name[], unsigned int &filter_config) const
 Returns information about a filter in a pipeline given the filter id. More...
 
H5D_layout_t getLayout () const
 Retrieves the layout type of this property list. More...
 
void setLayout (H5D_layout_t layout) const
 Sets the type of storage used store the raw data for a dataset. More...
 
int getNfilters () const
 Returns the number of filters in the pipeline. More...
 
H5D_fill_value_t isFillValueDefined () const
 Check if fill value has been defined for this property. More...
 
void modifyFilter (H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[]) const
 Modifies the specified filter. More...
 
void removeFilter (H5Z_filter_t filter_id) const
 Removes one or more filters. More...
 
void setDeflate (int level) const
 Sets compression method and compression level. More...
 
void setExternal (const char *name, off_t offset, hsize_t size) const
 Adds an external file to the list of external files. More...
 
void setFilter (H5Z_filter_t filter, unsigned int flags=0, size_t cd_nelmts=0, const unsigned int cd_values[]=NULL) const
 Adds a filter to the filter pipeline. More...
 
void setFletcher32 () const
 Sets Fletcher32 checksum of EDC for this property list. More...
 
void setShuffle () const
 Sets method of the shuffle filter. More...
 
void setSzip (unsigned int options_mask, unsigned int pixels_per_block) const
 Sets up for the use of the SZIP compression filter. More...
 
void setNbit () const
 Sets up for the use of the Nbit compression filter.

Exceptions
H5::PropListIException.
More...
 
void setVirtual (const DataSpace &vspace, const char *src_fname, const char *src_dsname, const DataSpace &sspace) const
 Maps elements of a virtual dataset to elements of the source dataset. More...
 
void setVirtual (const DataSpace &vspace, const H5std_string src_fname, const H5std_string src_dsname, const DataSpace &sspace) const
 Maps elements of a virtual dataset to elements of the source dataset. More...
 
virtual H5std_string fromClass () const
 Returns this class name. More...
 
 DSetCreatPropList (const DSetCreatPropList &orig)
 Copy constructor: makes a copy of the original DSetCreatPropList object. More...
 
 DSetCreatPropList (const hid_t plist_id)
 Creates a DSetCreatPropList object using the id of an existing dataset creation property list. More...
 
virtual ~DSetCreatPropList ()
 Noop destructor. More...
 
- Public Member Functions inherited from H5::ObjCreatPropList
 ObjCreatPropList ()
 Creates a file access property list. More...
 
void setAttrPhaseChange (unsigned max_compact=8, unsigned min_dense=6) const
 Sets attribute storage phase change thresholds. More...
 
void getAttrPhaseChange (unsigned &max_compact, unsigned &min_dense) const
 Gets attribute storage phase change thresholds. More...
 
void setAttrCrtOrder (unsigned crt_order_flags) const
 Set the flags for creation order of attributes on an object. More...
 
unsigned getAttrCrtOrder () const
 Returns the flags indicating creation order is tracked/indexed for attributes on an object. More...
 
 ObjCreatPropList (const ObjCreatPropList &original)
 Copy Constructor: makes a copy of the original. More...
 
 ObjCreatPropList (const hid_t plist_id)
 Creates a file access property list using the id of an existing one. More...
 
virtual ~ObjCreatPropList ()
 Noop destructor. More...
 
- Public Member Functions inherited from H5::PropList
 PropList (const hid_t plist_id)
 Creates a property list using the id of an existing property. More...
 
PropListoperator= (const PropList &rhs)
 Assignment operator. More...
 
bool operator== (const PropList &rhs) const
 Compares this property list or class against the given list or class. More...
 
virtual void close ()
 Closes the property list if it is not a default one. More...
 
void closeClass () const
 Close a property list class. More...
 
void copy (const PropList &like_plist)
 Makes a copy of an existing property list. More...
 
void copyProp (PropList &dest, const char *name) const
 Copies a property from this property list or class to another. More...
 
void copyProp (PropList &dest, const H5std_string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
void copyProp (PropList &dest, PropList &src, const char *name) const
 Copies a property from one list or class to another - Obsolete. More...
 
void copyProp (PropList &dest, PropList &src, const H5std_string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. - Obsolete. More...
 
hid_t getClass () const
 Returns the class of this property list, i.e. H5P_FILE_CREATE... More...
 
H5std_string getClassName () const
 Return the name of a generic property list class. More...
 
PropList getClassParent () const
 Returns the parent class of a generic property class. More...
 
size_t getNumProps () const
 Returns the number of properties in this property list or class. More...
 
void getProperty (const char *name, void *value) const
 Query the value of a property in a property list. More...
 
void getProperty (const H5std_string &name, void *value) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
H5std_string getProperty (const char *name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
H5std_string getProperty (const H5std_string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
void setProperty (const char *name, const char *charptr) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
void setProperty (const char *name, const void *value) const
 Set a property's value in a property list. More...
 
void setProperty (const char *name, const H5std_string &strg) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
void setProperty (const H5std_string &name, const void *value) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
void setProperty (const H5std_string &name, const H5std_string &strg) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
void setProperty (const char *name, void *value) const
 Deprecated due to missing const in prototype. (1.10.1) More...
 
void setProperty (const char *name, H5std_string &strg) const
 Deprecated due to missing const in prototype. (1.10.1) More...
 
void setProperty (const H5std_string &name, void *value) const
 Deprecated due to missing const in prototype. (1.10.1) More...
 
void setProperty (const H5std_string &name, H5std_string &strg) const
 Deprecated due to missing const in prototype. (1.10.1) More...
 
size_t getPropSize (const char *name) const
 Query the size of a property in a property list or class. More...
 
size_t getPropSize (const H5std_string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
bool isAClass (const PropList &prop_class) const
 Determines whether a property list is a certain class. More...
 
bool propExist (const char *name) const
 Query the existance of a property in a property object. More...
 
bool propExist (const H5std_string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
void removeProp (const char *name) const
 Removes a property from a property list. More...
 
void removeProp (const H5std_string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts. More...
 
 PropList ()
 Default constructor: creates a stub property list object. More...
 
 PropList (const PropList &original)
 Copy constructor. More...
 
virtual hid_t getId () const
 Get the id of this property list. More...
 
virtual ~PropList ()
 Properly terminates access to this property list. More...
 
- Public Member Functions inherited from H5::IdComponent
void incRefCount (const hid_t obj_id) const
 Increment reference counter for a given id. More...
 
void incRefCount () const
 Increment reference counter for the id of this object. More...
 
void decRefCount (const hid_t obj_id) const
 Decrement reference counter for a given id. More...
 
void decRefCount () const
 Decrement reference counter for the id of this object. More...
 
int getCounter (const hid_t obj_id) const
 Returns the reference counter for a given id. More...
 
int getCounter () const
 Returns the reference counter for the id of this object. More...
 
H5I_type_t getHDFObjType () const
 Returns the type of the object. It is an overloaded function of the above function. More...
 
IdComponentoperator= (const IdComponent &rhs)
 Assignment operator. More...
 
void setId (const hid_t new_id)
 Sets the identifier of this object to a new value. More...
 
virtual ~IdComponent ()
 Noop destructor. More...
 

Static Public Attributes

static const DSetCreatPropListDEFAULT
 Default dataset creation property list. More...
 
- Static Public Attributes inherited from H5::ObjCreatPropList
static const ObjCreatPropListDEFAULT
 Default object creation property list. More...
 
- Static Public Attributes inherited from H5::PropList
static const PropListDEFAULT
 Default property list. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from H5::IdComponent
static H5I_type_t getHDFObjType (const hid_t obj_id)
 Given an id, returns the type of the object. More...
 
static hsize_t getNumMembers (H5I_type_t type)
 Returns the number of members of the given type. More...
 
static bool isValid (hid_t an_id)
 Checks if the given ID is valid. More...
 
static bool typeExists (H5I_type_t type)
 Queries if a given type is currently registered with the library. More...
 

Detailed Description

Examples:
chunks.cpp, extend_ds.cpp, h5group.cpp, and writedata.cpp.

Constructor & Destructor Documentation

H5::DSetCreatPropList::DSetCreatPropList ( )
H5::DSetCreatPropList::DSetCreatPropList ( const DSetCreatPropList orig)
H5::DSetCreatPropList::DSetCreatPropList ( const hid_t  plist_id)
H5::DSetCreatPropList::~DSetCreatPropList ( )
virtual

Member Function Documentation

bool H5::DSetCreatPropList::allFiltersAvail ( ) const
Returns
true if all filters available, and false if one or more filters not currently available
Exceptions
H5::PropListIException
virtual H5std_string H5::DSetCreatPropList::fromClass ( ) const
inlinevirtual

Reimplemented from H5::ObjCreatPropList.

H5D_alloc_time_t H5::DSetCreatPropList::getAllocTime ( ) const
Returns
Space allocation time.
Exceptions
H5::PropListIException
Description
The values of space allocation time can be one of the followings:
  • H5D_ALLOC_TIME_DEFAULT
  • H5D_ALLOC_TIME_EARLY
  • H5D_ALLOC_TIME_LATE
  • H5D_ALLOC_TIME_INCR
int H5::DSetCreatPropList::getChunk ( int  max_ndims,
hsize_t *  dim 
) const
Parameters
max_ndims- IN: Size of dim array
dim- OUT: Array to store the chunk dimensions
Exceptions
H5::PropListIException
Examples:
chunks.cpp.
void H5::DSetCreatPropList::getExternal ( unsigned  idx,
size_t  name_size,
char *  name,
off_t &  offset,
hsize_t &  size 
) const
Parameters
idx- IN: Index of the external file, ranges [0-(N-1)] and returned by getExternalCount()
name_size- IN: Maximum length of name
name- OUT: Name of the external file
offset- OUT: Location to return an offset value
size- OUT: Location to return the size of the external file data
Exceptions
H5::PropListIException
Description
The parameter idx ranges [0..N-1] where N is returned by getExternalCount(). At most name_size characters are copied into the name array. If the external file name is longer than name_size with the null terminator, the return value is not null terminated (similar to strncpy()). If name_size is zero or name is a null pointer, the external file name will not be returned. If offset or size are null pointers then the corresponding information will not be returned.
int H5::DSetCreatPropList::getExternalCount ( ) const
Returns
Number of external files
Exceptions
H5::PropListIException
H5D_fill_time_t H5::DSetCreatPropList::getFillTime ( ) const
Returns
Fill value writing time
Exceptions
H5::PropListIException
Description
Valid values for fill value writing time include
  • H5D_FILL_TIME_NEVER
  • H5D_FILL_TIME_ALLOC.
void H5::DSetCreatPropList::getFillValue ( const DataType fvalue_type,
void *  value 
) const
Parameters
fvalue_type- IN: Data type for the value passed via value
value- OUT: Pointer to buffer to hold the retrieved fill value
Exceptions
H5::PropListIException
Description
The fill value is returned through value pointer and the memory is allocated by the caller. The fill value will be converted from its current data type to the specified by fvalue_type.

References H5::DataType::getId().

H5Z_filter_t H5::DSetCreatPropList::getFilter ( int  filter_number,
unsigned int &  flags,
size_t &  cd_nelmts,
unsigned int *  cd_values,
size_t  namelen,
char  name[],
unsigned int &  filter_config 
) const
Parameters
filter_number- IN: Filter to get, range [0..N-1], where N is returned by H5Pget_nfilters()
flags- OUT: General properties of the filter
cd_nelmts- IN/OUT: Number of elements in cd_values /Number of values defined by the filter
cd_values- OUT: Array to hold the data; allocated by the user
namelen- IN: Length of name
name- OUT: Name of the filter
filter_config- OUT: Flags indicating whether filter can encode/decode
Returns
Filter id
Exceptions
H5::PropListIException
Description
Failure occurs when filter_number is out of range.
void H5::DSetCreatPropList::getFilterById ( H5Z_filter_t  filter_id,
unsigned int &  flags,
size_t &  cd_nelmts,
unsigned int *  cd_values,
size_t  namelen,
char  name[],
unsigned int &  filter_config 
) const
Parameters
filter_id- IN: Filter to get
flags- OUT: General properties of the filter
cd_nelmts- IN/OUT: Number of elements in cd_values /Number of values defined by the filter
cd_values- OUT: Array to hold the data; allocated by the user
namelen- IN: Length of name
name- OUT: Name of the filter
filter_config- OUT: Flags indicating whether filter can encode/decode
Exceptions
H5::PropListIException
H5D_layout_t H5::DSetCreatPropList::getLayout ( ) const
Returns
Layout type, which can be:
  • H5D_COMPACT - raw data is stored in the object header in the file.
  • H5D_CONTIGUOUS - raw data is stored separately from the object header in one contiguous chunk in the file.
  • H5D_CHUNKED - raw data is stored separately from the object header in chunks in separate locations in the file.
Exceptions
H5::PropListIException
Description
Examples:
chunks.cpp.
int H5::DSetCreatPropList::getNfilters ( ) const
Returns
Number of filters
Exceptions
H5::PropListIException
H5D_fill_value_t H5::DSetCreatPropList::isFillValueDefined ( ) const
Returns
  • H5D_FILL_VALUE_UNDEFINED =0,
  • H5D_FILL_VALUE_DEFAULT =1,
  • H5D_FILL_VALUE_USER_DEFINED =2
Exceptions
H5::PropListIException
void H5::DSetCreatPropList::modifyFilter ( H5Z_filter_t  filter_id,
unsigned int  flags,
size_t  cd_nelmts,
const unsigned int  cd_values[] 
) const
Parameters
filter_id- IN: Filter to get
flags- OUT: General properties of the filter
cd_nelmts- IN: Number of elements in cd_values
OUT: Number of values defined by the filter
cd_values- OUT: Array to hold the data; allocated by the user
Exceptions
H5::PropListIException
Description
The flags argument is a bit vector of the field: H5Z_FLAG_OPTIONAL(0x0001)
If this bit is set then the filter is optional. If the filter fails during a DataSet::write() operation then the filter is just excluded from the pipeline for the chunk for which it failed; the filter will not participate in the pipeline during a DataSet::read() of the chunk. If this bit is clear and the filter fails then the entire I/O operation fails.
void H5::DSetCreatPropList::removeFilter ( H5Z_filter_t  filter_id) const
Parameters
filter_id- IN: Filter to remove
Exceptions
H5::PropListIException
Description
Deletes a filter from the dataset creation property list; deletes all filters if filter_id is H5Z_FILTER_NONE.
void H5::DSetCreatPropList::setAllocTime ( H5D_alloc_time_t  alloc_time) const
Parameters
alloc_time- IN: Allocation time
Exceptions
H5::PropListIException
Description
Valid values for space allocation time include:
  • H5D_ALLOC_TIME_DEFAULT
  • H5D_ALLOC_TIME_EARLY
  • H5D_ALLOC_TIME_LATE
  • H5D_ALLOC_TIME_INCR
void H5::DSetCreatPropList::setChunk ( int  ndims,
const hsize_t *  dim 
) const
Parameters
ndims- IN: Number of dimensions of each chunk
dim- IN: Array containing the size of each chunk
Exceptions
H5::PropListIException
Description
The ndims parameter currently must have the same value as the rank of the dataset. The values of the dim array define the size of the chunks to store the dataset's raw data. As a side-effect, the layout of the dataset will be changed to H5D_CHUNKED, if it is not so already.
Examples:
extend_ds.cpp, and h5group.cpp.
void H5::DSetCreatPropList::setDeflate ( int  level) const
Parameters
level- IN: Compression level, should [0..9], inclusive
Exceptions
H5::PropListIException
Description
The function sets the compression method for this property list to H5D_COMPRESS_DEFLATE and the compression level to level. Lower compression levels are faster but result in less compression.
Examples:
h5group.cpp.
void H5::DSetCreatPropList::setExternal ( const char *  name,
off_t  offset,
hsize_t  size 
) const
Parameters
name- IN: Name of the external file
offset- IN: Location where the data starts in the file
size- IN: Number of bytes reserved in the file for the data
Exceptions
H5::PropListIException
Description
If a dataset is splitted across multiple files then the files should be defined in order. The total size of the dataset is the sum of the size arguments for all the external files. If the total size is larger than the size of a dataset then the dataset can be extended (provided the data space also allows the extending).
void H5::DSetCreatPropList::setFillTime ( H5D_fill_time_t  fill_time) const
Returns
Fill value writing time
Exceptions
H5::PropListIException
Description
Valid values for fill value writing time include
  • H5D_FILL_TIME_NEVER
  • H5D_FILL_TIME_ALLOC.
void H5::DSetCreatPropList::setFillValue ( const DataType fvalue_type,
const void *  value 
) const
Parameters
fvalue_type- IN: Data type for the value passed via value
value- IN: Pointer to buffer containing the fill value
Exceptions
H5::PropListIException
Description
The datatype may differ from that of the dataset, but it must be one that the HDF5 library is able to convert value to the dataset datatype when the dataset is created. The default fill value is 0 (zero,) which is interpreted according to the actual dataset datatype.
For information on setting fill value, please refer to the C layer Reference Manual at: http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFillValue
Examples:
extend_ds.cpp, and writedata.cpp.

References H5::DataType::getId().

void H5::DSetCreatPropList::setFilter ( H5Z_filter_t  filter_id,
unsigned int  flags = 0,
size_t  cd_nelmts = 0,
const unsigned int  cd_values[] = NULL 
) const
Parameters
filter_id- IN: Filter to add
flags- IN: Specifies general properties of the filter
cd_nelmts- IN: Number of elements in cd_values
cd_values- IN: Auxiliary data for the filter
Exceptions
H5::PropListIException
Description
The flags argument is a bit vector of the field: H5Z_FLAG_OPTIONAL(0x0001)
If this bit is set then the filter is optional. If the filter fails during a DataSet::write() operation then the filter is just excluded from the pipeline for the chunk for which it failed; the filter will not participate in the pipeline during a DataSet::read() of the chunk. If this bit is clear and the filter fails then the entire I/O operation fails.
void H5::DSetCreatPropList::setFletcher32 ( ) const
void H5::DSetCreatPropList::setLayout ( H5D_layout_t  layout) const
Parameters
layout- IN: Type of storage layout for raw data
Exceptions
H5::PropListIException
Description
For information on valid layout types, please refer to http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetLayout
void H5::DSetCreatPropList::setNbit ( ) const
Description
The associate C function sets an Nbit compression filter, H5Z_FILTER_NBIT, for a dataset. For more information about Nbit compression, please refer to the C layer Reference Manual at: http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-setNbit
void H5::DSetCreatPropList::setShuffle ( ) const
Exceptions
H5::PropListIException
Description
Please refer to the Reference Manual of H5Pset_shuffle for details. http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetShuffle
void H5::DSetCreatPropList::setSzip ( unsigned int  options_mask,
unsigned int  pixels_per_block 
) const
Parameters
options_mask- IN: A bit-mask conveying the desired SZIP options. Valid values are H5_SZIP_EC_OPTION_MASK and H5_SZIP_NN_OPTION_MASK.
pixels_per_block- IN: Number of pixels or data elements in each data block.
Exceptions
H5::PropListIException
Description
The associate C function sets an SZIP compression filter, H5Z_FILTER_SZIP, for a dataset. For more information about SZIP and usage, please refer to the C layer Reference Manual at: http://hdfgroup.org/HDF5/doc/RM_H5P.html#Property-SetSzip
void H5::DSetCreatPropList::setVirtual ( const DataSpace vspace,
const char *  src_fname,
const char *  src_dsname,
const DataSpace sspace 
) const
Parameters
vspace- IN: Dataspace the virtual dataset, possibly an unlimited selection
src_fname- IN: Name of the HDF5 file where the source dataset is located (char*)
src_dsname- IN: Path to the dataset in the file specified by src_file_name (char*)
sspace- IN: Dataspace with a selection applied, possibly an unlimited selection
Exceptions
H5::PropListIException
Description
https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetVirtual

References H5::DataSpace::getId().

Referenced by setVirtual().

void H5::DSetCreatPropList::setVirtual ( const DataSpace vspace,
const H5std_string  src_fname,
const H5std_string  src_dsname,
const DataSpace sspace 
) const
Parameters
vspace- IN: Dataspace the virtual dataset, possibly an unlimited selection
src_fname- IN: Name of the HDF5 file where the source dataset is located (H5std_string)
src_dsname- IN: Path to the dataset in the file specified by src_file_name (H5std_string)
sspace- IN: Dataspace with a selection applied, possibly an unlimited selection
Exceptions
H5::PropListIException
Description
https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetVirtual

References setVirtual().

Member Data Documentation

const DSetCreatPropList& H5::DSetCreatPropList::DEFAULT
static

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


The HDF Group Help Desk:
  Copyright by The HDF Group
and the Board of Trustees of the University of Illinois