summaryrefslogtreecommitdiffstats
path: root/c++/src/H5FaccProp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5FaccProp.cpp')
-rw-r--r--c++/src/H5FaccProp.cpp114
1 files changed, 68 insertions, 46 deletions
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index fc1e0c7..3e8446a 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -30,21 +30,31 @@ namespace H5 {
const FileAccPropList FileAccPropList::DEFAULT( H5P_DEFAULT );
//--------------------------------------------------------------------------
-// Function: Default Constructor
-///\brief Default constructor: Creates a file access property list
+// Function: Default Constructor
+///\brief Default constructor: creates a file access property list
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList() : PropList( H5P_FILE_ACCESS ) {}
//--------------------------------------------------------------------------
-// Function: Copy Constructor
-///\brief Copy Constructor: Makes a copy of the original
-/// FileAccPropList object
+// Function: FileAccPropList copy constructor
+///\brief Copy Constructor: makes a copy of the original
+/// FileAccPropList object.
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList(const FileAccPropList& orig) : PropList(orig) {}
//--------------------------------------------------------------------------
+// Function: FileAccPropList overloaded constructor
+///\brief Creates a file access property list using the id of an
+/// existing one.
+// Programmer: Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+FileAccPropList::FileAccPropList(const hid_t plist_id) : PropList(plist_id) {}
+
+//--------------------------------------------------------------------------
// Function: FileAccPropList::setStdio
-///\brief Modifies this property list to use the \c H5FD_STDIO driver
+///\brief Modifies this property list to use the \c H5FD_STDIO driver.
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
@@ -58,14 +68,14 @@ void FileAccPropList::setStdio() const
}
//--------------------------------------------------------------------------
-// Function: FileAccPropList::getDriver
-///\brief Return the ID of the low-level file driver.
+// Function: FileAccPropList::getDriver
+///\brief Return the ID of the low-level file driver.
///\return 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.
/// Valid driver identifiers can be found at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hid_t FileAccPropList::getDriver() const
@@ -79,13 +89,14 @@ hid_t FileAccPropList::getDriver() const
}
//--------------------------------------------------------------------------
-// Function: FileAccPropList::setDriver
-///\brief Set file driver for this property list
-///\param new_driver_id - IN: File driver
-///\param new_driver_info - IN: Struct containing the driver-specific properites
-///\exception H5::PropListIException
+// Function: FileAccPropList::setDriver
+///\brief Set file driver for this property list.
+///\param new_driver_id - IN: File driver
+///\param new_driver_info - IN: Struct containing the driver-specific properites
+///\exception H5::PropListIException
///\par Description
-/// For a list of valid driver identifiers, please refer to
+/// For a list of valid driver identifiers, please see the C
+/// layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetDriver
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
@@ -115,10 +126,10 @@ void FileAccPropList::setFamilyOffset(hsize_t offset) const
}
//--------------------------------------------------------------------------
-// Function: FileAccPropList::getFamilyOffset
+// Function: FileAccPropList::getFamilyOffset
///\brief Get offset for family driver.
-///\return Offset for family driver
-///\exception H5::PropListIException
+///\return Offset for family driver
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hsize_t FileAccPropList::getFamilyOffset() const
@@ -140,7 +151,7 @@ hsize_t FileAccPropList::getFamilyOffset() const
/// time more memory is needed, in bytes
///\param backing_store - IN: Indicating whether to write the file
/// contents to disk when the file is closed
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For more details on the use of \c H5FD_CORE driver, please
/// refer to
@@ -162,7 +173,7 @@ void FileAccPropList::setCore (size_t increment, hbool_t backing_store) const
///\param increment - OUT: Size of memory increment, in bytes
///\param backing_store - OUT: Indicating whether to write the file
/// contents to disk when the file is closed
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const
@@ -180,7 +191,7 @@ void FileAccPropList::getCore (size_t& increment, hbool_t& backing_store) const
///\param memb_size - IN: Size in bytes of each file member
///\param memb_plist - IN: File access property list to be used for
/// each family member
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// Note that \a memb_size is used only when creating a new file.
// Programmer: Binh-Minh Ribler - April, 2004
@@ -201,7 +212,7 @@ void FileAccPropList::setFamily( hsize_t memb_size, const FileAccPropList& memb_
///\param memb_size - OUT: Size in bytes of each file member
///\param memb_plist - OUT: Retrieved file access property list for each
/// file member
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::getFamily(hsize_t& memb_size, FileAccPropList& memb_plist) const
@@ -217,12 +228,12 @@ void FileAccPropList::getFamily(hsize_t& memb_size, FileAccPropList& memb_plist)
//--------------------------------------------------------------------------
// Function: FileAccPropList::getFamily
-///\brief This is an overloaded member function, provided for convenience.
+///\brief 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.
///\param memb_size - OUT: Size in bytes of each file member
///\return The file access property list for each file member
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
@@ -245,7 +256,7 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
///\param raw_plist - IN: File access plist for the raw data file
///\param meta_ext - IN: Metadata filename extension as \c char*
///\param raw_ext - IN: Raw data filename extension as \c char*
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// Temporary - For information, please refer to:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplSplit
@@ -264,14 +275,14 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
-///\brief This is an overloaded member function, provided for convenience.
+///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in what arguments it
/// accepts.
///\param meta_plist - IN: File access plist for the metadata file
///\param raw_plist - IN: File access plist for the raw data file
///\param meta_ext - IN: Metadata filename extension as \c string
///\param raw_ext - IN: Raw data filename extension as \c string
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const string& meta_ext, const string& raw_ext ) const
@@ -286,7 +297,7 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
///\return The streaming I/O file access property list structure
/// For detail on this structure, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5FD_stream_fapl_t FileAccPropList::getStream() const
@@ -305,7 +316,7 @@ H5FD_stream_fapl_t FileAccPropList::getStream() const
///\brief Modifies this file access property list to use the Stream
/// driver.
///\param fapl - IN: The streaming I/O file access property list
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For detail on \a fapl, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
@@ -326,7 +337,7 @@ void FileAccPropList::setStream(H5FD_stream_fapl_t &fapl) const
///\brief Returns the current settings for the data sieve buffer size
/// property from this property list.
///\return Data sieve buffer size, in bytes
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t FileAccPropList::getSieveBufSize() const
@@ -344,7 +355,7 @@ size_t FileAccPropList::getSieveBufSize() const
// Function: FileAccPropList::setSieveBufSize
///\brief Sets the maximum size of the data sieve buffer.
///\param bufsize - IN: Maximum size, in bytes, of data sieve buffer
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For detail on data sieving, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSieveBufSize
@@ -364,9 +375,9 @@ void FileAccPropList::setSieveBufSize(size_t bufsize) const
///\brief Sets the minimum size of metadata block allocations.
///\param block_size - IN: Minimum size, in bytes, of metadata
/// block allocations
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
-/// For more detail, please refer to
+/// For more detail, please see the C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMetaBlockSize
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
@@ -383,7 +394,7 @@ void FileAccPropList::setMetaBlockSize(hsize_t &block_size) const
// Function: FileAccPropList::getMetaBlockSize
///\brief Returns the current metadata block size setting.
///\return Metadata block size
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hsize_t FileAccPropList::getMetaBlockSize() const
@@ -404,7 +415,7 @@ hsize_t FileAccPropList::getMetaBlockSize() const
///\param logfile - IN: Name of the log file
///\param flags - IN: Flags specifying the types of logging activity
///\param buf_size - IN: Size of the logging buffer
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For detail on \a flags, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
@@ -438,7 +449,7 @@ void FileAccPropList::setLog(const string& logfile, unsigned flags, size_t buf_s
// Function: FileAccPropList::setSec2
///\brief Modifies this file access property list to use the sec2
/// driver.
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setSec2() const
@@ -455,7 +466,7 @@ void FileAccPropList::setSec2() const
///\brief Sets the alignment properties of this property list.
///\param threshold - IN: Threshold value for file object size
///\param alignment - IN: Alignment value
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// The parameter \a threshold must have a non-negative value.
/// Note that setting the threshold value to 0 (zero) has the
@@ -464,6 +475,7 @@ void FileAccPropList::setSec2() const
///
/// For detail on \a setting alignment, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetAlignment
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const
{
@@ -480,7 +492,8 @@ void FileAccPropList::setAlignment( hsize_t threshold, hsize_t alignment ) const
/// this property list.
///\param threshold - OUT: Retrieved threshold value for file object size
///\param alignment - OUT: Retrieved alignment value
-///\exception H5::PropListIException
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileAccPropList::getAlignment( hsize_t &threshold, hsize_t &alignment ) const
{
@@ -495,7 +508,7 @@ void FileAccPropList::getAlignment( hsize_t &threshold, hsize_t &alignment ) con
// Function: FileAccPropList::setMultiType
///\brief Sets data type for \c MULTI driver.
///\param dtype - IN: Type of data
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// More details and valid values for \a dtype can be found at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMultiType
@@ -514,7 +527,7 @@ void FileAccPropList::setMultiType(H5FD_mem_t dtype) const
// Function: FileAccPropList::getMultiType
///\brief Returns the data type property for \c MULTI driver.
///\return The data type property
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// More details and possible returned values can be found at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-GetMultiType
@@ -538,7 +551,7 @@ H5FD_mem_t FileAccPropList::getMultiType() const
///\param rdcc_nelmts - IN: Number of elements in the raw data chunk cache
///\param rdcc_nbytes - IN: Total size of the raw data chunk cache, in bytes
///\param rdcc_w0 - IN: Preemption policy
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// The argument \a rdcc_w0 should hold a value between 0 and 1
/// inclusive. This value indicates how much chunks that have
@@ -546,6 +559,7 @@ H5FD_mem_t FileAccPropList::getMultiType() const
/// 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.
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileAccPropList::setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0 ) const
{
@@ -563,7 +577,8 @@ void FileAccPropList::setCache( int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_
///\param rdcc_nelmts - OUT: Number of elements in the raw data chunk cache
///\param rdcc_nbytes - OUT: Total size of the raw data chunk cache, in bytes
///\param rdcc_w0 - OUT: Preemption policy
-///\exception H5::PropListIException
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileAccPropList::getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rdcc_nbytes, double& rdcc_w0 ) const
{
@@ -578,7 +593,7 @@ void FileAccPropList::getCache( int& mdc_nelmts, size_t& rdcc_nelmts, size_t& rd
// Function: FileAccPropList::setFcloseDegree
///\brief Sets the degree for the file close behavior.
///\param degree - IN:
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree)
@@ -594,7 +609,7 @@ void FileAccPropList::setFcloseDegree(H5F_close_degree_t degree)
// Function: FileAccPropList::getFcloseDegree
///\brief Returns the degree for the file close behavior.
///\return The degree for the file close behavior
-///\exception H5::PropListIException
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5F_close_degree_t FileAccPropList::getFcloseDegree()
@@ -613,10 +628,11 @@ H5F_close_degree_t FileAccPropList::getFcloseDegree()
///\brief Sets garbage collecting references flag.
///\param gc_ref - IN: Flag setting reference garbage collection to
/// on (1) or off (0).
-///\exception H5::PropListIException
+///\exception H5::PropListIException
///\par Description
/// For detail on \a fapl, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFaplStream
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileAccPropList::setGcReferences( unsigned gc_ref ) const
{
@@ -631,7 +647,8 @@ void FileAccPropList::setGcReferences( unsigned gc_ref ) const
// Function: FileAccPropList::getGcReferences
///\brief Returns the garbage collecting references setting.
///\return Garbage collecting references setting, 0 (off) or 1 (on)
-///\exception H5::PropListIException
+///\exception H5::PropListIException
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
unsigned FileAccPropList::getGcReferences() const
{
@@ -646,6 +663,11 @@ unsigned FileAccPropList::getGcReferences() const
return( gc_ref );
}
+//--------------------------------------------------------------------------
+// Function: FileAccPropList destructor
+///\brief Noop destructor
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
FileAccPropList::~FileAccPropList() {}
#ifndef H5_NO_NAMESPACE