diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2000-12-07 00:04:08 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2000-12-07 00:04:08 (GMT) |
commit | f148ff3caf533e9f6029798617f0a8087bcd6c05 (patch) | |
tree | 00bb6ca4d0e50aa0e591eed6a0d739c04c93c5e7 /c++/src/H5FcreatProp.cpp | |
parent | 7df8cd5cfe22372f603ea058334647fe4017008e (diff) | |
download | hdf5-f148ff3caf533e9f6029798617f0a8087bcd6c05.zip hdf5-f148ff3caf533e9f6029798617f0a8087bcd6c05.tar.gz hdf5-f148ff3caf533e9f6029798617f0a8087bcd6c05.tar.bz2 |
[svn-r3080]
Purpose:
Support portability
Description:
I forgot that source file extension .C will not work on Windows.
Solution:
Changed all source file from *.C to *.cpp for portability.
Platforms tested:
arabica (sparc-sun-solaris 2.7)
Diffstat (limited to 'c++/src/H5FcreatProp.cpp')
-rw-r--r-- | c++/src/H5FcreatProp.cpp | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp new file mode 100644 index 0000000..41ec360 --- /dev/null +++ b/c++/src/H5FcreatProp.cpp @@ -0,0 +1,120 @@ +#include <string> + +#include "H5Include.h" +#include "H5RefCounter.h" +#include "H5Exception.h" +#include "H5IdComponent.h" +#include "H5PropList.h" +#include "H5FcreatProp.h" + +#ifndef H5_NO_NAMESPACE +namespace H5 { +#endif + +const FileCreatPropList FileCreatPropList::DEFAULT( H5P_DEFAULT ); + +// Creates a file create property list +FileCreatPropList::FileCreatPropList() : PropList( H5P_FILE_CREATE ) {} + +// Copy constructor: makes a copy of the original FileCreatPropList object; +FileCreatPropList::FileCreatPropList( const FileCreatPropList& orig ) : PropList( orig ) {} + +// Copies a file create property list using assignment statement +// Notes: can this be inherited from PropList??? and copy or operator=??? +FileCreatPropList& FileCreatPropList::operator=( const FileCreatPropList& rhs ) +{ + copy (rhs); + return( *this ); +} + +void FileCreatPropList::getVersion( + int& boot, int& freelist, int& stab, int& shhdr ) const +{ + herr_t ret_value = H5Pget_version( id, &boot, &freelist, &stab, &shhdr ); + if( ret_value < 0 ) + { + throw PropListIException(); + } +} + +void FileCreatPropList::setUserblock( hsize_t size ) const +{ + herr_t ret_value = H5Pset_userblock( id, size); + if( ret_value < 0 ) + { + throw PropListIException(); + } +} + +hsize_t FileCreatPropList::getUserblock() const +{ + hsize_t userblock_size; + herr_t ret_value = H5Pget_userblock( id, &userblock_size ); + if( ret_value < 0 ) + { + throw PropListIException(); + } + return( userblock_size ); +} + +void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const +{ + herr_t ret_value = H5Pset_sizes( id, sizeof_addr, sizeof_size ); + if( ret_value < 0 ) + { + throw PropListIException(); + } +} + +void FileCreatPropList::getSizes( size_t& sizeof_addr, size_t& sizeof_size ) const +{ + herr_t ret_value = H5Pget_sizes( id, &sizeof_addr, &sizeof_size ); + if( ret_value < 0 ) + { + throw PropListIException(); + } +} + +void FileCreatPropList::setSymk( int ik, int lk ) const +{ + herr_t ret_value = H5Pset_sym_k( id, ik, lk ); + if( ret_value < 0 ) + { + throw PropListIException(); + } +} + +void FileCreatPropList::getSymk( int& ik, int& lk ) const +{ + herr_t ret_value = H5Pget_sym_k( id, &ik, &lk ); + if( ret_value < 0 ) + { + throw PropListIException(); + } +} + +void FileCreatPropList::setIstorek( int ik ) const +{ + herr_t ret_value = H5Pset_istore_k( id, ik ); + if( ret_value < 0 ) + { + throw PropListIException(); + } +} +int FileCreatPropList::getIstorek() const +{ + int ik; + herr_t ret_value = H5Pget_istore_k( id, &ik ); + if( ret_value < 0 ) + { + throw PropListIException(); + } + return( ik ); +} + +// Default destructor +FileCreatPropList::~FileCreatPropList() {} + +#ifndef H5_NO_NAMESPACE +} // end namespace +#endif |