summaryrefslogtreecommitdiffstats
path: root/c++/src/H5FcreatProp.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2004-07-11 05:27:00 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2004-07-11 05:27:00 (GMT)
commit10bae2c87537acf666400278849763bd07e239a9 (patch)
tree63845948e9a83f793a65cbe748533824558060b0 /c++/src/H5FcreatProp.cpp
parent83ff4069fde3d5ab11fbae80eb260278fcf721a5 (diff)
downloadhdf5-10bae2c87537acf666400278849763bd07e239a9.zip
hdf5-10bae2c87537acf666400278849763bd07e239a9.tar.gz
hdf5-10bae2c87537acf666400278849763bd07e239a9.tar.bz2
[svn-r8857] Purpose: Adding more C++ wrappers and documentation
Description: Added documentation and C++ wrappers for many C APIs to: H5PropList.* H5FaccProp.* H5DcreatProp.* H5DxferProp.* H5DataType.* H5Group.* Tests will follow soon. Platforms tested: SunOS 5.7 (arabica) Linux 2.4 (eirene)
Diffstat (limited to 'c++/src/H5FcreatProp.cpp')
-rw-r--r--c++/src/H5FcreatProp.cpp142
1 files changed, 136 insertions, 6 deletions
diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp
index 404aca2..f2a683a 100644
--- a/c++/src/H5FcreatProp.cpp
+++ b/c++/src/H5FcreatProp.cpp
@@ -25,18 +25,42 @@
namespace H5 {
#endif
+//--------------------------------------------------------------------------
+///\brief Constant for default property
+//--------------------------------------------------------------------------
const FileCreatPropList FileCreatPropList::DEFAULT( H5P_DEFAULT );
-// Creates a file create property list
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList default constructor
+///\brief Default constructor: Creates a file create property list
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
FileCreatPropList::FileCreatPropList() : PropList( H5P_FILE_CREATE ) {}
-// Copy constructor: makes a copy of the original FileCreatPropList object;
-FileCreatPropList::FileCreatPropList( const FileCreatPropList& orig ) : PropList( orig ) {}
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList copy constructor
+///\brief Copy constructor: makes a copy of the original FileCreatPropList object.
+///\param original - IN: FileCreatPropList instance to copy
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+FileCreatPropList::FileCreatPropList(const FileCreatPropList& original) : PropList(original) {}
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::getVersion
+///\brief Retrieves version information for various parts of a file.
+///\param super - OUT: The file super block.
+///\param freelist - OUT: The global free list.
+///\param stab - OUT: The root symbol table entry.
+///\param shhdr - OUT: Shared object headers.
+///\exception H5::PropListIException
+///\par Description
+/// Any (or even all) of the output arguments can be null pointers.
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
void FileCreatPropList::getVersion(
- int& boot, int& freelist, int& stab, int& shhdr ) const
+ int& super, int& freelist, int& stab, int& shhdr ) const
{
- herr_t ret_value = H5Pget_version( id, &boot, &freelist, &stab, &shhdr );
+ herr_t ret_value = H5Pget_version( id, &super, &freelist, &stab, &shhdr );
if( ret_value < 0 )
{
throw PropListIException("FileCreatPropList::getVersion",
@@ -44,6 +68,16 @@ void FileCreatPropList::getVersion(
}
}
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::setUserblock
+///\brief Sets the user block size field of this file creation property list.
+///\param size - IN: User block size to be set, in bytes
+///\exception H5::PropListIException
+///\par Description
+/// The default user block size is 0; it may be set to any power
+/// of 2 equal to 512 or greater (512, 1024, 2048, etc.)
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
void FileCreatPropList::setUserblock( hsize_t size ) const
{
herr_t ret_value = H5Pset_userblock( id, size);
@@ -54,6 +88,13 @@ void FileCreatPropList::setUserblock( hsize_t size ) const
}
}
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::getUserblock
+///\brief Returns the user block size of this file creation property list.
+///\return User block size
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
hsize_t FileCreatPropList::getUserblock() const
{
hsize_t userblock_size;
@@ -66,6 +107,19 @@ hsize_t FileCreatPropList::getUserblock() const
return( userblock_size );
}
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::setSizes
+///\brief Sets the byte size of the offsets and lengths used to
+/// address objects in an HDF5 file.
+///\param sizeof_addr - IN: Size of an object offset in bytes
+///\param sizeof_size - IN: Size of an object length in bytes.
+///\exception H5::PropListIException
+///\par Description
+/// For information on setting sizes, please refer to the
+/// C layer Reference Manual at:
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSizes
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const
{
herr_t ret_value = H5Pset_sizes( id, sizeof_addr, sizeof_size );
@@ -76,6 +130,13 @@ void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const
}
}
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::getSizes
+///\brief Retrieves the size of the offsets and lengths used in an
+/// HDF5 file.
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
void FileCreatPropList::getSizes( size_t& sizeof_addr, size_t& sizeof_size ) const
{
herr_t ret_value = H5Pget_sizes( id, &sizeof_addr, &sizeof_size );
@@ -87,6 +148,18 @@ void FileCreatPropList::getSizes( size_t& sizeof_addr, size_t& sizeof_size ) con
}
#ifdef H5_WANT_H5_V1_4_COMPAT
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::setSymk
+///\brief Sets the size of parameters used to control the symbol table
+/// nodes.
+///\param ik - IN: Symbol table tree rank
+///\param lk - IN: Symbol table node size
+///\exception H5::PropListIException
+///\par Description
+/// For information, please see the C layer Reference Manual at:
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
void FileCreatPropList::setSymk( int ik, int lk ) const
{
herr_t ret_value = H5Pset_sym_k( id, ik, lk );
@@ -97,6 +170,16 @@ void FileCreatPropList::setSymk( int ik, int lk ) const
}
}
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::getSymk
+///\brief Retrieves the size of the symbol table B-tree 1/2 rank and
+/// the symbol table leaf node 1/2 size.
+///\exception H5::PropListIException
+///\par Description
+/// For information, please see
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
void FileCreatPropList::getSymk( int& ik, int& lk ) const
{
herr_t ret_value = H5Pget_sym_k( id, &ik, &lk );
@@ -107,6 +190,18 @@ void FileCreatPropList::getSymk( int& ik, int& lk ) const
}
}
#else /* H5_WANT_H5_V1_4_COMPAT */
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::setSymk
+///\brief Sets the size of parameters used to control the symbol table
+/// nodes.
+///\param ik - IN: Symbol table tree rank
+///\param lk - IN: Symbol table node size
+///\exception H5::PropListIException
+///\par Description
+/// For information, please see the C layer Reference Manual at:
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
void FileCreatPropList::setSymk( int ik, unsigned lk ) const
{
herr_t ret_value = H5Pset_sym_k( id, ik, lk );
@@ -117,6 +212,16 @@ void FileCreatPropList::setSymk( int ik, unsigned lk ) const
}
}
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::getSymk
+///\brief Retrieves the size of the symbol table B-tree 1/2 rank and
+/// the symbol table leaf node 1/2 size.
+///\exception H5::PropListIException
+///\par Description
+/// For information, please see
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
void FileCreatPropList::getSymk( int& ik, unsigned& lk ) const
{
herr_t ret_value = H5Pget_sym_k( id, &ik, &lk );
@@ -128,6 +233,17 @@ void FileCreatPropList::getSymk( int& ik, unsigned& lk ) const
}
#endif /* H5_WANT_H5_V1_4_COMPAT */
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::setIstorek
+///\brief Sets the size of the parameter used to control the B-trees
+/// for indexing chunked datasets.
+///\param ik - IN: 1/2 rank of chunked storage B-tree
+///\exception H5::PropListIException
+///\par Description
+/// For information, please see the C layer Reference Manual at:
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
void FileCreatPropList::setIstorek( int ik ) const
{
herr_t ret_value = H5Pset_istore_k( id, ik );
@@ -137,6 +253,16 @@ void FileCreatPropList::setIstorek( int ik ) const
"H5Pset_istore_k failed");
}
}
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::getIstorek
+///\brief Returns the 1/2 rank of an indexed storage B-tree.
+///\return 1/2 rank of chunked storage B-tree
+///\exception H5::PropListIException
+///\par Description
+/// For information, please see
+/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
int FileCreatPropList::getIstorek() const
{
int ik;
@@ -149,7 +275,11 @@ int FileCreatPropList::getIstorek() const
return( ik );
}
-// Default destructor
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList destructor
+///\brief Noop destructor.
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
FileCreatPropList::~FileCreatPropList() {}
#ifndef H5_NO_NAMESPACE