summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:32:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:32:06 (GMT)
commit37232bd4f0f8199f956c823cdff72ece2ca9aa16 (patch)
tree38e37f7208355500b7f223e90bf014424c63300b /c++
parent20146575aaeead9e05af73977dee863de63bf50f (diff)
downloadhdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.zip
hdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.tar.gz
hdf5-37232bd4f0f8199f956c823cdff72ece2ca9aa16.tar.bz2
[svn-r9729] Purpose:
Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update:
Diffstat (limited to 'c++')
-rw-r--r--c++/examples/chunks.cpp2
-rw-r--r--c++/examples/extend_ds.cpp3
-rw-r--r--c++/examples/readdata.cpp4
-rw-r--r--c++/examples/writedata.cpp6
-rw-r--r--c++/src/H5AbstractDs.cpp14
-rw-r--r--c++/src/H5ArrayType.cpp32
-rw-r--r--c++/src/H5ArrayType.h4
-rw-r--r--c++/src/H5AtomType.cpp18
-rw-r--r--c++/src/H5AtomType.h2
-rw-r--r--c++/src/H5CompType.cpp18
-rw-r--r--c++/src/H5CompType.h8
-rw-r--r--c++/src/H5DataSpace.cpp6
-rw-r--r--c++/src/H5DataSpace.h6
-rw-r--r--c++/src/H5DataType.cpp327
-rw-r--r--c++/src/H5DataType.h70
-rw-r--r--c++/src/H5DcreatProp.cpp459
-rw-r--r--c++/src/H5DcreatProp.h2
-rw-r--r--c++/src/H5DxferProp.h13
-rw-r--r--c++/src/H5EnumType.cpp2
-rw-r--r--c++/src/H5EnumType.h2
-rw-r--r--c++/src/H5FaccProp.cpp127
-rw-r--r--c++/src/H5FaccProp.h2
-rw-r--r--c++/src/H5FcreatProp.cpp169
-rw-r--r--c++/src/H5FcreatProp.h36
-rw-r--r--c++/src/H5Group.cpp4
-rw-r--r--c++/src/H5IdComponent.cpp25
-rw-r--r--c++/src/H5IdComponent.h10
-rw-r--r--c++/src/H5Library.h2
-rw-r--r--c++/src/H5PredType.h2
-rw-r--r--c++/src/H5PropList.cpp79
-rw-r--r--c++/src/H5PropList.h8
-rw-r--r--c++/src/H5StrType.cpp10
-rw-r--r--c++/src/H5VarLenType.cpp10
-rw-r--r--c++/src/H5VarLenType.h4
-rwxr-xr-xc++/src/h5c++.in13
-rw-r--r--c++/test/dsets.cpp19
-rw-r--r--c++/test/h5cpputil.cpp1
-rw-r--r--c++/test/h5cpputil.h2
-rw-r--r--c++/test/tfile.cpp12
-rw-r--r--c++/test/th5s.cpp75
40 files changed, 811 insertions, 797 deletions
diff --git a/c++/examples/chunks.cpp b/c++/examples/chunks.cpp
index 3cc4e20..0efd95d 100644
--- a/c++/examples/chunks.cpp
+++ b/c++/examples/chunks.cpp
@@ -144,7 +144,7 @@ int main (void)
/*
* Define the column (hyperslab) to read.
*/
- hssize_t offset[2] = { 0, 2 };
+ hsize_t offset[2] = { 0, 2 };
hsize_t count[2] = { 10, 1 };
int column[10]; // buffer for column to be read
diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp
index 4c4476a..9c12304 100644
--- a/c++/examples/extend_ds.cpp
+++ b/c++/examples/extend_ds.cpp
@@ -81,7 +81,6 @@ int main (void)
* Create a new dataset within the file using cparms
* creation properties.
*/
-
DataSet dataset = file.createDataSet( DATASET_NAME, PredType::NATIVE_INT, mspace1, cparms);
/*
@@ -96,7 +95,7 @@ int main (void)
* Select a hyperslab.
*/
DataSpace fspace1 = dataset.getSpace ();
- hssize_t offset[2];
+ hsize_t offset[2];
offset[0] = 0;
offset[1] = 0;
hsize_t dims1[2] = { 3, 3}; /* data1 dimensions */
diff --git a/c++/examples/readdata.cpp b/c++/examples/readdata.cpp
index 1797d27..7e5b195 100644
--- a/c++/examples/readdata.cpp
+++ b/c++/examples/readdata.cpp
@@ -128,7 +128,7 @@ int main (void)
* Define hyperslab in the dataset; implicitly giving strike and
* block NULL.
*/
- hssize_t offset[2]; // hyperslab offset in the file
+ hsize_t offset[2]; // hyperslab offset in the file
hsize_t count[2]; // size of the hyperslab in the file
offset[0] = 1;
offset[1] = 2;
@@ -148,7 +148,7 @@ int main (void)
/*
* Define memory hyperslab.
*/
- hssize_t offset_out[3]; // hyperslab offset in memory
+ hsize_t offset_out[3]; // hyperslab offset in memory
hsize_t count_out[3]; // size of the hyperslab in memory
offset_out[0] = 3;
offset_out[1] = 0;
diff --git a/c++/examples/writedata.cpp b/c++/examples/writedata.cpp
index 8e0404c..0bed680 100644
--- a/c++/examples/writedata.cpp
+++ b/c++/examples/writedata.cpp
@@ -98,7 +98,7 @@ int main (void)
* Select hyperslab for the dataset in the file, using 3x2 blocks,
* (4,3) stride and (2,4) count starting at the position (0,1).
*/
- hssize_t start[2]; // Start of hyperslab
+ hsize_t start[2]; // Start of hyperslab
hsize_t stride[2]; // Stride of hyperslab
hsize_t count[2]; // Block count
hsize_t block[2]; // Block sizes
@@ -156,14 +156,14 @@ int main (void)
/*
* Select sequence of NPOINTS points in the file dataspace.
*/
- hssize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points
+ hsize_t coord[NPOINTS][FSPACE_RANK]; /* Array to store selected points
from the file dataspace */
coord[0][0] = 0; coord[0][1] = 0;
coord[1][0] = 3; coord[1][1] = 3;
coord[2][0] = 3; coord[2][1] = 5;
coord[3][0] = 5; coord[3][1] = 6;
- fspace.selectElements( H5S_SELECT_SET, NPOINTS, (const hssize_t **)coord);
+ fspace.selectElements( H5S_SELECT_SET, NPOINTS, (const hsize_t **)coord);
/*
* Write new selection of points to the dataset.
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp
index 0968344..7771c6a 100644
--- a/c++/src/H5AbstractDs.cpp
+++ b/c++/src/H5AbstractDs.cpp
@@ -54,7 +54,7 @@ AbstractDs::AbstractDs( const AbstractDs& original ) : H5Object( original ) {}
// Function: AbstractDs::getTypeClass
///\brief Returns the class of the datatype that is used by this
/// object, which can be a dataset or an attribute.
-///\return Datatype class identifier
+///\return Datatype class identifier
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -80,7 +80,7 @@ H5T_class_t AbstractDs::getTypeClass() const
// Function: AbstractDs::getDataType
///\brief Returns the generic datatype of this abstract dataset, which
/// can be a dataset or an attribute.
-///\return DataType instance
+///\return DataType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -100,7 +100,7 @@ DataType AbstractDs::getDataType() const
// Function: AbstractDs::getEnumType
///\brief Returns the enumeration datatype of this abstract dataset which
/// can be a dataset or an attribute.
-///\return EnumType instance
+///\return EnumType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -114,7 +114,7 @@ EnumType AbstractDs::getEnumType() const
// Function: AbstractDs::getCompType
///\brief Returns the compound datatype of this abstract dataset which
/// can be a dataset or an attribute.
-///\return CompType instance
+///\return CompType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -128,7 +128,7 @@ CompType AbstractDs::getCompType() const
// Function: AbstractDs::getIntType
///\brief Returns the integer datatype of this abstract dataset which
/// can be a dataset or an attribute.
-///\return IntType instance
+///\return IntType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -142,7 +142,7 @@ IntType AbstractDs::getIntType() const
// Function: AbstractDs::getFloatType
///\brief Returns the floating-point datatype of this abstract dataset,
/// which can be a dataset or an attribute.
-///\return FloatType instance
+///\return FloatType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -156,7 +156,7 @@ FloatType AbstractDs::getFloatType() const
// Function: AbstractDs::getStrType
///\brief Returns the string datatype of this abstract dataset which
/// can be a dataset or an attribute.
-///\return StrType instance
+///\return StrType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index 8859123..681b9c4 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -42,10 +42,10 @@ ArrayType::ArrayType() : DataType()
}
//--------------------------------------------------------------------------
-// Function: ArrayType overloaded constructor
-///\brief Creates an ArrayType object using an existing id.
-///\param existing_id - IN: Id of an existing datatype
-///\exception H5::DataTypeIException
+// Function: ArrayType overloaded constructor
+///\brief Creates an ArrayType object using an existing id.
+///\param existing_id - IN: Id of an existing datatype
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
@@ -81,13 +81,13 @@ ArrayType::ArrayType( const ArrayType& original ) : DataType( original )
}
//--------------------------------------------------------------------------
-// Function: ArrayType overloaded constructor
-///\brief Creates a new array data type based on the specified
+// Function: ArrayType overloaded constructor
+///\brief Creates a new array data type based on the specified
/// \a base_type.
-///\param base_type - IN: Existing datatype
-///\param ndims - IN: Rank of the array, [0..H5S_MAX_RANK]
-///\param dims - IN: Size of each array dimension
-///\exception H5::DataTypeIException
+///\param base_type - IN: Existing datatype
+///\param ndims - IN: Rank of the array, [0..H5S_MAX_RANK]
+///\param dims - IN: Size of each array dimension
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims) : DataType()
@@ -105,10 +105,10 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
}
//--------------------------------------------------------------------------
-// Function: ArrayType::getArrayNDims
-///\brief Returns the number of dimensions for an array datatype.
+// Function: ArrayType::getArrayNDims
+///\brief Returns the number of dimensions for an array datatype.
///\return Number of dimensions
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int ArrayType::getArrayNDims()
@@ -127,11 +127,11 @@ int ArrayType::getArrayNDims()
}
//--------------------------------------------------------------------------
-// Function: ArrayType::getArrayDims
-///\brief Retrieves the size of all dimensions of an array datatype.
+// Function: ArrayType::getArrayDims
+///\brief Retrieves the size of all dimensions of an array datatype.
///\param dims - OUT: Sizes of dimensions
///\return Number of dimensions
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int ArrayType::getArrayDims(hsize_t* dims)
diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h
index d98488e..fb5eb2e 100644
--- a/c++/src/H5ArrayType.h
+++ b/c++/src/H5ArrayType.h
@@ -34,10 +34,10 @@ class H5_DLLCPP ArrayType : public DataType {
// Returns the sizes of dimensions of this array datatype.
int getArrayDims(hsize_t* dims);
- // Copy constructor - makes copy of the original object
+ // Copy constructor: makes copy of the original object.
ArrayType( const ArrayType& original );
- // Default destructor
+ // Noop destructor
virtual ~ArrayType();
protected:
diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp
index 0d84bd4..fb4c81a 100644
--- a/c++/src/H5AtomType.cpp
+++ b/c++/src/H5AtomType.cpp
@@ -58,7 +58,7 @@ AtomType::AtomType( const AtomType& original ) : DataType( original ) {}
// Function: AtomType::setSize
///\brief Sets the total size for an atomic datatype.
///\param size - IN: Size to set
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setSize( size_t size ) const
@@ -79,7 +79,7 @@ void AtomType::setSize( size_t size ) const
/// \li \c H5T_ORDER_LE
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_order_t AtomType::getOrder( string& order_string ) const
@@ -109,7 +109,7 @@ H5T_order_t AtomType::getOrder( string& order_string ) const
/// \li \c H5T_ORDER_LE
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setOrder( H5T_order_t order ) const
@@ -126,7 +126,7 @@ void AtomType::setOrder( H5T_order_t order ) const
// Function: AtomType::getPrecision
///\brief Returns the precision of an atomic datatype.
///\return Number of significant bits
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// The precision is the number of significant bits which,
/// unless padding is present, is 8 times larger than the
@@ -150,7 +150,7 @@ size_t AtomType::getPrecision() const
// Function: AtomType::setPrecision
///\brief Sets the precision of an atomic datatype.
///\param precision - IN: Number of bits of precision
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// For information, please see C layer Reference Manuat at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetPrecision
@@ -170,7 +170,7 @@ void AtomType::setPrecision( size_t precision ) const
// Function: AtomType::getOffset
///\brief Retrieves the bit offset of the first significant bit.
///\return Offset value
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// For information, please see C layer Reference Manuat at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-GetOffset
@@ -197,7 +197,7 @@ int AtomType::getOffset() const
// Function: AtomType::setOffset
///\brief Sets the bit offset of the first significant bit.
///\param offset - IN: Offset of first significant bit
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// For information, please see C layer Reference Manuat at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-SetOffset
@@ -219,7 +219,7 @@ void AtomType::setOffset( size_t offset ) const
/// bit padding.
///\param lsb - OUT: Least-significant bit padding type
///\param msb - OUT: Most-significant bit padding type
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// Possible values for \a lsb and \a msb include:
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros.
@@ -242,7 +242,7 @@ void AtomType::getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const
///\brief Sets the least and most-significant bits padding types.
///\param lsb - IN: Least-significant bit padding type
///\param msb - IN: Most-significant bit padding type
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
///\par Description
/// Valid values for \a lsb and \a msb include:
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros.
diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h
index e1b1eb9..4190b80 100644
--- a/c++/src/H5AtomType.h
+++ b/c++/src/H5AtomType.h
@@ -57,7 +57,7 @@ class H5_DLLCPP AtomType : public DataType {
// Copy constructor - makes copy of the original object
AtomType( const AtomType& original );
- // Default destructor
+ // Noop destructor
virtual ~AtomType();
protected:
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index 72341f4..e004ab9 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -114,7 +114,7 @@ int CompType::getNmembers() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-string CompType::getMemberName( int member_num ) const
+string CompType::getMemberName( unsigned member_num ) const
{
char* member_name_C = H5Tget_member_name( id, member_num );
if( member_name_C == NULL ) // NULL means failure
@@ -170,7 +170,7 @@ int CompType::getMemberIndex(const string& name) const
// Note that byte offset being returned as 0 doesn't indicate
// a failure. (According to Quincey)
//--------------------------------------------------------------------------
-size_t CompType::getMemberOffset( int member_num ) const
+size_t CompType::getMemberOffset( unsigned member_num ) const
{
size_t offset = H5Tget_member_offset( id, member_num );
return( offset );
@@ -192,7 +192,7 @@ int CompType::getMemberDims( int member_num, size_t* dims, int* perm ) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-H5T_class_t CompType::getMemberClass( int member_num ) const
+H5T_class_t CompType::getMemberClass( unsigned member_num ) const
{
// get the member datatype first
hid_t member_type_id = H5Tget_member_type( id, member_num );
@@ -216,7 +216,7 @@ H5T_class_t CompType::getMemberClass( int member_num ) const
// of the specified member. It provides the id to construct appropriate
// sub-types in the functions getMemberXxxType below, where Xxx indicates
// the sub-types.
-hid_t CompType::p_get_member_type(int member_num) const
+hid_t CompType::p_get_member_type(unsigned member_num) const
{
// get the id of the specified member first
hid_t member_type_id = H5Tget_member_type( id, member_num );
@@ -326,27 +326,27 @@ StrType CompType::getMemberStrType( int member_num ) const
May, 2004: These should be reconsidered to provide more convenience.
// Returns the datatype of the specified member in this compound datatype.
// Several overloading of getMemberType are for different datatypes
-void CompType::getMemberType( int member_num, EnumType& enumtype ) const
+void CompType::getMemberType( unsigned member_num, EnumType& enumtype ) const
{
p_get_member_type(member_num, enumtype);
}
-void CompType::getMemberType( int member_num, CompType& comptype ) const
+void CompType::getMemberType( unsigned member_num, CompType& comptype ) const
{
p_get_member_type(member_num, comptype);
}
-void CompType::getMemberType( int member_num, IntType& inttype ) const
+void CompType::getMemberType( unsigned member_num, IntType& inttype ) const
{
p_get_member_type(member_num, inttype);
}
-void CompType::getMemberType( int member_num, FloatType& floatype ) const
+void CompType::getMemberType( unsigned member_num, FloatType& floatype ) const
{
p_get_member_type(member_num, floatype);
}
-void CompType::getMemberType( int member_num, StrType& strtype ) const
+void CompType::getMemberType( unsigned member_num, StrType& strtype ) const
{
p_get_member_type(member_num, strtype);
}
diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h
index 0c530b1..bc96969 100644
--- a/c++/src/H5CompType.h
+++ b/c++/src/H5CompType.h
@@ -34,7 +34,7 @@ class H5_DLLCPP CompType : public DataType {
// Returns the type class of the specified member of this compound
// datatype. It provides to the user a way of knowing what type
// to create another datatype of the same class
- H5T_class_t getMemberClass( int member_num ) const;
+ H5T_class_t getMemberClass( unsigned member_num ) const;
// Returns the dimensionality of the specified member.
int getMemberDims( int member_num, size_t* dims, int* perm ) const;
@@ -44,10 +44,10 @@ class H5_DLLCPP CompType : public DataType {
int getMemberIndex(const string& name) const;
// Returns the offset of a member of this compound datatype.
- size_t getMemberOffset( int memb_no ) const;
+ size_t getMemberOffset( unsigned memb_no ) const;
// Returns the name of a member of this compound datatype.
- string getMemberName( int member_num ) const;
+ string getMemberName( unsigned member_num ) const;
// Returns the compound datatype of the specified member in
// this compound datatype.
@@ -97,7 +97,7 @@ class H5_DLLCPP CompType : public DataType {
private:
// Contains common code that is used by the member functions
// getMemberXxxType
- hid_t p_get_member_type(int member_num) const;
+ hid_t p_get_member_type(unsigned member_num) const;
};
#ifndef H5_NO_NAMESPACE
}
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 7e0f317..1dc7b43 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -419,7 +419,7 @@ void DataSpace::getSelectElemPointlist ( hsize_t startpoint, hsize_t numpoints,
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectBounds
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::getSelectBounds ( hssize_t* start, hssize_t* end ) const
+void DataSpace::getSelectBounds ( hsize_t* start, hsize_t* end ) const
{
herr_t ret_value = H5Sget_select_bounds( id, start, end );
if( ret_value < 0 )
@@ -445,7 +445,7 @@ void DataSpace::getSelectBounds ( hssize_t* start, hssize_t* end ) const
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectElements
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const
+void DataSpace::selectElements ( H5S_seloper_t op, const size_t num_elements, const hsize_t *coord[ ] ) const
{
herr_t ret_value;
ret_value = H5Sselect_elements( id, op, num_elements, coord );
@@ -525,7 +525,7 @@ bool DataSpace::selectValid () const
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5S.html#Dataspace-SelectHyperslab
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride, const hsize_t *block ) const
+void DataSpace::selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride, const hsize_t *block ) const
{
herr_t ret_value;
ret_value = H5Sselect_hyperslab( id, op, start, stride, count, block );
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index 5e20730..a07289b 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -41,7 +41,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
void extentCopy( DataSpace& dest_space ) const;
// Gets the bounding box containing the current selection.
- void getSelectBounds( hssize_t* start, hssize_t* end ) const;
+ void getSelectBounds( hsize_t* start, hsize_t* end ) const;
// Gets the number of element points in the current selection.
hssize_t getSelectElemNpoints() const;
@@ -82,10 +82,10 @@ class H5_DLLCPP DataSpace : public IdComponent {
// Selects array elements to be included in the selection for
// this dataspace.
- void selectElements( H5S_seloper_t op, const size_t num_elements, const hssize_t *coord[ ] ) const;
+ void selectElements( H5S_seloper_t op, const size_t num_elements, const hsize_t *coord[ ] ) const;
// Selects a hyperslab region to add to the current selected region.
- void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hssize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const;
+ void selectHyperslab( H5S_seloper_t op, const hsize_t *count, const hsize_t *start, const hsize_t *stride = NULL, const hsize_t *block = NULL ) const;
// Resets the selection region to include no elements.
void selectNone() const;
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 1f01aa2..8dcb7bd 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -39,29 +39,29 @@ namespace H5 {
#endif
//--------------------------------------------------------------------------
-// Function: DataType overloaded constructor
-///\brief Creates a datatype using an existing datatype's id
-///\param existing_id - IN: Id of the existing datatype
-///\param predefined - IN: Indicates whether or not this datatype is
-/// a predefined datatype; default to \c false
+// Function: DataType overloaded constructor
+///\brief Creates a datatype using an existing datatype's id
+///\param existing_id - IN: Id of the existing datatype
+///\param predefined - IN: Indicates whether or not this datatype is
+/// a predefined datatype; default to \c false
// Description
-// Constructor creates a copy of an existing DataType using
-// its id. The argument "predefined" is default to false;
-// when a default datatype is created, this argument is set
-// to true so H5Tclose will not be called on it later. - need
-// a reassessment after changing to the new ref counting mech.
-// - BMR 5/2004
-// Programmer Binh-Minh Ribler - 2000
+// Constructor creates a copy of an existing DataType using
+// its id. The argument "predefined" is default to false;
+// when a default datatype is created, this argument is set
+// to true so H5Tclose will not be called on it later. - need
+// a reassessment after changing to the new ref counting mech.
+// - BMR 5/2004
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType(const hid_t existing_id, bool predefined) : H5Object(existing_id), is_predtype(predefined) {}
//--------------------------------------------------------------------------
-// Function: DataType overloaded constructor
-///\brief Creates a object given its class and size
-///\param type_class - IN: Class of datatype to create
-///\param size - IN: Number of bytes in the datatype to create
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType overloaded constructor
+///\brief Creates a object given its class and size
+///\param type_class - IN: Class of datatype to create
+///\param size - IN: Number of bytes in the datatype to create
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object(), is_predtype( false )
{
@@ -74,16 +74,16 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object(), is
}
//--------------------------------------------------------------------------
-// Function: DataType default constructor
-///\brief Default constructor: Creates a stub datatype
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType default constructor
+///\brief Default constructor: Creates a stub datatype
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType() : H5Object(), is_predtype( false ) {}
//--------------------------------------------------------------------------
-// Function: DataType copy constructor
-///\brief Copy constructor: makes a copy of the original DataType object.
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType copy constructor
+///\brief Copy constructor: makes a copy of the original DataType object.
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType(const DataType& original) : H5Object(original)
{
@@ -91,11 +91,11 @@ DataType::DataType(const DataType& original) : H5Object(original)
}
//--------------------------------------------------------------------------
-// Function: DataType::copy
-///\brief Copies an existing datatype to this datatype object
-///\param like_type - IN: Datatype to be copied
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::copy
+///\brief Copies an existing datatype to this datatype object
+///\param like_type - IN: Datatype to be copied
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::copy( const DataType& like_type )
{
@@ -114,21 +114,19 @@ void DataType::copy( const DataType& like_type )
ref_count = new RefCounter;
if( id <= 0 )
- {
throw DataTypeIException("DataType::copy", "H5Tcopy failed");
- }
}
//--------------------------------------------------------------------------
-// Function: DataType::operator=
-///\brief Assignment operator
-///\param rhs - IN: Reference to the existing datatype
-///\return Reference to DataType instance
-///\exception H5::DataTypeIException
+// Function: DataType::operator=
+///\brief Assignment operator
+///\param rhs - IN: Reference to the existing datatype
+///\return Reference to DataType instance
+///\exception H5::DataTypeIException
// Description
-// Makes a copy of the type on the right hand side and stores
-// the new id in the left hand side object.
-// Programmer Binh-Minh Ribler - 2000
+// Makes a copy of the type on the right hand side and stores
+// the new id in the left hand side object.
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType& DataType::operator=( const DataType& rhs )
{
@@ -137,13 +135,13 @@ DataType& DataType::operator=( const DataType& rhs )
}
//--------------------------------------------------------------------------
-// Function: DataType::operator==
-///\brief Compares this DataType against the given one to determines
-/// whether the two objects refer to the same actual datatype.
-///\param compared_type - IN: Reference to the datatype to compare
-///\return true if the datatypes are equal, and false, otherwise.
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::operator==
+///\brief Compares this DataType against the given one to determines
+/// whether the two objects refer to the same actual datatype.
+///\param compared_type - IN: Reference to the datatype to compare
+///\return true if the datatypes are equal, and false, otherwise.
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DataType::operator==(const DataType& compared_type ) const
{
@@ -162,16 +160,15 @@ bool DataType::operator==(const DataType& compared_type ) const
}
//--------------------------------------------------------------------------
-// Function: DataType::commit
-///\brief Commits a transient datatype to a file, creating a new
-/// named datatype
-///\param loc - IN: Either a file or a group
-///\param name - IN: Name of the datatype
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::commit
+///\brief Commits a transient datatype to a file, creating a new
+/// named datatype
+///\param loc - IN: Either a file or a group
+///\param name - IN: Name of the datatype
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-// Commits a transient datatype to a file, creating a new named datatype
-void DataType::commit( CommonFG& loc, const char* name ) const
+void DataType::commit(CommonFG& loc, const char* name) const
{
hid_t loc_id = loc.getLocId(); // get location id for C API
@@ -182,25 +179,26 @@ void DataType::commit( CommonFG& loc, const char* name ) const
throw DataTypeIException("DataType::commit", "H5Tcommit failed");
}
}
+
//--------------------------------------------------------------------------
-// Function: DataType::commit
-///\brief This is an overloaded member function, provided for convenience.
-/// It differs from the above function only in the type of the
-/// argument \a name.
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::commit
+///\brief This is an overloaded member function, provided for convenience.
+/// It differs from the above function only in the type of the
+/// argument \a name.
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::commit( CommonFG& loc, const string& name ) const
+void DataType::commit(CommonFG& loc, const string& name) const
{
commit( loc, name.c_str() );
}
//--------------------------------------------------------------------------
-// Function: DataType::committed
-///\brief Determines whether a datatype is a named type or a
-/// transient type.
-///\return true if the datatype is a named type, and false, otherwise.
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::committed
+///\brief Determines whether a datatype is a named type or a
+/// transient type.
+///\return true if the datatype is a named type, and false, otherwise.
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DataType::committed() const
{
@@ -217,14 +215,14 @@ bool DataType::committed() const
}
//--------------------------------------------------------------------------
-// Function: DataType::find
-///\brief Finds a conversion function that can handle a conversion
-/// from this datatype to the specified datatype, \a dest.
-///\param dest - IN: Destination datatype
-///\param pcdata - IN: Pointer to type conversion data
-///\return Pointer to a suitable conversion function
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::find
+///\brief Finds a conversion function that can handle a conversion
+/// from this datatype to the specified datatype, \a dest.
+///\param dest - IN: Destination datatype
+///\param pcdata - IN: Pointer to type conversion data
+///\return Pointer to a suitable conversion function
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const
{
@@ -238,17 +236,17 @@ H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const
}
//--------------------------------------------------------------------------
-// Function: DataType::convert
-///\brief Converts data from this datatype to the specified datatypes.
-///\param dest - IN: Destination datatype
-///\param nelmts - IN: Size of array \a buf
-///\param buf - IN/OUT: Array containing pre- and post-conversion
-/// values
-///\param background - IN: Optional backgroud buffer
-///\param plist - IN: Dataset transfer property list
-///\return Pointer to a suitable conversion function
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::convert
+///\brief Converts data from this datatype to the specified datatypes.
+///\param dest - IN: Destination datatype
+///\param nelmts - IN: Size of array \a buf
+///\param buf - IN/OUT: Array containing pre- and post-conversion
+/// values
+///\param background - IN: Optional backgroud buffer
+///\param plist - IN: Dataset transfer property list
+///\return Pointer to a suitable conversion function
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::convert( const DataType& dest, hsize_t nelmts, void *buf, void *background, PropList& plist ) const
{
@@ -284,17 +282,17 @@ H5T_overflow_t DataType::getOverflow(void) const
}
//--------------------------------------------------------------------------
-// Function: DataType::lock
-///\brief Locks a datatype, making it read-only and non-destructible.
-///\exception H5::DataTypeIException
+// Function: DataType::lock
+///\brief Locks a datatype, making it read-only and non-destructible.
+///\exception H5::DataTypeIException
///\par Descrition
-/// This is normally done by the library for predefined data
-/// types so the application doesn't inadvertently change or
-/// delete a predefined type.
+/// This is normally done by the library for predefined data
+/// types so the application doesn't inadvertently change or
+/// delete a predefined type.
///
-/// Once a data type is locked it can never be unlocked unless
-/// the entire library is closed.
-// Programmer Binh-Minh Ribler - 2000
+/// Once a data type is locked it can never be unlocked unless
+/// the entire library is closed.
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::lock() const
{
@@ -307,11 +305,11 @@ void DataType::lock() const
}
//--------------------------------------------------------------------------
-// Function: DataType::getClass
-///\brief Returns the datatype class identifier.
-///\return Datatype class identifier
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::getClass
+///\brief Returns the datatype class identifier.
+///\return Datatype class identifier
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_class_t DataType::getClass() const
{
@@ -327,11 +325,11 @@ H5T_class_t DataType::getClass() const
}
//--------------------------------------------------------------------------
-// Function: DataType::getSize
-///\brief Returns the size of a datatype.
-///\return Datatype size in bytes
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::getSize
+///\brief Returns the size of a datatype.
+///\return Datatype size in bytes
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t DataType::getSize() const
{
@@ -346,11 +344,11 @@ size_t DataType::getSize() const
}
//--------------------------------------------------------------------------
-// Function: DataType::getSuper
-///\brief Returns the base datatype from which a datatype is derived.
-///\return DataType object
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::getSuper
+///\brief Returns the base datatype from which a datatype is derived.
+///\return DataType object
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType DataType::getSuper() const
{
@@ -372,20 +370,20 @@ DataType DataType::getSuper() const
}
//--------------------------------------------------------------------------
-// Function: DataType::registerFunc
-///\brief Registers the specified conversion function.
-///\param pers - IN: Conversion option
-/// \li \c H5T_PERS_HARD for hard conversion functions
-/// \li \c H5T_PERS_SOFT for soft conversion functions.
-///\param name - IN: Name displayed in diagnostic output.
-///\param dest - IN: Destination datatype.
-///\param func - IN: Function to convert between source and
-/// destination datatypes.
-///\exception H5::DataTypeIException
+// Function: DataType::registerFunc
+///\brief Registers the specified conversion function.
+///\param pers - IN: Conversion option
+/// \li \c H5T_PERS_HARD for hard conversion functions
+/// \li \c H5T_PERS_SOFT for soft conversion functions.
+///\param name - IN: Name displayed in diagnostic output.
+///\param dest - IN: Destination datatype.
+///\param func - IN: Function to convert between source and
+/// destination datatypes.
+///\exception H5::DataTypeIException
///\par Description
-/// For more information, please see:
+/// For more information, please see:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5T.html#Datatype-Register
-// Programmer Binh-Minh Ribler - 2000
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::registerFunc( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const
{
@@ -398,12 +396,13 @@ void DataType::registerFunc( H5T_pers_t pers, const char* name, const DataType&
throw DataTypeIException("DataType::registerFunc", "H5Tregister failed");
}
}
+
//--------------------------------------------------------------------------
-// Function: DataType::registerFunc
-///\brief This is an overloaded member function, provided for convenience.
-/// It differs from the above function only in the type of the
-/// argument \a name.
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::registerFunc
+///\brief This is an overloaded member function, provided for convenience.
+/// It differs from the above function only in the type of the
+/// argument \a name.
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::registerFunc( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const
{
@@ -411,17 +410,17 @@ void DataType::registerFunc( H5T_pers_t pers, const string& name, const DataType
}
//--------------------------------------------------------------------------
-// Function: DataType::unregister
-///\brief Removes a conversion function from all conversion paths.
-///\param pers - IN: Conversion option
-/// \li \c H5T_PERS_HARD for hard conversion functions
-/// \li \c H5T_PERS_SOFT for soft conversion functions.
-///\param name - IN: Name displayed in diagnostic output.
-///\param dest - IN: Destination datatype.
-///\param func - IN: Function to convert between source and
-/// destination datatypes.
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::unregister
+///\brief Removes a conversion function from all conversion paths.
+///\param pers - IN: Conversion option
+/// \li \c H5T_PERS_HARD for hard conversion functions
+/// \li \c H5T_PERS_SOFT for soft conversion functions.
+///\param name - IN: Name displayed in diagnostic output.
+///\param dest - IN: Destination datatype.
+///\param func - IN: Function to convert between source and
+/// destination datatypes.
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const
{
@@ -434,12 +433,13 @@ void DataType::unregister( H5T_pers_t pers, const char* name, const DataType& de
throw DataTypeIException("DataType::unregister", "H5Tunregister failed");
}
}
+
//--------------------------------------------------------------------------
-// Function: DataType::unregister
-///\brief This is an overloaded member function, provided for convenience.
-/// It differs from the above function only in the type of the
-/// argument \a name.
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::unregister
+///\brief This is an overloaded member function, provided for convenience.
+/// It differs from the above function only in the type of the
+/// argument \a name.
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const
{
@@ -447,12 +447,12 @@ void DataType::unregister( H5T_pers_t pers, const string& name, const DataType&
}
//--------------------------------------------------------------------------
-// Function: DataType::setTag
-///\brief Tags an opaque datatype.
-///\param tag - IN: Descriptive ASCII string with which the opaque
-/// datatype is to be tagged.
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::setTag
+///\brief Tags an opaque datatype.
+///\param tag - IN: Descriptive ASCII string with which the opaque
+/// datatype is to be tagged.
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::setTag( const char* tag ) const
{
@@ -463,12 +463,13 @@ void DataType::setTag( const char* tag ) const
throw DataTypeIException("DataType::setTag", "H5Tset_tag failed");
}
}
+
//--------------------------------------------------------------------------
-// Function: DataType::setTag
-///\brief This is an overloaded member function, provided for convenience.
-/// It differs from the above function only in the type of the
-/// argument \a name.
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::setTag
+///\brief This is an overloaded member function, provided for convenience.
+/// It differs from the above function only in the type of the
+/// argument \a name.
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DataType::setTag( const string& tag ) const
{
@@ -476,11 +477,11 @@ void DataType::setTag( const string& tag ) const
}
//--------------------------------------------------------------------------
-// Function: DataType::getTag
-///\brief Gets the tag associated with an opaque datatype.
-///\return Tag associated with the opaque datatype
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: DataType::getTag
+///\brief Gets the tag associated with an opaque datatype.
+///\return Tag associated with the opaque datatype
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
string DataType::getTag() const
{
@@ -507,7 +508,7 @@ string DataType::getTag() const
/// datatype.
///\return true if this datatype contains or is the specified type,
/// and false, otherwise.
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
bool DataType::detectClass(H5T_class_t cls) const
@@ -529,7 +530,7 @@ bool DataType::detectClass(H5T_class_t cls) const
///\brief Check whether this datatype is a variable-length string.
///\return true if this datatype is a variable-length string, and
/// false, otherwise.
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
bool DataType::isVariableStr() const
@@ -638,8 +639,8 @@ void DataType::p_close() const
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
-// Function: DataType destructor
-///\brief Properly terminates access to this datatype.
+// Function: DataType destructor
+///\brief Properly terminates access to this datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::~DataType()
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index 7714231..df3ca59 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -25,30 +25,39 @@ class H5_DLLCPP DataType : public H5Object {
// Creates a datatype given its class and size
DataType( const H5T_class_t type_class, size_t size );
+ // Copy constructor: makes a copy of the original object
+ DataType( const DataType& original );
+
// Copies an existing datatype to this datatype object
void copy( const DataType& like_type );
+ // Returns the datatype class identifier.
+ H5T_class_t getClass() const;
+
// Commits a transient datatype to a file; this datatype becomes
// a named datatype which can be accessed from the location.
- void commit( CommonFG& loc, const char* name ) const;
void commit( CommonFG& loc, const string& name ) const;
+ void commit( CommonFG& loc, const char* name ) const;
// Determines whether this datatype is a named datatype or
// a transient datatype.
bool committed() const;
+ // Finds a conversion function that can handle the conversion
+ // this datatype to the given datatype, dest.
+ H5T_conv_t find( const DataType& dest, H5T_cdata_t **pcdata ) const;
+
// Converts data from between specified datatypes.
void convert( const DataType& dest, hsize_t nelmts, void *buf, void *background, PropList& plist ) const;
- // Checks whether this datatype contains (or is) a certain type class.
- bool detectClass(H5T_class_t cls) const;
+ // Assignment operator
+ DataType& operator=( const DataType& rhs );
- // Finds a conversion function that can handle the conversion
- // this datatype to the given datatype, dest.
- H5T_conv_t find( const DataType& dest, H5T_cdata_t **pcdata ) const;
+ // Determines whether two datatypes are the same.
+ bool operator==(const DataType& compared_type ) const;
- // Returns the datatype class identifier.
- H5T_class_t getClass() const;
+ // Locks a datatype.
+ void lock() const;
// Returns a pointer to the current global overflow function.
H5T_overflow_t getOverflow(void) const;
@@ -63,45 +72,39 @@ class H5_DLLCPP DataType : public H5Object {
// Note: not quite right for specific types yet???
DataType getSuper() const;
- // Gets the tag associated with an opaque datatype.
- string getTag() const;
+ // Registers a conversion function.
+ void registerFunc(H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const;
+ void registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
+
+ // Removes a conversion function from all conversion paths.
+ void unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const;
+ void unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
// Tags an opaque datatype.
void setTag( const string& tag ) const;
void setTag( const char* tag ) const;
- // Checks whether this datatype is a variable-length string.
- bool isVariableStr() const;
-
- // Locks a datatype.
- void lock() const;
+ // Gets the tag associated with an opaque datatype.
+ string getTag() const;
- // Assignment operator
- DataType& operator=( const DataType& rhs );
+ // Checks whether this datatype contains (or is) a certain type class.
+ bool detectClass(H5T_class_t cls) const;
- // Determines whether two datatypes are the same.
- bool operator==(const DataType& compared_type ) const;
+ // Checks whether this datatype is a variable-length string.
+ bool isVariableStr() const;
- // Registers a conversion function.
- void registerFunc(H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const;
- void registerFunc(H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
+ // Creates a reference to a named Hdf5 object in this object.
+ void* Reference(const char* name) const;
- // Removes a conversion function from all conversion paths.
- void unregister( H5T_pers_t pers, const string& name, const DataType& dest, H5T_conv_t func ) const;
- void unregister( H5T_pers_t pers, const char* name, const DataType& dest, H5T_conv_t func ) const;
+ // Creates a reference to a named Hdf5 object or to a dataset region
+ // in this object.
+ void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
// Retrieves the type of object that an object reference points to.
H5G_obj_t getObjType(void *ref, H5R_type_t ref_type) const;
// Retrieves a dataspace with the region pointed to selected.
DataSpace getRegion(void *ref, H5R_type_t ref_type = H5R_DATASET_REGION) const;
-
- // Creates a reference to a named Hdf5 object or to a dataset region
- // in this object.
- void* Reference(const char* name, DataSpace& dataspace, H5R_type_t ref_type = H5R_DATASET_REGION) const;
-
- // Creates a reference to a named Hdf5 object in this object.
- void* Reference(const char* name) const;
// Creates a copy of an existing DataType using its id
DataType( const hid_t type_id, bool predtype = false );
@@ -109,9 +112,6 @@ class H5_DLLCPP DataType : public H5Object {
// Default constructor
DataType();
- // Copy constructor: makes a copy of the original object
- DataType( const DataType& original );
-
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Used by the API to appropriately close a datatype
void p_close() const;
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index a6260dc..c9a16ba 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -34,22 +34,22 @@ namespace H5 {
const DSetCreatPropList DSetCreatPropList::DEFAULT( H5P_DEFAULT );
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList default constructor
-///\brief Default constructor: creates a stub dataset creation property list
+// Function: DSetCreatPropList default constructor
+///\brief Default constructor: creates a stub dataset creation property list
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::DSetCreatPropList() : PropList( H5P_DATASET_CREATE) {}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList copy constructor
-///\brief Copy constructor: makes a copy of the original
-/// DSetCreatPropList object
+// Function: DSetCreatPropList copy constructor
+///\brief Copy constructor: makes a copy of the original
+/// DSetCreatPropList object
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : PropList( orig ) {}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList overloaded constructor
+// Function: DSetCreatPropList overloaded constructor
///\brief Creates a DSetCreatPropList object using the id of an
/// existing dataset creation property list.
// Programmer Binh-Minh Ribler - 2000
@@ -57,18 +57,18 @@ DSetCreatPropList::DSetCreatPropList( const DSetCreatPropList& orig ) : PropList
DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : PropList( plist_id ) {}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setChunk
-///\brief Sets the size of the chunks used to store a chunked layout
-/// dataset.
-///\param ndims - IN: Number of dimensions of each chunk
-///\param dim - IN: Array containing the size of each chunk
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setChunk
+///\brief Sets the size of the chunks used to store a chunked layout
+/// dataset.
+///\param ndims - IN: Number of dimensions of each chunk
+///\param dim - IN: Array containing the size of each chunk
+///\exception H5::PropListIException
///\par Description
-/// The \a ndims parameter currently must have the same value as
-/// the rank of the dataset. The values of the \a 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 \c H5D_CHUNKED, if it is not so already.
+/// The \a ndims parameter currently must have the same value as
+/// the rank of the dataset. The values of the \a 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 \c H5D_CHUNKED, if it is not so already.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setChunk( int ndims, const hsize_t* dim ) const
@@ -81,12 +81,12 @@ void DSetCreatPropList::setChunk( int ndims, const hsize_t* dim ) const
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getChunk
-///\brief Retrieves the size of the chunks used to store a chunked
-/// layout dataset.
-///\param max_ndims - IN: Size of \a dim array
-///\param dim - OUT: Array to store the chunk dimensions
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::getChunk
+///\brief Retrieves the size of the chunks used to store a chunked
+/// layout dataset.
+///\param max_ndims - IN: Size of \a dim array
+///\param dim - OUT: Array to store the chunk dimensions
+///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) const
@@ -101,12 +101,12 @@ int DSetCreatPropList::getChunk( int max_ndims, hsize_t* dim ) const
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setLayout
-///\brief Sets the type of storage used store the raw data for a dataset.
-///\param layout - IN: Type of storage layout for raw data
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setLayout
+///\brief Sets the type of storage used store the raw data for a dataset.
+///\param layout - IN: Type of storage layout for raw data
+///\exception H5::PropListIException
///\par Description
-/// For information on setting layout type, please refer to
+/// For information on setting layout type, please refer to
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetLayout
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -121,18 +121,18 @@ void DSetCreatPropList::setLayout(H5D_layout_t layout) const
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getLayout
-///\brief Retrieves the layout type of this property list
-///\return Layout type, which can be:
-/// \li \c H5D_COMPACT - raw data is stored in the object
-/// header in the file.
-/// \li \c H5D_CONTIGUOUS - raw data is stored separately from the
-/// object header in one contiguous chunk in
-/// the file.
-/// \li \c H5D_CHUNKED - raw data is stored separately from the
-/// object header in chunks in separate locations
-/// in the file.
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::getLayout
+///\brief Retrieves the layout type of this property list
+///\return Layout type, which can be:
+/// \li \c H5D_COMPACT - raw data is stored in the object
+/// header in the file.
+/// \li \c H5D_CONTIGUOUS - raw data is stored separately from the
+/// object header in one contiguous chunk in
+/// the file.
+/// \li \c H5D_CHUNKED - raw data is stored separately from the
+/// object header in chunks in separate locations
+/// in the file.
+///\exception H5::PropListIException
///\par Description
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -148,15 +148,15 @@ H5D_layout_t DSetCreatPropList::getLayout() const
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setDeflate
-///\brief Sets compression method and compression level
-///\param level - IN: Compression level, should [0..9], inclusive
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setDeflate
+///\brief Sets compression method and compression level
+///\param level - IN: Compression level, should [0..9], inclusive
+///\exception H5::PropListIException
///\par Description
-/// The function sets the compression method for this property
-/// list to \c H5D_COMPRESS_DEFLATE and the compression level to
-/// \a level. Lower compression levels are faster but result in
-/// less compression.
+/// The function sets the compression method for this property
+/// list to \c H5D_COMPRESS_DEFLATE and the compression level to
+/// \a level. Lower compression levels are faster but result in
+/// less compression.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setDeflate( int level ) const
@@ -170,20 +170,20 @@ void DSetCreatPropList::setDeflate( int level ) const
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setFillValue
-///\brief Sets a dataset fill value
-///\param fvalue_type - IN: Data type for the value passed via \a value
-///\param value - IN: Pointer to buffer containing the fill value
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setFillValue
+///\brief Sets a dataset fill value
+///\param fvalue_type - IN: Data type for the value passed via \a value
+///\param value - IN: Pointer to buffer containing the fill value
+///\exception H5::PropListIException
///\par Description
-/// The datatype may differ from that of the dataset, but it must
-/// be one that the HDF5 library is able to convert \a 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.
+/// The datatype may differ from that of the dataset, but it must
+/// be one that the HDF5 library is able to convert \a 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.
///\par
-/// For information on setting fill value, please refer to the
-/// C layer Reference Manual at:
+/// For information on setting fill value, please refer to the
+/// C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetFillValue
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -198,16 +198,16 @@ void DSetCreatPropList::setFillValue( const DataType& fvalue_type, const void* v
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getFillValue
-///\brief Retrieves a dataset fill value
-///\param fvalue_type - IN: Data type for the value passed via \a value
-///\param value - OUT: Pointer to buffer to hold the retrieved fill value
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::getFillValue
+///\brief Retrieves a dataset fill value
+///\param fvalue_type - IN: Data type for the value passed via \a value
+///\param value - OUT: Pointer to buffer to hold the retrieved fill value
+///\exception H5::PropListIException
///\par Description
-/// The fill value is returned through \a 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 \a fvalue_type.
+/// The fill value is returned through \a 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 \a fvalue_type.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::getFillValue( const DataType& fvalue_type, void* value ) const
@@ -221,13 +221,13 @@ void DSetCreatPropList::getFillValue( const DataType& fvalue_type, void* value )
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::isFillValueDefined
-///\brief Check if fill value has been defined for this property
+// Function: DSetCreatPropList::isFillValueDefined
+///\brief Check if fill value has been defined for this property
///\return
-/// \li \c H5D_FILL_VALUE_UNDEFINED =0,
-/// \li \c H5D_FILL_VALUE_DEFAULT =1,
-/// \li \c H5D_FILL_VALUE_USER_DEFINED =2
-///\exception H5::PropListIException
+/// \li \c H5D_FILL_VALUE_UNDEFINED =0,
+/// \li \c H5D_FILL_VALUE_DEFAULT =1,
+/// \li \c H5D_FILL_VALUE_USER_DEFINED =2
+///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_fill_value_t DSetCreatPropList::isFillValueDefined()
@@ -244,23 +244,23 @@ H5D_fill_value_t DSetCreatPropList::isFillValueDefined()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setFilter
-///\brief Adds a filter to the filter pipeline
-///\param filter_id - IN: Filter to add
-///\param flags - IN: Specifies general properties of the filter
-///\param cd_nelmts - IN: Number of elements in cd_values
-///\param cd_values - IN: Auxiliary data for the filter
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setFilter
+///\brief Adds a filter to the filter pipeline
+///\param filter_id - IN: Filter to add
+///\param flags - IN: Specifies general properties of the filter
+///\param cd_nelmts - IN: Number of elements in cd_values
+///\param cd_values - IN: Auxiliary data for the filter
+///\exception H5::PropListIException
///\par Description
-/// The \a flags argument is a bit vector of the field:
-/// \c H5Z_FLAG_OPTIONAL(0x0001)
+/// The \a flags argument is a bit vector of the field:
+/// \c H5Z_FLAG_OPTIONAL(0x0001)
///\par
-/// If this bit is set then the filter is optional. If the filter
-/// fails during a \c 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 \c DataSet::read() of the chunk. If this bit is clear
-/// and the filter fails then the entire I/O operation fails.
+/// If this bit is set then the filter is optional. If the filter
+/// fails during a \c 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 \c DataSet::read() of the chunk. If this bit is clear
+/// and the filter fails then the entire I/O operation fails.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const
@@ -274,13 +274,13 @@ void DSetCreatPropList::setFilter( H5Z_filter_t filter_id, unsigned int flags, s
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::removeFilter
-///\brief Removes one or more filters
-///\param filter_id - IN: Filter to remove
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::removeFilter
+///\brief Removes one or more filters
+///\param filter_id - IN: Filter to remove
+///\exception H5::PropListIException
///\par Description
-/// Deletes a filter from the dataset creation property list;
-/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE.
+/// Deletes a filter from the dataset creation property list;
+/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
@@ -294,10 +294,10 @@ void DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getNfilters
-///\brief Returns the number of filters in the pipeline
-///\return Number of filters
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::getNfilters
+///\brief Returns the number of filters in the pipeline
+///\return Number of filters
+///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int DSetCreatPropList::getNfilters() const
@@ -313,28 +313,28 @@ int DSetCreatPropList::getNfilters() const
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getFilter
-///\brief Returns information about a filter in a pipeline
-///\param filter_number - IN: Filter to get, range [0..N-1], where
-/// N is returned by H5Pget_nfilters()
-///\param flags - OUT: General properties of the filter
-///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
-/// of values defined by the filter
-///\param cd_values - OUT: Array to hold the data; allocated by the user
-///\param namelen - OUT: Length of \a name
-///\param name - OUT: Name of the filter
-///\return Filter id
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::getFilter
+///\brief Returns information about a filter in a pipeline
+///\param filter_number - IN: Filter to get, range [0..N-1], where
+/// N is returned by H5Pget_nfilters()
+///\param flags - OUT: General properties of the filter
+///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
+/// of values defined by the filter
+///\param cd_values - OUT: Array to hold the data; allocated by the user
+///\param namelen - OUT: Length of \a name
+///\param name - OUT: Name of the filter
+///\return Filter id
+///\exception H5::PropListIException
///\par Description
-/// Failure occurs when \a filter_number is out of range.
-// Programmer Binh-Minh Ribler - 2000
+/// Failure occurs when \a filter_number is out of range.
//--------------------------------------------------------------------------
-H5Z_filter_t DSetCreatPropList::getFilter( int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[] ) const
+H5Z_filter_t DSetCreatPropList::getFilter(int filter_number, unsigned int &flags, size_t &cd_nelmts,
+ unsigned int* cd_values, size_t namelen, char name[] ) const
{
H5Z_filter_t filter_id;
- filter_id = H5Pget_filter(id, filter_number, &flags, &cd_nelmts,
+ filter_id = H5Pget_filter( id, filter_number, &flags, &cd_nelmts,
cd_values, namelen, name);
- if (filter_id == H5Z_FILTER_ERROR)
+ if( filter_id == H5Z_FILTER_ERROR )
{
throw PropListIException("DSetCreatPropList::getFilter",
"H5Pget_filter returned H5Z_FILTER_ERROR");
@@ -344,20 +344,21 @@ H5Z_filter_t DSetCreatPropList::getFilter( int filter_number, unsigned int& flag
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getFilterById
-///\brief Returns information about a filter in a pipeline given the
-/// filter id
-///\param filter_id - IN: Filter to get
-///\param flags - OUT: General properties of the filter
-///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
-/// of values defined by the filter
-///\param cd_values - OUT: Array to hold the data; allocated by the user
-///\param namelen - IN: Length of \a name
-///\param name - OUT: Name of the filter
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::getFilterById
+///\brief Returns information about a filter in a pipeline given the
+/// filter id
+///\param filter_id - IN: Filter to get
+///\param flags - OUT: General properties of the filter
+///\param cd_nelmts - IN/OUT: Number of elements in \a cd_values /Number
+/// of values defined by the filter
+///\param cd_values - OUT: Array to hold the data; allocated by the user
+///\param namelen - IN: Length of \a name
+///\param name - OUT: Name of the filter
+///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[]) const
+void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts,
+ unsigned int* cd_values, size_t namelen, char name[]) const
{
herr_t ret_value = H5Pget_filter_by_id(id, filter_id, &flags, &cd_nelmts,
cd_values, namelen, name );
@@ -369,24 +370,24 @@ void DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flag
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::modifyFilter
-///\brief Modifies the specified filter
-///\param filter_id - IN: Filter to get
-///\param flags - OUT: General properties of the filter
-///\param cd_nelmts - IN: Number of elements in \a cd_values
-/// \n OUT: Number of values defined by the filter
-///\param cd_values - OUT: Array to hold the data; allocated by the user
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::modifyFilter
+///\brief Modifies the specified filter
+///\param filter_id - IN: Filter to get
+///\param flags - OUT: General properties of the filter
+///\param cd_nelmts - IN: Number of elements in \a cd_values
+/// \n OUT: Number of values defined by the filter
+///\param cd_values - OUT: Array to hold the data; allocated by the user
+///\exception H5::PropListIException
///\par Description
-/// The \a flags argument is a bit vector of the field:
-/// \c H5Z_FLAG_OPTIONAL(0x0001)
+/// The \a flags argument is a bit vector of the field:
+/// \c H5Z_FLAG_OPTIONAL(0x0001)
///\par
-/// 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.
+/// 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.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::modifyFilter( H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[] ) const
@@ -400,12 +401,12 @@ void DSetCreatPropList::modifyFilter( H5Z_filter_t filter_id, unsigned int flags
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::allFiltersAvail
-///\brief Queries whether all the filters set in this property list
-/// are available currently.
-///\return true if all filters available, and false if one or more
-/// filters not currently available
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::allFiltersAvail
+///\brief Queries whether all the filters set in this property list
+/// are available currently.
+///\return true if all filters available, and false if one or more
+/// filters not currently available
+///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool DSetCreatPropList::allFiltersAvail()
@@ -422,12 +423,12 @@ bool DSetCreatPropList::allFiltersAvail()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setShuffle
-///\brief Sets method of the shuffle filter
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setShuffle
+///\brief Sets method of the shuffle filter
+///\exception H5::PropListIException
///\par Description
-/// Please refer to the Reference Manual of \c H5Pset_shuffle for
-/// details.
+/// Please refer to the Reference Manual of \c H5Pset_shuffle for
+/// details.
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetShuffle
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -442,17 +443,17 @@ void DSetCreatPropList::setShuffle()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getAllocTime
-///\brief Get space allocation time for this property.
-///\return Space allocation time.
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::getAllocTime
+///\brief Get space allocation time for this property.
+///\return Space allocation time.
+///\exception H5::PropListIException
///\par Description
-/// The values of space allocation time can be one of the
-/// followings:
-/// \li \c H5D_ALLOC_TIME_DEFAULT
-/// \li \c H5D_ALLOC_TIME_EARLY
-/// \li \c H5D_ALLOC_TIME_LATE
-/// \li \c H5D_ALLOC_TIME_INCR
+/// The values of space allocation time can be one of the
+/// followings:
+/// \li \c H5D_ALLOC_TIME_DEFAULT
+/// \li \c H5D_ALLOC_TIME_EARLY
+/// \li \c H5D_ALLOC_TIME_LATE
+/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_alloc_time_t DSetCreatPropList::getAllocTime()
@@ -469,14 +470,14 @@ H5D_alloc_time_t DSetCreatPropList::getAllocTime()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getFillTime
-///\brief Gets fill value writing time.
-///\return Fill value writing time
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::getFillTime
+///\brief Gets fill value writing time.
+///\return Fill value writing time
+///\exception H5::PropListIException
///\par Description
-/// Valid values for fill value writing time include
-/// \li \c H5D_FILL_TIME_NEVER
-/// \li \c H5D_FILL_TIME_ALLOC.
+/// Valid values for fill value writing time include
+/// \li \c H5D_FILL_TIME_NEVER
+/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_fill_time_t DSetCreatPropList::getFillTime()
@@ -493,16 +494,16 @@ H5D_fill_time_t DSetCreatPropList::getFillTime()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setAllocTime
-///\brief Sets space allocation time for dataset during creation.
-///\param alloc_time - IN: Allocation time
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setAllocTime
+///\brief Sets space allocation time for dataset during creation.
+///\param alloc_time - IN: Allocation time
+///\exception H5::PropListIException
///\par Description
-/// Valid values for space allocation time include:
-/// \li \c H5D_ALLOC_TIME_DEFAULT
-/// \li \c H5D_ALLOC_TIME_EARLY
-/// \li \c H5D_ALLOC_TIME_LATE
-/// \li \c H5D_ALLOC_TIME_INCR
+/// Valid values for space allocation time include:
+/// \li \c H5D_ALLOC_TIME_DEFAULT
+/// \li \c H5D_ALLOC_TIME_EARLY
+/// \li \c H5D_ALLOC_TIME_LATE
+/// \li \c H5D_ALLOC_TIME_INCR
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time)
@@ -516,14 +517,14 @@ void DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time)
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setFillTime
-///\brief Sets fill value writing time for dataset.
-///\return Fill value writing time
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setFillTime
+///\brief Sets fill value writing time for dataset.
+///\return Fill value writing time
+///\exception H5::PropListIException
///\par Description
-/// Valid values for fill value writing time include
-/// \li \c H5D_FILL_TIME_NEVER
-/// \li \c H5D_FILL_TIME_ALLOC.
+/// Valid values for fill value writing time include
+/// \li \c H5D_FILL_TIME_NEVER
+/// \li \c H5D_FILL_TIME_ALLOC.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time)
@@ -537,9 +538,9 @@ void DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time)
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setFletcher32
-///\brief Sets Fletcher32 checksum of EDC for this property list.
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setFletcher32
+///\brief Sets Fletcher32 checksum of EDC for this property list.
+///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setFletcher32()
@@ -553,19 +554,19 @@ void DSetCreatPropList::setFletcher32()
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::setExternal
-///\brief Adds an external file to the list of external files
-///\param name - IN: Name of the external file
-///\param offset - IN: Location where the data starts in the file
-///\param size - IN: Number of bytes reserved in the file for the data
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::setExternal
+///\brief Adds an external file to the list of external files
+///\param name - IN: Name of the external file
+///\param offset - IN: Location where the data starts in the file
+///\param size - IN: Number of bytes reserved in the file for the data
+///\exception H5::PropListIException
///\par 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 \a 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).
+/// 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 \a 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).
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void DSetCreatPropList::setExternal( const char* name, off_t offset, hsize_t size ) const
@@ -579,10 +580,10 @@ void DSetCreatPropList::setExternal( const char* name, off_t offset, hsize_t siz
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getExternalCount
-///\brief Returns the number of external files for a dataset
-///\return Number of external files
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::getExternalCount
+///\brief Returns the number of external files for a dataset
+///\return Number of external files
+///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int DSetCreatPropList::getExternalCount() const
@@ -598,28 +599,28 @@ int DSetCreatPropList::getExternalCount() const
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList::getExternal
-///\brief Returns information about an external file
-///\param idx - IN: Index of the external file, ranges [0-(N-1)] and
-/// returned by getExternalCount()
-///\param name_size - IN: Maximum length of \a name
-///\param name - IN: Name of the external file
-///\param offset - IN: Location to return an offset value
-///\param size - OUT: Location to return the size of the external file data
-///\exception H5::PropListIException
+// Function: DSetCreatPropList::getExternal
+///\brief Returns information about an external file
+///\param idx - IN: Index of the external file, ranges [0-(N-1)] and
+/// returned by getExternalCount()
+///\param name_size - IN: Maximum length of \a name
+///\param name - IN: Name of the external file
+///\param offset - IN: Location to return an offset value
+///\param size - OUT: Location to return the size of the external file data
+///\exception H5::PropListIException
///\par Description
-/// The parameter \a idx ranges [0..N-1] where N is returned by
-/// getExternalCount(). At most \a 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 \a name_size is zero or \a name is a null pointer, the
-/// external file name will not be returned. If \a offset or
-/// \a size are null pointers then the corresponding information
-/// will not be returned.
+/// The parameter \a idx ranges [0..N-1] where N is returned by
+/// getExternalCount(). At most \a 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 \a name_size is zero or \a name is a null pointer, the
+/// external file name will not be returned. If \a offset or
+/// \a size are null pointers then the corresponding information
+/// will not be returned.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const
+void DSetCreatPropList::getExternal( unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const
{
herr_t ret_value = H5Pget_external( id, idx, name_size, name, &offset, &size );
if( ret_value < 0 )
@@ -630,8 +631,8 @@ void DSetCreatPropList::getExternal( int idx, size_t name_size, char* name, off_
}
//--------------------------------------------------------------------------
-// Function: DSetCreatPropList destructor
-///\brief Noop destructor.
+// Function: DSetCreatPropList destructor
+///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::~DSetCreatPropList () {}
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index 69388ed..61fa860 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -42,7 +42,7 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
void setChunk( int ndims, const hsize_t* dim ) const;
// Returns information about an external file.
- void getExternal( int idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const;
+ void getExternal( unsigned idx, size_t name_size, char* name, off_t& offset, hsize_t& size ) const;
// Returns the number of external files for a dataset.
int getExternalCount() const;
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index 7b29fe5..c3fbee4 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -22,7 +22,6 @@ namespace H5 {
class H5_DLLCPP DSetMemXferPropList : public PropList {
public:
- // Default dataset memory and transfer property list.
static const DSetMemXferPropList DEFAULT;
#ifdef H5_WANT_H5_V1_4_COMPAT
@@ -46,10 +45,10 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
size_t getBuffer( void** tconv, void** bkg ) const;
#endif /* H5_WANT_H5_V1_4_COMPAT */
- // Sets B-tree split ratios for a dataset transfer property list.
+ // Sets B-tree split ratios for a dataset transfer property list
void setBtreeRatios( double left, double middle, double right ) const;
- // Gets B-tree split ratios for a dataset transfer property list.
+ // Gets B-tree split ratios for a dataset transfer property list
void getBtreeRatios( double& left, double& middle, double& right ) const;
// Sets the dataset transfer property list status to TRUE or FALSE.
@@ -59,16 +58,16 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
bool getPreserve() const;
// Sets the memory manager for variable-length datatype
- // allocation in H5Dread and H5Dvlen_reclaim.
+ // allocation in H5Dread and H5Dvlen_reclaim
void setVlenMemManager( H5MM_allocate_t alloc, void* alloc_info,
H5MM_free_t free, void* free_info ) const;
// alloc and free are set to NULL, indicating that system
- // malloc and free are to be used.
+ // malloc and free are to be used
void setVlenMemManager() const;
// Gets the memory manager for variable-length datatype
- // allocation in H5Dread and H5Tvlen_reclaim.
+ // allocation in H5Dread and H5Tvlen_reclaim
void getVlenMemManager( H5MM_allocate_t& alloc, void** alloc_info,
H5MM_free_t& free, void** free_info ) const;
@@ -108,7 +107,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
// property list using the property list id.
DSetMemXferPropList (const hid_t plist_id);
- // Noop destructor.
+ // Noop destructor
virtual ~DSetMemXferPropList();
};
diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp
index 0421707..f40ae06 100644
--- a/c++/src/H5EnumType.cpp
+++ b/c++/src/H5EnumType.cpp
@@ -256,7 +256,7 @@ int EnumType::getNmembers() const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void EnumType::getMemberValue( int memb_no, void *value ) const
+void EnumType::getMemberValue( unsigned memb_no, void *value ) const
{
// Call C routine H5Tget_member_value to get the datatype member's value
hid_t ret_value = H5Tget_member_value( id, memb_no, value );
diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h
index 4cb6cbd..f88b337 100644
--- a/c++/src/H5EnumType.h
+++ b/c++/src/H5EnumType.h
@@ -41,7 +41,7 @@ class H5_DLLCPP EnumType : public DataType {
int getMemberIndex(const string& name) const;
// Returns the value of an enumeration datatype member
- void getMemberValue( int memb_no, void *value ) const;
+ void getMemberValue( unsigned memb_no, void *value ) const;
// Inserts a new member to this enumeration type.
void insert( const char* name, void *value ) const;
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index 8892e58..515e883 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -31,32 +31,32 @@ namespace H5 {
const FileAccPropList FileAccPropList::DEFAULT( H5P_DEFAULT );
//--------------------------------------------------------------------------
-// Function: FileAccPropList default constructor
-///\brief Default constructor: creates a file access property list.
-// Programmer: Binh-Minh Ribler - 2000
+// Function: Default Constructor
+///\brief Default constructor: creates a file access property list
+// Programmer: Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList() : PropList( H5P_FILE_ACCESS ) {}
//--------------------------------------------------------------------------
-// Function: FileAccPropList copy constructor
-///\brief Copy constructor: makes a copy of the original FileAccPropList.
-/// FileAccPropList object
-// Programmer: Binh-Minh Ribler - 2000
+// 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.
+// 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.
-///\exception H5::PropListIException
+// Function: FileAccPropList::setStdio
+///\brief Modifies this property list to use the \c H5FD_STDIO driver.
+///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void FileAccPropList::setStdio() const
@@ -69,34 +69,35 @@ void FileAccPropList::setStdio() const
}
//--------------------------------------------------------------------------
-// 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:
+// 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
{
- hid_t driver = H5Pget_driver( id );
+ hid_t driver = H5Pget_driver(id);
if (driver < 0)
{
throw PropListIException("FileAccPropList::getDriver", "H5Pget_driver failed");
}
- return( driver );
+ return(driver);
}
//--------------------------------------------------------------------------
-// Function: FileAccPropList::setDriver
+// 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
+///\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
//--------------------------------------------------------------------------
@@ -126,10 +127,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
@@ -151,7 +152,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
@@ -170,10 +171,10 @@ void FileAccPropList::setCore (size_t increment, hbool_t backing_store) const
//--------------------------------------------------------------------------
// Function: FileAccPropList::getCore
///\brief Queries core file driver properties.
-///\param increment - OUT: Size of memory increment, in bytes
+///\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
@@ -191,7 +192,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
@@ -212,7 +213,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
@@ -228,12 +229,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
@@ -256,7 +257,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
@@ -275,14 +276,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
@@ -297,7 +298,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
@@ -316,7 +317,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
@@ -337,7 +338,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
@@ -355,7 +356,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
@@ -374,8 +375,8 @@ void FileAccPropList::setSieveBufSize(size_t bufsize) const
// Function: FileAccPropList::setMetaBlockSize
///\brief Sets the minimum size of metadata block allocations.
///\param block_size - IN: Minimum size, in bytes, of metadata
-/// block allocations
-///\exception H5::PropListIException
+/// block allocations
+///\exception H5::PropListIException
///\par Description
/// For more detail, please see the C layer Reference Manual at:
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetMetaBlockSize
@@ -394,7 +395,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
@@ -415,7 +416,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
@@ -449,7 +450,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
@@ -466,7 +467,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
@@ -475,6 +476,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
{
@@ -491,7 +493,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
{
@@ -506,7 +509,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
@@ -525,7 +528,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
@@ -601,6 +604,7 @@ void FileAccPropList::getCache( int& mdc_nelmts, int& rdcc_nelmts, size_t& rdcc_
/// 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
{
@@ -618,7 +622,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
{
@@ -634,7 +639,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)
@@ -650,7 +655,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()
@@ -669,10 +674,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
{
@@ -687,7 +693,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
{
@@ -703,9 +710,9 @@ unsigned FileAccPropList::getGcReferences() const
}
//--------------------------------------------------------------------------
-// Function: FileAccPropList destructor
+// Function: FileAccPropList destructor
///\brief Noop destructor
-// Programmer Binh-Minh Ribler - 2000
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::~FileAccPropList() {}
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index 8b014ce..6a447b0 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -129,7 +129,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
// using the property list id.
FileAccPropList (const hid_t plist_id);
- // Default destructor
+ // Noop destructor
virtual ~FileAccPropList();
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp
index cd79b93..ff8eb47 100644
--- a/c++/src/H5FcreatProp.cpp
+++ b/c++/src/H5FcreatProp.cpp
@@ -26,48 +26,48 @@ namespace H5 {
#endif
//--------------------------------------------------------------------------
-///\brief Constant for default property
+///\brief Constant for default property
//--------------------------------------------------------------------------
const FileCreatPropList FileCreatPropList::DEFAULT( H5P_DEFAULT );
//--------------------------------------------------------------------------
-// Function: FileCreatPropList default constructor
-///\brief Default constructor: creates a file creation property list.
-// Programmer Binh-Minh Ribler - 2000
+// Function: FileCreatPropList default constructor
+///\brief Default constructor: Creates a file create property list
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileCreatPropList::FileCreatPropList() : PropList( H5P_FILE_CREATE ) {}
//--------------------------------------------------------------------------
-// Function: FileCreatPropList overloaded constructor
-///\brief Creates a file creation property list using the id of an
-/// existing one.
-///\param plist_id - IN: FileCreatPropList id to use
-// Programmer Binh-Minh Ribler - 2000
+// 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 hid_t plist_id) : PropList(plist_id) {}
+FileCreatPropList::FileCreatPropList( const FileCreatPropList& original ) : PropList( original ) {}
//--------------------------------------------------------------------------
-// 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
+// Function: FileCreatPropList overloaded constructor
+///\brief Creates a file creation property list using the id of an
+/// existing one.
+///\param plist_id - IN: FileCreatPropList id to use
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-FileCreatPropList::FileCreatPropList(const FileCreatPropList& original) : PropList(original) {}
+FileCreatPropList::FileCreatPropList(const hid_t plist_id) : PropList(plist_id) {}
//--------------------------------------------------------------------------
-// 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
+// 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
+/// Any (or even all) of the output arguments can be null pointers.
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::getVersion(
- int& super, int& freelist, int& stab, int& shhdr ) const
+void FileCreatPropList::getVersion(unsigned& super, unsigned& freelist, unsigned& stab, unsigned& shhdr) const
{
herr_t ret_value = H5Pget_version( id, &super, &freelist, &stab, &shhdr );
if( ret_value < 0 )
@@ -78,14 +78,14 @@ 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
+// 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
+/// 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
{
@@ -98,11 +98,11 @@ 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
+// 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
{
@@ -117,17 +117,17 @@ hsize_t FileCreatPropList::getUserblock() const
}
//--------------------------------------------------------------------------
-// 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
+// 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:
+/// 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
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void FileCreatPropList::setSizes( size_t sizeof_addr, size_t sizeof_size ) const
{
@@ -140,11 +140,11 @@ 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
+// 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
{
@@ -200,18 +200,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
+// 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:
+/// 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
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::setSymk( int ik, unsigned lk ) const
+void FileCreatPropList::setSymk( unsigned ik, unsigned lk ) const
{
herr_t ret_value = H5Pset_sym_k( id, ik, lk );
if( ret_value < 0 )
@@ -222,16 +222,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
+// 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
+/// For information, please see
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetSymK
-// Programmer Binh-Minh Ribler - 2000
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::getSymk( int& ik, unsigned& lk ) const
+void FileCreatPropList::getSymk( unsigned& ik, unsigned& lk ) const
{
herr_t ret_value = H5Pget_sym_k( id, &ik, &lk );
if( ret_value < 0 )
@@ -243,17 +243,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
+// 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:
+/// 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
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void FileCreatPropList::setIstorek( int ik ) const
+void FileCreatPropList::setIstorek( unsigned ik ) const
{
herr_t ret_value = H5Pset_istore_k( id, ik );
if( ret_value < 0 )
@@ -262,19 +262,20 @@ 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
+// 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
+/// For information, please see
/// http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5P.html#Property-SetIstoreK
-// Programmer Binh-Minh Ribler - 2000
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-int FileCreatPropList::getIstorek() const
+unsigned FileCreatPropList::getIstorek() const
{
- int ik;
+ unsigned ik;
herr_t ret_value = H5Pget_istore_k( id, &ik );
if( ret_value < 0 )
{
diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h
index 493e28e..66678e2 100644
--- a/c++/src/H5FcreatProp.h
+++ b/c++/src/H5FcreatProp.h
@@ -26,15 +26,14 @@ class H5_DLLCPP FileCreatPropList : public PropList {
// Default file creation property list.
static const FileCreatPropList DEFAULT;
- // Creates a file creation property list.
- FileCreatPropList();
+ // Retrieves version information for various parts of a file.
+ void getVersion( unsigned& super, unsigned& freelist, unsigned& stab, unsigned& shhdr ) const;
- // Returns the 1/2 rank of an indexed storage B-tree.
- int getIstorek() const;
+ // Sets the userblock size field of a file creation property list.
+ void setUserblock( hsize_t size ) const;
- // Sets the size of parameter used to control the B-trees for
- // indexing chunked datasets.
- void setIstorek( int ik ) const;
+ // Gets the size of a user block in this file creation property list.
+ hsize_t getUserblock() const;
// Retrieves the size-of address and size quantities stored in a
// file according to this file creation property list.
@@ -53,29 +52,30 @@ class H5_DLLCPP FileCreatPropList : public PropList {
#else /* H5_WANT_H5_V1_4_COMPAT */
// Retrieves the size of the symbol table B-tree 1/2 rank and the
// symbol table leaf node 1/2 size.
- void getSymk( int& int_nodes_k, unsigned& leaf_nodes_k ) const;
+ void getSymk( unsigned& int_nodes_k, unsigned& leaf_nodes_k ) const;
// Sets the size of parameters used to control the symbol table nodes.
- void setSymk( int int_nodes_k, unsigned leaf_nodes_k ) const;
+ void setSymk( unsigned int_nodes_k, unsigned leaf_nodes_k ) const;
#endif /* H5_WANT_H5_V1_4_COMPAT */
- // Gets the size of a user block in this file creation property list.
- hsize_t getUserblock() const;
+ // Returns the 1/2 rank of an indexed storage B-tree.
+ unsigned getIstorek() const;
- // Sets the userblock size field of a file creation property list.
- void setUserblock( hsize_t size ) const;
+ // Sets the size of parameter used to control the B-trees for
+ // indexing chunked datasets.
+ void setIstorek( unsigned ik ) const;
- // Retrieves version information for various parts of a file.
- void getVersion( int& boot, int& freelist, int& stab, int& shhdr ) const;
+ // Creates a file create property list.
+ FileCreatPropList();
- // Copy constructor: creates a copy of a FileCreatPropList object
+ // Copy constructor: creates a copy of a FileCreatPropList object.
FileCreatPropList(const FileCreatPropList& orig);
// Creates a copy of an existing file create property list
- // using the property list id
+ // using the property list id.
FileCreatPropList (const hid_t plist_id);
- // Noop destructor.
+ // Noop destructor
virtual ~FileCreatPropList();
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index dd03df1..32a4478 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -1,7 +1,7 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
+ * All rights reserved. *
+ * *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index 0508657..f7f8573 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -1,7 +1,7 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
+ * All rights reserved. *
+ * *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
@@ -53,14 +53,14 @@ IdComponent::IdComponent( const IdComponent& original )
//--------------------------------------------------------------------------
// Function: IdComponent::incRefCount
-///\brief Increments id reference counter.
+///\brief Increment id reference counter.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void IdComponent::incRefCount() { ref_count->increment(); }
//--------------------------------------------------------------------------
// Function: IdComponent::decRefCount
-///\brief Decrements id reference counter.
+///\brief Decrement id reference counter.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void IdComponent::decRefCount() { ref_count->decrement(); }
@@ -68,7 +68,7 @@ void IdComponent::decRefCount() { ref_count->decrement(); }
//--------------------------------------------------------------------------
// Function: IdComponent::getCounter
///\brief Returns the reference counter to this identifier.
-///\return Reference count
+///\return Reference count
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int IdComponent::getCounter() { return( ref_count->getCounter()); }
@@ -94,9 +94,9 @@ bool IdComponent::noReference()
// Function: IdComponent::operator=
///\brief Assignment operator.
///\param rhs - IN: Reference to the existing object
-///\return Reference to IdComponent instance
+///\return Reference to IdComponent instance
///\exception H5::IdComponentException when attempt to close the HDF5
-/// object fails
+/// object fails
// Description
// Reset the identifier of this object so that the HDF5 id can
// be properly closed. Copy the id from rhs to this object,
@@ -147,6 +147,7 @@ void IdComponent::setId( hid_t new_id )
throw IdComponentException("IdComponent::setId", close_error.getDetailMsg());
}
+ // reset object's id to the given id
id = new_id;
// starts counting object references
@@ -155,8 +156,8 @@ void IdComponent::setId( hid_t new_id )
//--------------------------------------------------------------------------
// Function: IdComponent::getId
-///\brief Returns the id of this object.
-///\return HDF5 object id
+///\brief Returns the id of this object
+///\return HDF5 id
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hid_t IdComponent::getId () const
@@ -269,7 +270,7 @@ void* IdComponent::p_reference(const char* name, hid_t space_id, H5R_type_t ref_
if (ret_value < 0)
{
throw IdComponentException("IdComponent::p_reference",
- "H5Rcreate failed");
+ "H5Rcreate failed");
}
return(ref);
}
@@ -294,7 +295,7 @@ H5G_obj_t IdComponent::p_get_obj_type(void *ref, H5R_type_t ref_type) const
if (obj_type == H5G_UNKNOWN)
{
throw IdComponentException("IdComponent::p_get_obj_type",
- "H5R_get_obj_type failed");
+ "H5R_get_obj_type failed");
}
return(obj_type);
}
@@ -316,7 +317,7 @@ hid_t IdComponent::p_get_region(void *ref, H5R_type_t ref_type) const
if (space_id < 0)
{
throw IdComponentException("IdComponent::p_get_region",
- "H5Rget_region failed");
+ "H5Rget_region failed");
}
return(space_id);
}
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index 5c84990..c01cd08 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -25,13 +25,13 @@ namespace H5 {
class H5_DLLCPP IdComponent {
public:
- // Increment reference counter
+ // Increment reference counter.
void incRefCount();
- // Decrement reference counter
+ // Decrement reference counter.
void decRefCount();
- // Get the reference counter to this identifier
+ // Get the reference counter to this identifier.
int getCounter();
// Decrements the reference counter then determines if there are no more
@@ -46,13 +46,13 @@ class H5_DLLCPP IdComponent {
// Sets the identifier of this object to a new value.
void setId( hid_t new_id );
- // Creates an object to hold an HDF5 identifier
+ // Creates an object to hold an HDF5 identifier.
IdComponent( const hid_t h5_id );
// Copy constructor: makes copy of the original IdComponent object.
IdComponent( const IdComponent& original );
- // Gets the value of IdComponent's data member
+ // Gets the value of IdComponent's data member.
virtual hid_t getId () const;
// Pure virtual function so appropriate close function can
diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h
index 404fda6..4208cfb 100644
--- a/c++/src/H5Library.h
+++ b/c++/src/H5Library.h
@@ -22,11 +22,11 @@ namespace H5 {
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define NOTATEXIT (-10) // just in case the HDF5 library use more
-#endif // DOXYGEN_SHOULD_SKIP_THIS
// negative constants. Note: the solution used for the atexit/global
// destructors is not reliable, and desperately needs improvement
// It is not even working, inifiteloop message still printed when
// calling H5close
+#endif // DOXYGEN_SHOULD_SKIP_THIS
class H5_DLLCPP H5Library {
public:
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
index b51aca0..d75cdcc 100644
--- a/c++/src/H5PredType.h
+++ b/c++/src/H5PredType.h
@@ -34,7 +34,7 @@ class H5_DLLCPP PredType : public AtomType {
// Returns the HDF5 predefined type id.
virtual hid_t getId() const;
- // Default destructor
+ // Noop destructor
virtual ~PredType();
// Declaration of predefined types; their definition is in H5PredType.cpp
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index 065e77a..02c1bde 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -36,32 +36,32 @@ namespace H5 {
const PropList PropList::DEFAULT( H5P_DEFAULT );
//--------------------------------------------------------------------------
-// Function Default constructor
-///\brief Default constructor: creates a stub property list object.
+// Function Default constructor
+///\brief Default constructor: creates a stub property list object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-PropList::PropList() : IdComponent(0) {}
+PropList::PropList() : IdComponent( 0 ) {}
//--------------------------------------------------------------------------
-// Function: PropList copy constructor
-///\brief Copy constructor
-///\param original - IN: The original property list to copy
+// Function: PropList copy constructor
+///\brief Copy constructor
+///\param original - IN: The original property list to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList( const PropList& original ) : IdComponent( original ) {}
//--------------------------------------------------------------------------
-// Function: PropList overloaded constructor
-///\brief Creates a property list using the id of an existing property.
-///\param plist_id - IN: Id of the existing property list
-///\exception H5::PropListIException
+// Function: PropList overloaded constructor
+///\brief Creates a property list using the id of an existing property.
+///\param plist_id - IN: Id of the existing property list
+///\exception H5::PropListIException
// Description
-// This function calls H5Pcreate to create a new property list
-// if the given id, plist_id, is that of a property class. If
-// the given id is equal to H5P_NO_CLASS, then set this
-// property's id to H5P_DEFAULT, otherwise, to the given id.
-// Note: someone else added this code without comments and this
-// description was what I came up with from reading the code.
+// This function calls H5Pcreate to create a new property list
+// if the given id, plist_id, is that of a property class. If
+// the given id is equal to H5P_NO_CLASS, then set this
+// property's id to H5P_DEFAULT, otherwise, to the given id.
+// Note: someone else added this code without comments and this
+// description was what I came up with from reading the code.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList( const hid_t plist_id ) : IdComponent(0)
@@ -83,10 +83,10 @@ PropList::PropList( const hid_t plist_id ) : IdComponent(0)
}
//--------------------------------------------------------------------------
-// Function: PropList::copy
-///\brief Makes a copy of an existing property list
-///\param like_plist - IN: Reference to the existing property list
-///\exception H5::PropListIException
+// Function: PropList::copy
+///\brief Makes a copy of an existing property list.
+///\param like_plist - IN: Reference to the existing property list
+///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void PropList::copy( const PropList& like_plist )
@@ -106,9 +106,7 @@ void PropList::copy( const PropList& like_plist )
ref_count = new RefCounter;
if( id <= 0 )
- {
throw PropListIException("PropList::copy", "H5Pcopy failed");
- }
}
//--------------------------------------------------------------------------
@@ -118,8 +116,8 @@ void PropList::copy( const PropList& like_plist )
///\return Reference to PropList instance
///\exception H5::PropListIException
// Description
-// Makes a copy of the property list on the right hand side
-// and stores the new id in the left hand side object.
+// Makes a copy of the property list on the right hand side
+// and stores the new id in the left hand side object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList& PropList::operator=( const PropList& rhs )
@@ -129,12 +127,12 @@ PropList& PropList::operator=( const PropList& rhs )
}
//--------------------------------------------------------------------------
-// Function: PropList::copyProp
-///\brief Copies a property from one list or class to another.
-///\param dest - IN: Destination property list or class
-///\param src - IN: Source property list or class
-///\param name - IN: Name of the property to copy - \c char pointer
-///\exception H5::PropListIException
+// Function: PropList::copyProp
+///\brief Copies a property from one list or class to another
+///\param dest - IN: Destination property list or class
+///\param src - IN: Source property list or class
+///\param name - IN: Name of the property to copy - \c char pointer
+///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void PropList::copyProp( PropList& dest, PropList& src, const char *name ) const
@@ -146,7 +144,9 @@ void PropList::copyProp( PropList& dest, PropList& src, const char *name ) const
{
throw PropListIException("PropList::copyProp", "H5Pcopy_prop failed");
}
+
}
+
//--------------------------------------------------------------------------
// Function: PropList::copyProp
///\brief This is an overloaded member function, provided for convenience.
@@ -187,11 +187,11 @@ void PropList::p_close() const
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
-// Function: PropList::getClass
-///\brief Returns the class of this property list, i.e. \c H5P_FILE_CREATE...
-///\return The property list class if it is not equal to \c H5P_NO_CLASS
-///\exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
+// Function: PropList::getClass
+///\brief Returns the class of this property list, i.e. \c H5P_FILE_CREATE...
+///\return The property list class if it is not equal to \c H5P_NO_CLASS
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hid_t PropList::getClass() const
{
@@ -249,7 +249,7 @@ bool PropList::propExist(const string& name ) const
///\brief Close a property list class.
///\exception H5::PropListIException
///\par Description
-/// Releases memory and de-attaches a class from the property
+/// Releases memory and detaches a class from the property
/// list class hierarchy.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
@@ -269,8 +269,9 @@ void PropList::closeClass() const
///\param value - OUT: Pointer to the buffer for the property value
///\exception H5::PropListIException
///\par Description
-/// Retrieves a copy of the value for a property in a property list. The
-/// property name must exist or this routine will throw an exception.
+/// Retrieves a copy of the value for a property in a property
+/// list. The property name must exist or this routine will
+/// throw an exception.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::getProperty(const char* name, void* value) const
@@ -373,7 +374,7 @@ size_t PropList::getPropSize(const string& name) const
//--------------------------------------------------------------------------
// Function: PropList::getClassName
-///\brief Return the name of a generic property list class
+///\brief Return the name of a generic property list class.
///\return A string containing the class name, if success, otherwise,
/// a NULL string.
// Programmer: Binh-Minh Ribler - April, 2004
diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h
index 557a39b..b8fa735 100644
--- a/c++/src/H5PropList.h
+++ b/c++/src/H5PropList.h
@@ -25,6 +25,10 @@ class H5_DLLCPP PropList : public IdComponent {
// Default property list
static const PropList DEFAULT;
+ // Creates a property list of a given type or creates a copy of an
+ // existing property list giving the property list id.
+ PropList(const hid_t plist_id);
+
// Make a copy of the given property list using assignment statement
PropList& operator=( const PropList& rhs );
@@ -85,10 +89,6 @@ class H5_DLLCPP PropList : public IdComponent {
// Default constructor: creates a stub PropList object.
PropList();
- // Creates a property list of a given type or creates a copy of an
- // existing property list giving the property list id.
- PropList(const hid_t plist_id);
-
// Copy constructor: creates a copy of a PropList object.
PropList(const PropList& original);
diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp
index d213841..4d30be1 100644
--- a/c++/src/H5StrType.cpp
+++ b/c++/src/H5StrType.cpp
@@ -106,11 +106,11 @@ StrType::StrType( const hid_t existing_id ) : AtomType( existing_id ) {}
StrType::StrType( const StrType& original ) : AtomType ( original ) {}
//--------------------------------------------------------------------------
-// Function: EnumType overloaded constructor
-///\brief Gets the string datatype of the specified dataset
-///\param dataset - IN: Dataset that this string datatype associates with
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Function: EnumType overloaded constructor
+///\brief Gets the string datatype of the specified dataset
+///\param dataset - IN: Dataset that this string datatype associates with
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType( const DataSet& dataset ) : AtomType ()
{
diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp
index 882dccc..9cb3bac 100644
--- a/c++/src/H5VarLenType.cpp
+++ b/c++/src/H5VarLenType.cpp
@@ -37,10 +37,10 @@ namespace H5 {
VarLenType::VarLenType() : DataType() {}
//--------------------------------------------------------------------------
-// Function: VarLenType overloaded constructor
-///\brief Creates an VarLenType object using an existing id.
-///\param existing_id - IN: Id of an existing datatype
-///\exception H5::DataTypeIException
+// Function: VarLenType overloaded constructor
+///\brief Creates an VarLenType object using an existing id.
+///\param existing_id - IN: Id of an existing datatype
+///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id) {}
@@ -57,7 +57,7 @@ VarLenType::VarLenType(const VarLenType& original) : DataType(original) {}
///\brief Creates a new variable-length datatype based on the specified
/// \a base_type.
///\param base_type - IN: Pointer to existing datatype
-///\exception H5::DataTypeIException
+///\exception H5::DataTypeIException
// Description
// DataType passed by pointer to avoid clashing with copy
// constructor.
diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h
index 8a2572b..c31946a 100644
--- a/c++/src/H5VarLenType.h
+++ b/c++/src/H5VarLenType.h
@@ -28,10 +28,10 @@ class H5_DLLCPP VarLenType : public DataType {
// on the specified base type.
VarLenType(const DataType* base_type);
- // Copy constructor - makes copy of the original object
+ // Copy constructor: makes copy of the original object.
VarLenType( const VarLenType& original );
- // Default destructor
+ // Noop destructor
virtual ~VarLenType();
protected:
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index 21e07fa..e9e1b86 100755
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -27,6 +27,7 @@ prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
includedir="@includedir@"
+HL="@HL@"
############################################################################
## ##
@@ -54,7 +55,6 @@ get_output_file="no"
SHOW="eval"
CXXBASE="@CXX@"
CXXLINKERBASE="@CXX@"
-CFLAGS="@CFLAGS@"
CXXFLAGS="@CXXFLAGS@"
CPPFLAGS="@CPPFLAGS@"
LDFLAGS="@LDFLAGS@"
@@ -229,7 +229,7 @@ if test "x$do_compile" = "xyes"; then
compile_args="-c $compile_args"
fi
- $SHOW $CXX -I$includedir $CPPFLAGS $CXXFLAGS $CFLAGS $compile_args
+ $SHOW $CXX -I$includedir $CPPFLAGS $CXXFLAGS $compile_args
status=$?
if test "$status" != "0"; then
@@ -238,8 +238,13 @@ if test "x$do_compile" = "xyes"; then
fi
if test "x$do_link" = "xyes"; then
- link_args="$link_args ${libdir}/libhdf5_cpp.a ${libdir}/libhdf5.a $LIBS"
- $SHOW $CXXLINKER -I$includedir $CPPFLAGS $CXXFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $link_args
+ # conditionnaly link with the hl library
+ if test "X$HL" = "Xhl"; then
+ link_args="$link_args ${libdir}/libhdf5_cpp.a ${libdir}/libhdf5.a ${libdir}/libhdf5_hl.a $LIBS"
+ else
+ link_args="$link_args ${libdir}/libhdf5_cpp.a ${libdir}/libhdf5.a $LIBS"
+ fi
+ $SHOW $CXXLINKER -I$includedir $CPPFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $link_args
status=$?
fi
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 97c5e51..8903cd7 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -33,7 +33,6 @@
#endif
#include "testhdf5.h"
-#include "h5test.h"
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
@@ -42,15 +41,15 @@ using namespace H5;
#include "h5cpputil.h"
-const string FILE1("dataset.h5");
-#define DSET_DEFAULT_NAME "default"
-#define DSET_CHUNKED_NAME "chunked"
-#define DSET_SIMPLE_IO_NAME "simple_io"
-#define DSET_TCONV_NAME "tconv"
-#define DSET_COMPRESS_NAME "compressed"
-#define DSET_BOGUS_NAME "bogus"
+const string FILE1("dataset.h5");
+const string DSET_DEFAULT_NAME("default");
+const string DSET_CHUNKED_NAME("chunked");
+const string DSET_SIMPLE_IO_NAME("simple_io");
+const string DSET_TCONV_NAME ("tconv");
+const string DSET_COMPRESS_NAME("compressed");
+const string DSET_BOGUS_NAME ("bogus");
-#define H5Z_FILTER_BOGUS 305
+const int H5Z_FILTER_BOGUS = 305;
// Local prototypes
static size_t bogus(unsigned int flags, size_t cd_nelmts,
@@ -601,7 +600,7 @@ test_compression(H5File& file)
TESTING("compression (partial I/O)");
const hsize_t hs_size[2] = {4, 50};
- const hssize_t hs_offset[2] = {7, 30};
+ const hsize_t hs_offset[2] = {7, 30};
for (i = 0; i < hs_size[0]; i++) {
for (j = 0; j < hs_size[1]; j++) {
points[hs_offset[0]+i][hs_offset[1]+j] = rand ();
diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp
index 020bab0..8bb0d85 100644
--- a/c++/test/h5cpputil.cpp
+++ b/c++/test/h5cpputil.cpp
@@ -93,4 +93,3 @@ void issue_fail_msg(const char* where, int line, const char* file_name)
}
}
-
diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h
index d67c459..93ba1b9 100644
--- a/c++/test/h5cpputil.h
+++ b/c++/test/h5cpputil.h
@@ -46,7 +46,7 @@ template <class Type1, class Type2>
cerr << "*** UNEXPECTED VALUE from " << where << " should be "
<< value << ", but is " << x << " at line " << line
<< " in " << file_name << endl;
- H5Eprint (stdout);
+ H5Eprint (stderr);
}
}
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index 858c74c..02cee3e 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -104,7 +104,7 @@ test_file_create(void)
// name, that skips the comparison b/w the 1st & 2nd args would
// be more appropriate, but verify_val can be used for now;
// also, more text about what is testing would be better.
- verify_val(file2.getId(), FAIL, "H5File constructor", __LINE__, __FILE__);
+ verify_val(file2.getId(), FAIL, "H5File constructor", __LINE__, __FILE__);
}
catch( FileIException E ) {} // do nothing, FAIL expected
@@ -156,10 +156,11 @@ test_file_create(void)
verify_val(parm1, F1_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
verify_val(parm2, F1_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
- int iparm1; /*file-creation parameters */
#ifdef H5_WANT_H5_V1_4_COMPAT
+ int iparm1; /*file-creation parameters */
int iparm2; /*file-creation parameters */
#else /* H5_WANT_H5_V1_4_COMPAT */
+ unsigned iparm1; /*file-creation parameters */
unsigned iparm2; /*file-creation parameters */
#endif /* H5_WANT_H5_V1_4_COMPAT */
tmpl1.getSymk( iparm1, iparm2);
@@ -210,10 +211,11 @@ test_file_create(void)
verify_val(parm1, F2_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
verify_val(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
- int iparm1; /*file-creation parameters */
#ifdef H5_WANT_H5_V1_4_COMPAT
+ int iparm1; /*file-creation parameters */
int iparm2; /*file-creation parameters */
#else /* H5_WANT_H5_V1_4_COMPAT */
+ unsigned iparm1; /*file-creation parameters */
unsigned iparm2; /*file-creation parameters */
#endif /* H5_WANT_H5_V1_4_COMPAT */
tmpl1->getSymk( iparm1, iparm2);
@@ -291,17 +293,17 @@ test_file_open(void)
/* Get the file-creation parameters */
hsize_t ublock = tmpl1.getUserblock();
verify_val(ublock, F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__);
- verify_val(ublock, F2_USERBLOCK_SIZE, "FileCreatPropList::getUserblock", __LINE__, __FILE__);
size_t parm1, parm2; /*file-creation parameters */
tmpl1.getSizes( parm1, parm2);
verify_val(parm1, F2_OFFSET_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
verify_val(parm2, F2_LENGTH_SIZE, "FileCreatPropList::getSizes", __LINE__, __FILE__);
- int iparm1; /*file-creation parameters */
#ifdef H5_WANT_H5_V1_4_COMPAT
+ int iparm1; /*file-creation parameters */
int iparm2; /*file-creation parameters */
#else /* H5_WANT_H5_V1_4_COMPAT */
+ unsigned iparm1; /*file-creation parameters */
unsigned iparm2; /*file-creation parameters */
#endif /* H5_WANT_H5_V1_4_COMPAT */
tmpl1.getSymk( iparm1, iparm2);
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index 5f62ed5..ff7e0bf 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -35,8 +35,8 @@
using namespace H5;
#endif /* !H5_NO_NAMESPACE */
-const char* TESTFILE = "th5s.h5";
-const char* DATAFILE = "th5s1.h5";
+const string TESTFILE("th5s.h5");
+const string DATAFILE("th5s1.h5");
/* 3-D dataset with fixed dimensions */
const string SPACE1_NAME("Space1");
@@ -118,20 +118,20 @@ test_h5s_basic(void)
// Get simple extent npoints of the dataspace sid1 and verify it
hssize_t n; /* Number of dataspace elements */
n = sid1.getSimpleExtentNpoints();
- verify_val(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3,
- "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
+ verify_val(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3,
+ "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Get the logical rank of dataspace sid1 and verify it
int rank; /* Logical rank of dataspace */
rank = sid1.getSimpleExtentNdims();
- verify_val(rank, SPACE1_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
+ verify_val(rank, SPACE1_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
// Retrieves dimension size of dataspace sid1 and verify it
int ndims; /* Number of dimensions */
hsize_t tdims[4]; /* Dimension array to test with */
ndims = sid1.getSimpleExtentDims( tdims );
- verify_val(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(unsigned)), 0,
- "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ verify_val(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(unsigned)), 0,
+ "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
// Create simple dataspace sid2
hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3, SPACE2_MAX4};
@@ -139,20 +139,20 @@ test_h5s_basic(void)
// Get simple extent npoints of dataspace sid2 and verify it
n = sid2.getSimpleExtentNpoints();
- verify_val(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4,
- "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
+ verify_val(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4,
+ "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Get the logical rank of dataspace sid2 and verify it
rank = sid2.getSimpleExtentNdims();
- verify_val(rank, SPACE2_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
+ verify_val(rank, SPACE2_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
// Retrieves dimension size and max size of dataspace sid2 and
// verify them
ndims = sid2.getSimpleExtentDims( tdims, tmax );
- verify_val(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(unsigned)), 0,
- "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
- verify_val(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(unsigned)), 0,
- "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ verify_val(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(unsigned)), 0,
+ "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ verify_val(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(unsigned)), 0,
+ "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
} // end of first try block
catch( DataSpaceIException error )
{
@@ -166,8 +166,8 @@ test_h5s_basic(void)
try {
DataSpace manydims_ds(H5S_MAX_RANK+1, dims3, NULL);
- // Should FAIL but didn't, so issue an error message
- issue_fail_msg("DataSpace constructor", __LINE__, __FILE__);
+ // Should FAIL but didn't, so issue an error message
+ issue_fail_msg("DataSpace constructor", __LINE__, __FILE__);
}
catch( DataSpaceIException error ) {} // do nothing, FAIL expected
@@ -180,11 +180,11 @@ test_h5s_basic(void)
*/
char testfile[512]="";
char *srcdir = getenv("srcdir");
- if (srcdir && ((strlen(srcdir) + strlen(TESTFILE) + 1) < sizeof(testfile))){
+ if (srcdir && ((strlen(srcdir) + strlen(TESTFILE.c_str()) + 1) < sizeof(testfile))){
strcpy(testfile, srcdir);
strcat(testfile, "/");
}
- strcat(testfile, TESTFILE);
+ strcat(testfile, TESTFILE.c_str());
try { // try block for testing higher dimensionality
// Create file
@@ -195,8 +195,8 @@ test_h5s_basic(void)
try {
DataSet dset1 = fid1.openDataSet( "dset" );
- // but didn't, issue an error message
- issue_fail_msg("H5File::openDataSet", __LINE__, __FILE__);
+ // but didn't, issue an error message
+ issue_fail_msg("H5File::openDataSet", __LINE__, __FILE__);
}
catch( FileIException error ) { } // do nothing, FAIL expected
} // end of try block for testing higher dimensionality
@@ -215,8 +215,7 @@ test_h5s_basic(void)
dims1[0] = 0;
try {
DataSpace wrongdim_ds (SPACE1_RANK, dims1);
- verify_val(wrongdim_ds.getId(), FAIL, "DataSpace constructor", __LINE__, __FILE__);
-
+ verify_val(wrongdim_ds.getId(), FAIL, "DataSpace constructor", __LINE__, __FILE__);
}
catch( DataSpaceIException error ) {} // do nothing; FAIL expected
@@ -225,7 +224,7 @@ test_h5s_basic(void)
// Attempts to use incorrect dimensions, should fail
try {
- sid3.setExtentSimple( SPACE1_RANK, dims1 );
+ sid3.setExtentSimple( SPACE1_RANK, dims1 );
// but didn't, issue an error message
issue_fail_msg("DataSpace::setExtentSimple", __LINE__, __FILE__);
@@ -265,11 +264,11 @@ test_h5s_scalar_write(void)
//n = H5Sget_simple_extent_npoints(sid1);
hssize_t n; /* Number of dataspace elements */
n = sid1.getSimpleExtentNpoints();
- verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
+ verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
int rank; /* Logical rank of dataspace */
rank = sid1.getSimpleExtentNdims();
- verify_val(rank, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
+ verify_val(rank, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
// Retrieves dimension size of dataspace sid1 and verify it
int ndims; /* Number of dimensions */
@@ -280,7 +279,7 @@ test_h5s_scalar_write(void)
/* Verify extent type */
H5S_class_t ext_type; /* Extent type */
ext_type = sid1.getSimpleExtentType();
- verify_val(ext_type, H5S_SCALAR, "DataSpace::getSimpleExtentType", __LINE__, __FILE__);
+ verify_val(ext_type, H5S_SCALAR, "DataSpace::getSimpleExtentType", __LINE__, __FILE__);
/* Create a dataset */
DataSet dataset = fid1.createDataSet("Dataset1", PredType::NATIVE_UINT,sid1);
@@ -327,18 +326,18 @@ test_h5s_scalar_read(void)
// Get the number of dataspace elements
hssize_t n = sid1.getSimpleExtentNpoints();
- verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
+ verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Get the logical rank of the dataspace
int ndims = sid1.getSimpleExtentNdims();
- verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
+ verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
ndims = sid1.getSimpleExtentDims(tdims);
- verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
unsigned rdata; /* Scalar data read in */
dataset.read(&rdata, PredType::NATIVE_UINT);
- verify_val(rdata, space3_data, "DataSet::read", __LINE__, __FILE__);
+ verify_val(rdata, space3_data, "DataSet::read", __LINE__, __FILE__);
} // end of try block
catch (Exception error)
{
@@ -395,15 +394,15 @@ test_h5s_compound_scalar_write(void)
// Get the number of dataspace elements
hssize_t n = sid1.getSimpleExtentNpoints();
- verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
+ verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Get the logical rank of the dataspace
int ndims = sid1.getSimpleExtentNdims();
- verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
+ verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
hsize_t tdims[4]; /* Dimension array to test with */
ndims = sid1.getSimpleExtentDims(tdims);
- verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
/* Create a dataset */
DataSet dataset = fid1.createDataSet("Dataset1", tid1, sid1);
@@ -452,14 +451,14 @@ test_h5s_compound_scalar_read(void)
// Get the number of dataspace elements
hssize_t n = sid1.getSimpleExtentNpoints();
- verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
+ verify_val(n, 1, "DataSpace::getSimpleExtentNpoints", __LINE__, __FILE__);
// Get the logical rank of the dataspace
int ndims = sid1.getSimpleExtentNdims();
- verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
+ verify_val(ndims, SPACE3_RANK, "DataSpace::getSimpleExtentNdims", __LINE__, __FILE__);
ndims = sid1.getSimpleExtentDims(tdims);
- verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
+ verify_val(ndims, 0, "DataSpace::getSimpleExtentDims", __LINE__, __FILE__);
// Get the datatype of this dataset.
CompType type(dataset);
@@ -509,7 +508,7 @@ test_h5s(void)
test_h5s_basic(); /* Test basic H5S code */
test_h5s_scalar_write(); /* Test scalar H5S writing code */
- test_h5s_scalar_read(); /* Test scalar H5S reading code */
+ test_h5s_scalar_read(); /* Test scalar H5S reading code */
test_h5s_compound_scalar_write(); /* Test compound datatype scalar H5S writing code */
test_h5s_compound_scalar_read(); /* Test compound datatype scalar H5S reading code */
} /* test_h5s() */
@@ -532,6 +531,6 @@ test_h5s(void)
void
cleanup_h5s(void)
{
- remove(DATAFILE);
+ remove(DATAFILE.c_str());
}