Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/
HDF5 Last Updated on 2025-12-16
The HDF5 Field Guide
Loading...
Searching...
No Matches
FileAccPropList Class Reference

#include <c++/src/H5FaccProp.h>

Detailed Description

Class FileAccPropList inherits from PropList and provides wrappers for the HDF5 file access property list.

+ Inheritance diagram for FileAccPropList:

Public Member Functions

 FileAccPropList ()
 Creates a file access property list.
 
 FileAccPropList (const FileAccPropList &original)
 Copy constructor: same HDF5 object as original.
 
 FileAccPropList (const hid_t plist_id)
 Creates a file access property list using the id of an existing one.
 
virtual std::string fromClass () const override
 Returns this class name.
 
void getAlignment (hsize_t &threshold, hsize_t &alignment) const
 Returns the current settings for alignment properties from this property list.
 
void getCache (int &mdc_nelmts, size_t &rdcc_nelmts, size_t &rdcc_nbytes, double &rdcc_w0) const
 Queries the meta data cache and raw data chunk cache parameters.
 
void getCore (size_t &increment, bool &backing_store) const
 Queries core file driver properties.
 
hid_t getDriver () const
 Return the ID of the low-level file driver.
 
FileAccPropList getFamily (hsize_t &memb_size) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts and its return value.
 
void getFamily (hsize_t &memb_size, FileAccPropList &memb_plist) const
 Returns information about the family file access property list.
 
hsize_t getFamilyOffset () const
 Get offset for family driver.
 
H5F_close_degree_t getFcloseDegree () const
 Returns the degree for the file close behavior.
 
void getFileAccDirect (size_t &boundary, size_t &block_size, size_t &cbuf_size) const
 
void getFileLocking (bool &use_file_locking, bool &ignore_when_disabled) const
 Gets file locking flags.
 
unsigned getGcReferences () const
 Returns the garbage collecting references setting.
 
void getLibverBounds (H5F_libver_t &libver_low, H5F_libver_t &libver_high) const
 Gets the current settings for the library version format bounds from a file access property list.
 
hsize_t getMetaBlockSize () const
 Returns the current metadata block size setting.
 
H5FD_mem_t getMultiType () const
 Returns the data type property for MULTI driver.
 
size_t getSieveBufSize () const
 Returns the current settings for the data sieve buffer size property from this property list.
 
void setAlignment (hsize_t threshold=1, hsize_t alignment=1) const
 Sets the alignment properties of this property list.
 
void setCache (int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0) const
 Sets the meta data cache and raw data chunk cache parameters.
 
void setCore (size_t increment, bool backing_store) const
 Modifies this file access property list to use the H5FD_CORE driver.
 
void setDriver (hid_t new_driver_id, const void *new_driver_info) const
 Set file driver for this property list.
 
void setFamily (hsize_t memb_size, const FileAccPropList &memb_plist) const
 Sets this file access property list to use the family driver.
 
void setFamilyOffset (hsize_t offset) const
 Sets offset for family driver.
 
void setFcloseDegree (H5F_close_degree_t degree) const
 Sets the degree for the file close behavior.
 
void setFileAccDirect (size_t boundary, size_t block_size, size_t cbuf_size) const
 
void setFileLocking (bool use_file_locking, bool ignore_when_disabled) const
 Sets file locking flags.
 
void setGcReferences (unsigned gc_ref=0) const
 Sets garbage collecting references flag.
 
void setLibverBounds (H5F_libver_t libver_low, H5F_libver_t libver_high) const
 Sets bounds on versions of library format to be used when creating or writing objects.
 
void setLog (const char *logfile, unsigned flags, size_t buf_size) const
 Modifies this file access property list to use the logging driver.
 
void setLog (const std::string &logfile, unsigned flags, size_t buf_size) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.
 
void setMetaBlockSize (hsize_t &block_size) const
 Sets the minimum size of metadata block allocations.
 
void setMultiType (H5FD_mem_t dtype) const
 Sets data type for MULTI driver.
 
void setSec2 () const
 Modifies this file access property list to use the sec2 driver.
 
void setSieveBufSize (size_t bufsize) const
 Sets the maximum size of the data sieve buffer.
 
void setSplit (const FileAccPropList &meta_plist, const FileAccPropList &raw_plist, const char *meta_ext=".meta", const char *raw_ext=".raw") const
 Emulates the old split file driver, which stored meta data in one file and raw data in another file.
 
void setSplit (const FileAccPropList &meta_plist, const FileAccPropList &raw_plist, const std::string &meta_ext=".meta", const std::string &raw_ext=".raw") const
 This is an overloaded member function, provided for convenience. It takes character arguments as H5std_string.
 
void setStdio () const
 Modifies this property list to use the H5FD_STDIO driver.
 
virtual ~FileAccPropList () override=default
 
- Public Member Functions inherited from PropList
virtual void close () override
 Closes the property list if it is not a default one.
 
void closeClass () const
 Close a property list class.
 
void copy (const PropList &like_plist)
 Makes a copy of an existing property list.
 
void copyProp (PropList &dest, const char *name) const
 Copies a property from this property list or class to another.
 
void copyProp (PropList &dest, const std::string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.
 
void copyProp (PropList &dest, PropList &src, const char *name) const
 Copies a property from one list or class to another - Obsolete.
 
void copyProp (PropList &dest, PropList &src, const std::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.
 
hid_t getClass () const
 Returns the class of this property list, i.e. H5P_FILE_CREATE...
 
std::string getClassName () const
 Return the name of a generic property list class.
 
PropList getClassParent () const
 Returns the parent class of a generic property class.
 
virtual hid_t getId () const override
 Get the id of this property list.
 
size_t getNumProps () const
 Returns the number of properties in this property list or class.
 
std::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.
 
void getProperty (const char *name, void *value) const
 Query the value of a property in a property list.
 
std::string getProperty (const std::string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.
 
void getProperty (const std::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.
 
size_t getPropSize (const char *name) const
 Query the size of a property in a property list or class.
 
size_t getPropSize (const std::string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.
 
bool isAClass (const PropList &prop_class) const
 Determines whether a property list is a certain class.
 
PropListoperator= (const PropList &rhs)
 Assignment operator.
 
bool operator== (const PropList &rhs) const
 Compares this property list or class against the given list or class.
 
bool propExist (const char *name) const
 Query the existence of a property in a property object.
 
bool propExist (const std::string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.
 
 PropList ()
 Default constructor: creates a stub property list object.
 
 PropList (const hid_t plist_id)
 Creates a property list using the id of an existing property.
 
 PropList (const PropList &original)
 Copy constructor: same HDF5 object as original.
 
void removeProp (const char *name) const
 Removes a property from a property list.
 
void removeProp (const std::string &name) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.
 
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.
 
void setProperty (const char *name, const std::string &strg) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.
 
void setProperty (const char *name, const void *value) const
 Set a property's value in a property list.
 
void setProperty (const char *name, std::string &strg) const
 Deprecated due to missing const in prototype. (1.10.1)
 
void setProperty (const char *name, void *value) const
 Deprecated due to missing const in prototype. (1.10.1)
 
void setProperty (const std::string &name, const std::string &strg) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.
 
void setProperty (const std::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.
 
void setProperty (const std::string &name, std::string &strg) const
 Deprecated due to missing const in prototype. (1.10.1)
 
void setProperty (const std::string &name, void *value) const
 Deprecated due to missing const in prototype. (1.10.1)
 
virtual ~PropList () override
 Properly terminates access to this property list.
 
- Public Member Functions inherited from IdComponent
void decRefCount () const
 Decrement reference counter for the id of this object.
 
void decRefCount (const hid_t obj_id) const
 Decrement reference counter for a given id.
 
int getCounter () const
 Returns the reference counter for the id of this object.
 
int getCounter (const hid_t obj_id) const
 Returns the reference counter for a given id.
 
H5I_type_t getHDFObjType () const
 Returns the type of the object. It is an overloaded function of the above function.
 
void incRefCount () const
 Increment reference counter for the id of this object.
 
void incRefCount (const hid_t obj_id) const
 Increment reference counter for a given id.
 
std::string inMemFunc (const char *func_name) const
 Makes and returns string "<class-name>::<func_name>".
 
IdComponentoperator= (const IdComponent &rhs)
 Assignment operator.
 
void setId (const hid_t new_id)
 Sets the identifier of this object to a new value.
 
virtual ~IdComponent ()=default
 

Static Public Member Functions

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

Static Public Attributes

static const FileAccPropListDEFAULT = *getConstant()
 Default file access property list.
 
- Static Public Attributes inherited from PropList
static const PropListDEFAULT = *getConstant()
 Default property list.
 

Additional Inherited Members

- Protected Member Functions inherited from PropList
virtual void p_setId (const hid_t new_id) override
 Sets the identifier of this object to a new value.
 
- Protected Member Functions inherited from IdComponent
 IdComponent ()
 Default constructor.
 
std::string p_get_file_name () const
 
- Static Protected Member Functions inherited from IdComponent
static bool p_valid_id (const hid_t obj_id)
 
- Protected Attributes inherited from PropList
hid_t id
 
- Static Protected Attributes inherited from IdComponent
static bool H5dontAtexit_called = false
 

Constructor & Destructor Documentation

◆ FileAccPropList() [1/3]

Creates a file access property list.

◆ FileAccPropList() [2/3]

FileAccPropList ( const FileAccPropList & original)

Copy constructor: same HDF5 object as original.

Parameters
original- IN: FileAccPropList instance to copy

◆ FileAccPropList() [3/3]

FileAccPropList ( const hid_t plist_id)

Creates a file access property list using the id of an existing one.

◆ ~FileAccPropList()

virtual ~FileAccPropList ( )
overridevirtualdefault

Member Function Documentation

◆ deleteConstants()

void deleteConstants ( )
static

◆ fromClass()

virtual std::string fromClass ( ) const
overridevirtual

Returns this class name.

Reimplemented from PropList.

◆ getAlignment()

void getAlignment ( hsize_t & threshold,
hsize_t & alignment ) const

Returns the current settings for alignment properties from this property list.

Parameters
threshold- OUT: Retrieved threshold value for file object size
alignment- OUT: Retrieved alignment value
Exceptions
H5::PropListIException

◆ getCache()

void getCache ( int & mdc_nelmts,
size_t & rdcc_nelmts,
size_t & rdcc_nbytes,
double & rdcc_w0 ) const

Queries the meta data cache and raw data chunk cache parameters.

Parameters
mdc_nelmts- OUT: Number of elements in the meta data cache
rdcc_nelmts- OUT: Number of elements in the raw data chunk cache
rdcc_nbytes- OUT: Total size of the raw data chunk cache, in bytes
rdcc_w0- OUT: Preemption policy
Exceptions
H5::PropListIException

◆ getCore()

void getCore ( size_t & increment,
bool & backing_store ) const

Queries core file driver properties.

Parameters
increment- OUT: Size of memory increment, in bytes
backing_store- OUT: Indicating whether to write the file contents to disk when the file is closed
Exceptions
H5::PropListIException

◆ getDriver()

hid_t getDriver ( ) const

Return the ID of the low-level file driver.

Returns
A low-level driver ID which is the same ID used when the driver was set for the property list. The driver ID is only valid as long as the file driver remains registered. For detail on valid driver identifiers, please refer to the H5Pget_driver API in the HDF5 C Reference Manual.
Exceptions
H5::PropListIException

◆ getFamily() [1/2]

FileAccPropList getFamily ( hsize_t & memb_size) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts and its return value.

Parameters
memb_size- OUT: Size in bytes of each file member
Returns
The file access property list for each file member
Exceptions
H5::PropListIException

◆ getFamily() [2/2]

void getFamily ( hsize_t & memb_size,
FileAccPropList & memb_plist ) const

Returns information about the family file access property list.

Parameters
memb_size- OUT: Size in bytes of each file member
memb_plist- OUT: Retrieved file access property list for each file member
Exceptions
H5::PropListIException

◆ getFamilyOffset()

hsize_t getFamilyOffset ( ) const

Get offset for family driver.

Returns
Offset for family driver
Exceptions
H5::PropListIException

◆ getFcloseDegree()

H5F_close_degree_t getFcloseDegree ( ) const

Returns the degree for the file close behavior.

Returns
The degree for the file close behavior
Exceptions
H5::PropListIException

◆ getFileAccDirect()

void getFileAccDirect ( size_t & boundary,
size_t & block_size,
size_t & cbuf_size ) const

◆ getFileLocking()

void getFileLocking ( bool & use_file_locking,
bool & ignore_when_disabled ) const

Gets file locking flags.

Parameters
use_file_locking- OUT: Flag that determines if file locks
ignore_when_disabled- OUT: Flag that determines if file locks
Exceptions
H5::PropListIException
Description
For information, please refer to the H5Pget_file_locking API in the HDF5 C Reference Manual.

◆ getGcReferences()

unsigned getGcReferences ( ) const

Returns the garbage collecting references setting.

Returns
Garbage collecting references setting, 0 (off) or 1 (on)
Exceptions
H5::PropListIException

◆ getLibverBounds()

void getLibverBounds ( H5F_libver_t & libver_low,
H5F_libver_t & libver_high ) const

Gets the current settings for the library version format bounds from a file access property list.

Parameters
libver_low- OUT: Earliest version of the library that will be used for creating or writing objects
libver_high- OUT: Latest version of the library that will be used for creating or writing objects
Exceptions
H5::PropListIException
Description
On success, the argument libver_low can have the following values:
  • H5F_LIBVER_EARLIEST
  • H5F_LIBVER_18
  • H5F_LIBVER_110
  • H5F_LIBVER_112
  • H5F_LIBVER_114
  • H5F_LIBVER_200
  • H5F_LIBVER_LATEST
and libver_high:
  • H5F_LIBVER_18
  • H5F_LIBVER_110
  • H5F_LIBVER_112
  • H5F_LIBVER_114
  • H5F_LIBVER_200
  • H5F_LIBVER_LATEST

◆ getMetaBlockSize()

hsize_t getMetaBlockSize ( ) const

Returns the current metadata block size setting.

Returns
Metadata block size
Exceptions
H5::PropListIException

◆ getMultiType()

H5FD_mem_t getMultiType ( ) const

Returns the data type property for MULTI driver.

Returns
The data type property
Exceptions
H5::PropListIException
Description
For information, please refer to the H5Pget_multi_type API in the HDF5 C Reference Manual.

◆ getSieveBufSize()

size_t getSieveBufSize ( ) const

Returns the current settings for the data sieve buffer size property from this property list.

Returns
Data sieve buffer size, in bytes
Exceptions
H5::PropListIException

◆ setAlignment()

void setAlignment ( hsize_t threshold = 1,
hsize_t alignment = 1 ) const

Sets the alignment properties of this property list.

Parameters
threshold- IN: Threshold value for file object size
alignment- IN: Alignment value
Exceptions
H5::PropListIException
Description
The parameter threshold must have a non-negative value. Note that setting the threshold value to 0 (zero) has the effect of a special case, forcing everything to be aligned. The parameter alignment must have a positive value.

For more detail, please refer to the H5Pset_alignment API in the HDF5 C Reference Manual.

◆ setCache()

void setCache ( int mdc_nelmts,
size_t rdcc_nelmts,
size_t rdcc_nbytes,
double rdcc_w0 ) const

Sets the meta data cache and raw data chunk cache parameters.

Parameters
mdc_nelmts- IN: Number of elements in the meta data cache
rdcc_nelmts- IN: Number of elements in the raw data chunk cache
rdcc_nbytes- IN: Total size of the raw data chunk cache, in bytes
rdcc_w0- IN: Preemption policy
Exceptions
H5::PropListIException
Description
The argument rdcc_w0 should hold a value between 0 and 1 inclusive. This value indicates how much chunks that have been fully read are favored for preemption. A value of zero means fully read chunks are treated no differently than other chunks (the preemption is strictly LRU) while a value of one means fully read chunks are always preempted before other chunks.

◆ setCore()

void setCore ( size_t increment,
bool backing_store ) const

Modifies this file access property list to use the H5FD_CORE driver.

Parameters
increment- IN: Specifies how much memory to increase each time more memory is needed, in bytes
backing_store- IN: Indicating whether to write the file contents to disk when the file is closed
Exceptions
H5::PropListIException
Description
For more details on the use of H5FD_CORE driver, please refer to the H5Pset_fapl_core API in the HDF5 C Reference Manual.

◆ setDriver()

void setDriver ( hid_t new_driver_id,
const void * new_driver_info ) const

Set file driver for this property list.

Parameters
new_driver_id- IN: File driver
new_driver_info- IN: Struct containing the driver-specific properties
Exceptions
H5::PropListIException
Description
For information, please refer to the H5Pset_driver API in the HDF5 C Reference Manual.

◆ setFamily()

void setFamily ( hsize_t memb_size,
const FileAccPropList & memb_plist ) const

Sets this file access property list to use the family driver.

Parameters
memb_size- IN: Size in bytes of each file member
memb_plist- IN: File access property list to be used for each family member
Exceptions
H5::PropListIException
Description
Note that memb_size is used only when creating a new file.

◆ setFamilyOffset()

void setFamilyOffset ( hsize_t offset) const

Sets offset for family driver.

Parameters
offset- IN: offset value
Exceptions
H5::PropListIException

◆ setFcloseDegree()

void setFcloseDegree ( H5F_close_degree_t degree) const

Sets the degree for the file close behavior.

Parameters
degree- IN:
Exceptions
H5::PropListIException

◆ setFileAccDirect()

void setFileAccDirect ( size_t boundary,
size_t block_size,
size_t cbuf_size ) const

◆ setFileLocking()

void setFileLocking ( bool use_file_locking,
bool ignore_when_disabled ) const

Sets file locking flags.

Parameters
use_file_locking- IN: Flag that determines if file locks should
ignore_when_disabled- IN: Flag that determines if file locks
Exceptions
H5::PropListIException
Description
For information, please refer to the H5Pset_file_locking API in the HDF5 C Reference Manual.

◆ setGcReferences()

void setGcReferences ( unsigned gc_ref = 0) const

Sets garbage collecting references flag.

Parameters
gc_ref- IN: Flag setting reference garbage collection to on (1) or off (0).
Exceptions
H5::PropListIException
Description
For information, please refer to the H5Pset_gc_references API in the HDF5 C Reference Manual.

◆ setLibverBounds()

void setLibverBounds ( H5F_libver_t libver_low,
H5F_libver_t libver_high ) const

Sets bounds on versions of library format to be used when creating or writing objects.

Parameters
libver_low- IN: Earliest version of the library that will be used for creating or writing objects
libver_high- IN: Latest version of the library that will be
Exceptions
H5::PropListIException
Description
Valid values of libver_low are as follows:
  • H5F_LIBVER_EARLIEST (Default)
  • H5F_LIBVER_18
  • H5F_LIBVER_110
  • H5F_LIBVER_112
  • H5F_LIBVER_114
  • H5F_LIBVER_200
  • H5F_LIBVER_LATEST
Valid values of libver_high are as follows:
  • H5F_LIBVER_18
  • H5F_LIBVER_110
  • H5F_LIBVER_112
  • H5F_LIBVER_114
  • H5F_LIBVER_200
  • H5F_LIBVER_LATEST (Default)
For more detail, please refer to the H5Pset_libver_bounds API in the HDF5 C Reference Manual.

◆ setLog() [1/2]

void setLog ( const char * logfile,
unsigned flags,
size_t buf_size ) const

Modifies this file access property list to use the logging driver.

Parameters
logfile- IN: Name of the log file
flags- IN: Flags specifying the types of logging activity
buf_size- IN: Size of the logging buffer
Exceptions
H5::PropListIException
Description
For information, please refer to the H5Pset_fapl_log API in the HDF5 C Reference Manual.

◆ setLog() [2/2]

void setLog ( const std::string & logfile,
unsigned flags,
size_t buf_size ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.

Parameters
logfile- IN: Name of the log file - string
flags- IN: Flags specifying the types of logging activity
buf_size- IN: Size of the logging buffer

◆ setMetaBlockSize()

void setMetaBlockSize ( hsize_t & block_size) const

Sets the minimum size of metadata block allocations.

Parameters
block_size- IN: Minimum size, in bytes, of metadata block allocations
Exceptions
H5::PropListIException
Description
For information, please refer to the H5Pset_meta_block_size API in the HDF5 C Reference Manual.

◆ setMultiType()

void setMultiType ( H5FD_mem_t dtype) const

Sets data type for MULTI driver.

Parameters
dtype- IN: Type of data
Exceptions
H5::PropListIException
Description
For information, please refer to the H5Pset_multi_type API in the HDF5 C Reference Manual.

◆ setSec2()

void setSec2 ( ) const

Modifies this file access property list to use the sec2 driver.

Exceptions
H5::PropListIException

◆ setSieveBufSize()

void setSieveBufSize ( size_t bufsize) const

Sets the maximum size of the data sieve buffer.

Parameters
bufsize- IN: Maximum size, in bytes, of data sieve buffer
Exceptions
H5::PropListIException
Description
For more detail, please refer to the H5Pset_sieve_buf_size API in the HDF5 C Reference Manual.

◆ setSplit() [1/2]

void setSplit ( const FileAccPropList & meta_plist,
const FileAccPropList & raw_plist,
const char * meta_ext = ".meta",
const char * raw_ext = ".raw" ) const

Emulates the old split file driver, which stored meta data in one file and raw data in another file.

Parameters
meta_plist- IN: File access plist for the metadata file
raw_plist- IN: File access plist for the raw data file
meta_ext- IN: Metadata filename extension as char*
raw_ext- IN: Raw data filename extension as char*
Exceptions
H5::PropListIException
Description
For information, please refer to the H5Pset_fapl_split API in the HDF5 C Reference Manual.

◆ setSplit() [2/2]

void setSplit ( const FileAccPropList & meta_plist,
const FileAccPropList & raw_plist,
const std::string & meta_ext = ".meta",
const std::string & raw_ext = ".raw" ) const

This is an overloaded member function, provided for convenience. It takes character arguments as H5std_string.

Parameters
meta_plist- IN: File access plist for the metadata file
raw_plist- IN: File access plist for the raw data file
meta_ext- IN: Metadata filename extension as H5std_string
raw_ext- IN: Raw data filename extension as H5std_string
Exceptions
H5::PropListIException

◆ setStdio()

void setStdio ( ) const

Modifies this property list to use the H5FD_STDIO driver.

Exceptions
H5::PropListIException

Field Documentation

◆ DEFAULT

const FileAccPropList & DEFAULT = *getConstant()
static

Default file access property list.


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