summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:26:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-12-29 14:26:20 (GMT)
commit427ff7da2848042f68ecfadf5a321b1d8077e9db (patch)
tree73024b1954031fbb724c2d96a485590348e5cc22 /c++/src
parent9b96fd2003ae74cca389cc4c2216b4371d6eb173 (diff)
downloadhdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.zip
hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.gz
hdf5-427ff7da2848042f68ecfadf5a321b1d8077e9db.tar.bz2
[svn-r9727] 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++/src')
-rw-r--r--c++/src/H5Alltypes.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.h1
-rw-r--r--c++/src/H5DcreatProp.cpp3
-rw-r--r--c++/src/H5DcreatProp.h2
-rw-r--r--c++/src/H5EnumType.cpp2
-rw-r--r--c++/src/H5EnumType.h2
-rw-r--r--c++/src/H5FcreatProp.h17
-rw-r--r--c++/src/H5Library.cpp10
12 files changed, 41 insertions, 36 deletions
diff --git a/c++/src/H5Alltypes.h b/c++/src/H5Alltypes.h
index 5cd9d29..17ae0d9 100644
--- a/c++/src/H5Alltypes.h
+++ b/c++/src/H5Alltypes.h
@@ -24,3 +24,5 @@
#include "H5FloatType.h"
#include "H5StrType.h"
#include "H5CompType.h"
+#include "H5ArrayType.h"
+#include "H5VarLenType.h"
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index f95c32f..738506e 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -113,7 +113,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
@@ -169,7 +169,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 );
@@ -191,7 +191,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 );
@@ -215,7 +215,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 );
@@ -325,27 +325,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 548e280..f5584a6 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -417,7 +417,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 )
@@ -443,7 +443,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 );
@@ -523,7 +523,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 01fb40d..1edaabf 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.h b/c++/src/H5DataType.h
index fe56cb1..b2f7392 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -106,6 +106,7 @@ class H5_DLLCPP DataType : public H5Object {
// Default constructor
DataType();
+ // Destructor: properly terminates access to this datatype.
virtual ~DataType();
protected:
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index ae98a79..8379b57 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -357,6 +357,7 @@ H5Z_filter_t DSetCreatPropList::getFilter(int filter_number, unsigned int &flags
///\param name - OUT: Name of the filter
///\param filter_config - OUT: Flags indicating whether filter can encode/decode
///\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[],
@@ -622,7 +623,7 @@ int DSetCreatPropList::getExternalCount() const
/// 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 )
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index 15a85e3..d1b5fb5 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/H5EnumType.cpp b/c++/src/H5EnumType.cpp
index 2872c22..2f04d1e 100644
--- a/c++/src/H5EnumType.cpp
+++ b/c++/src/H5EnumType.cpp
@@ -255,7 +255,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/H5FcreatProp.h b/c++/src/H5FcreatProp.h
index 7a11ede..aa955d5 100644
--- a/c++/src/H5FcreatProp.h
+++ b/c++/src/H5FcreatProp.h
@@ -23,6 +23,7 @@ namespace H5 {
// class for file access properties
class H5_DLLCPP FileCreatPropList : public PropList {
public:
+ // Default file creation property list.
static const FileCreatPropList DEFAULT;
// Retrieves version information for various parts of a file.
@@ -34,27 +35,27 @@ class H5_DLLCPP FileCreatPropList : public PropList {
// Gets the size of a user block in this file creation property list.
hsize_t getUserblock() const;
- // Sets file size-of addresses and sizes.
- void setSizes( size_t sizeof_addr = 4, size_t sizeof_size = 4 ) const;
-
// Retrieves the size-of address and size quantities stored in a
// file according to this file creation property list.
void getSizes( size_t& sizeof_addr, size_t& sizeof_size ) const;
- // Sets the size of parameters used to control the symbol table nodes.
- void setSymk( unsigned int_nodes_k, unsigned leaf_nodes_k ) const;
+ // Sets file size-of addresses and sizes.
+ void setSizes( size_t sizeof_addr = 4, size_t sizeof_size = 4 ) const;
// Retrieves the size of the symbol table B-tree 1/2 rank and the
// symbol table leaf node 1/2 size.
void getSymk( unsigned& int_nodes_k, unsigned& leaf_nodes_k ) const;
- // Sets the size of parameter used to control the B-trees for
- // indexing chunked datasets.
- void setIstorek( unsigned ik ) const;
+ // Sets the size of parameters used to control the symbol table nodes.
+ void setSymk( unsigned int_nodes_k, unsigned leaf_nodes_k ) const;
// Returns the 1/2 rank of an indexed storage B-tree.
unsigned getIstorek() const;
+ // Sets the size of parameter used to control the B-trees for
+ // indexing chunked datasets.
+ void setIstorek( unsigned ik ) const;
+
// Creates a file create property list.
FileCreatPropList();
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index c8af186..ff9a7d1 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -14,7 +14,7 @@
#include <string>
-#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
+#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
#include "H5Include.h"
#include "H5Exception.h"
#include "H5Library.h"
@@ -60,7 +60,7 @@ void H5Library::close()
//--------------------------------------------------------------------------
// Function: H5Library::dontAtExit
-///\brief Instructs library not to install \c atexit cleanup routine.
+///\brief Instructs library not to install \c atexit cleanup routine
///\exception H5::LibraryIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -95,9 +95,9 @@ void H5Library::getLibVersion( unsigned& majnum, unsigned& minnum, unsigned& rel
// Function: H5Library::checkVersion
///\brief Verifies that the arguments match the version numbers
/// compiled into the library
-///\param majnum - OUT: Major version of the library
-///\param minnum - OUT: Minor version of the library
-///\param relnum - OUT: Release number of the library
+///\param majnum - IN: Major version of the library
+///\param minnum - IN: Minor version of the library
+///\param relnum - IN: Release number of the library
///\exception H5::LibraryIException
///\par Description
/// For information about library version, please refer to