summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2014-04-09 02:36:48 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2014-04-09 02:36:48 (GMT)
commit385b4b40ae69ca45be476472ce1c8e5391a63caa (patch)
treec9c6d4fb5a00fd2a6ed7066b73313fb6a580b29b /c++/src
parentaaf5c1d4003f6825b6df37390bd5b88053be0f31 (diff)
downloadhdf5-385b4b40ae69ca45be476472ce1c8e5391a63caa.zip
hdf5-385b4b40ae69ca45be476472ce1c8e5391a63caa.tar.gz
hdf5-385b4b40ae69ca45be476472ce1c8e5391a63caa.tar.bz2
[svn-r24991] Purpose: Fixed HDFFV-3384
Description: - Added const to const arguments - Fixed miscellaneous comments Platforms tested: Linux/ppc64 (ostrich) Linux/32 2.6 (jam) SunOS 5.11 (emu)
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5CommonFG.cpp8
-rw-r--r--c++/src/H5CommonFG.h4
-rw-r--r--c++/src/H5DataSet.cpp6
-rw-r--r--c++/src/H5DataSet.h6
-rw-r--r--c++/src/H5DataSpace.cpp2
-rw-r--r--c++/src/H5DataSpace.h2
-rw-r--r--c++/src/H5DataType.cpp4
-rw-r--r--c++/src/H5DataType.h4
-rw-r--r--c++/src/H5DcreatProp.cpp8
-rw-r--r--c++/src/H5DcreatProp.h2
-rw-r--r--c++/src/H5DxferProp.h2
-rw-r--r--c++/src/H5FaccProp.cpp4
-rw-r--r--c++/src/H5FaccProp.h4
-rw-r--r--c++/src/H5File.cpp2
-rw-r--r--c++/src/H5File.h2
-rw-r--r--c++/src/H5PredType.cpp4
-rw-r--r--c++/src/H5PredType.h4
17 files changed, 33 insertions, 35 deletions
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 88cf989..ee5c368 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -469,7 +469,7 @@ H5std_string CommonFG::getLinkval( const H5std_string& name, size_t size ) const
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
+void CommonFG::mount(const char* name, const H5File& child, const PropList& plist ) const
{
// Obtain identifiers for C API
hid_t plist_id = plist.getId();
@@ -490,7 +490,7 @@ void CommonFG::mount( const char* name, H5File& child, PropList& plist ) const
/// \c H5std_string for \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void CommonFG::mount( const H5std_string& name, H5File& child, PropList& plist ) const
+void CommonFG::mount(const H5std_string& name, const H5File& child, const PropList& plist) const
{
mount( name.c_str(), child, plist );
}
@@ -1082,7 +1082,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
/// It differs from the above function because it also provides
/// the returned object type in text (char*)
///\param idx - IN: Transient index of the object
-///\param type_name - IN: Object type in text
+///\param type_name - OUT: Object type in text
///\return Object type
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - May, 2010
@@ -1108,7 +1108,7 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
/// It differs from the above function because it also provides
/// the returned object type in text (H5std_string&)
///\param idx - IN: Transient index of the object
-///\param type_name - IN: Object type in text
+///\param type_name - OUT: Object type in text
///\return Object type
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - January, 2003
diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h
index 8fc0b15..9275342 100644
--- a/c++/src/H5CommonFG.h
+++ b/c++/src/H5CommonFG.h
@@ -100,8 +100,8 @@ class H5_DLLCPP CommonFG {
void unlink(const H5std_string& name) const;
// Mounts the file 'child' onto this location.
- void mount(const char* name, H5File& child, PropList& plist) const;
- void mount(const H5std_string& name, H5File& child, PropList& plist) const;
+ void mount(const char* name, const H5File& child, const PropList& plist) const;
+ void mount(const H5std_string& name, const H5File& child, const PropList& plist) const;
// Unmounts the file named 'name' from this parent location.
void unmount(const char* name) const;
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 699f982..bfb8fd7 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -294,7 +294,7 @@ void DataSet::getSpaceStatus(H5D_space_status_t& status) const
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
+hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space ) const
{
// Obtain identifiers for C API
hid_t type_id = type.getId();
@@ -577,7 +577,7 @@ void DataSet::extend( const hsize_t* size ) const
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
+void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space)
{
hid_t fill_type_id = fill_type.getId();
hid_t buf_type_id = buf_type.getId();
@@ -600,7 +600,7 @@ void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataT
///\exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
+void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space)
{
hid_t buf_type_id = buf_type.getId();
hid_t space_id = space.getId();
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index 92c651c..d5b3d92 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -37,9 +37,9 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
void extend( const hsize_t* size ) const;
// Fills a selection in memory with a value
- void fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space);
+ void fillMemBuf(const void *fill, const DataType& fill_type, void *buf, const DataType& buf_type, const DataSpace& space);
// Fills a selection in memory with zero
- void fillMemBuf(void *buf, DataType& buf_type, DataSpace& space);
+ void fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& space);
// Gets the creation property list of this dataset.
DSetCreatPropList getCreatePlist() const;
@@ -60,7 +60,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
virtual size_t getInMemDataSize() const;
// Returns the number of bytes required to store VL data.
- hsize_t getVlenBufSize( DataType& type, DataSpace& space ) const;
+ hsize_t getVlenBufSize(const DataType& type, const DataSpace& space ) const;
// Reclaims VL datatype memory buffers.
static void vlenReclaim(const DataType& type, const DataSpace& space, const DSetMemXferPropList& xfer_plist, void* buf );
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 059c812..4ad73ab 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -279,7 +279,7 @@ H5S_class_t DataSpace::getSimpleExtentType () const
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataSpace::extentCopy ( DataSpace& dest_space ) const
+void DataSpace::extentCopy (const DataSpace& dest_space) const
{
hid_t dest_space_id = dest_space.getId();
herr_t ret_value = H5Sextent_copy( dest_space_id, id );
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index 05ee70c..eab6218 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -43,7 +43,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
void copy(const DataSpace& like_space);
// Copies the extent of this dataspace.
- void extentCopy( DataSpace& dest_space ) const;
+ void extentCopy(const DataSpace& dest_space) const;
// Gets the bounding box containing the current selection.
void getSelectBounds( hsize_t* start, hsize_t* end ) const;
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 4c3cc62..e29c3aa 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -264,7 +264,7 @@ void DataType::p_commit(hid_t loc_id, const char* name)
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jan, 2007
//--------------------------------------------------------------------------
-void DataType::commit(H5Location& loc, const char* name)
+void DataType::commit(const H5Location& loc, const char* name)
{
p_commit(loc.getId(), name);
}
@@ -276,7 +276,7 @@ void DataType::commit(H5Location& loc, const char* name)
/// argument \a name.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void DataType::commit(H5Location& loc, const H5std_string& name)
+void DataType::commit(const H5Location& loc, const H5std_string& name)
{
p_commit(loc.getId(), name.c_str());
}
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index c5c8a7d..ab54ba6 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -54,8 +54,8 @@ class H5_DLLCPP DataType : public H5Object {
// Commits a transient datatype to a file; this datatype becomes
// a named datatype which can be accessed from the location.
- void commit(H5Location& loc, const char* name);
- void commit(H5Location& loc, const H5std_string& name);
+ void commit(const H5Location& loc, const char* name);
+ void commit(const H5Location& loc, const H5std_string& name);
// Determines whether this datatype is a named datatype or
// a transient datatype.
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index ece435c..4d46a7d 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -349,7 +349,7 @@ int DSetCreatPropList::getNfilters() const
///\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 namelen - IN: Length of \a name
///\param name - OUT: Name of the filter
///\param filter_config - OUT: Flags indicating whether filter can encode/decode
///\return Filter id
@@ -357,7 +357,7 @@ int DSetCreatPropList::getNfilters() const
///\par Description
/// Failure occurs when \a filter_number is out of range.
//--------------------------------------------------------------------------
-H5Z_filter_t DSetCreatPropList::getFilter(int filter_number,
+H5Z_filter_t DSetCreatPropList::getFilter(unsigned int filter_number,
unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values,
size_t namelen, char name[], unsigned int& filter_config) const
{
@@ -635,8 +635,8 @@ int DSetCreatPropList::getExternalCount() const
///\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 name - OUT: Name of the external file
+///\param offset - OUT: Location to return an offset value
///\param size - OUT: Location to return the size of the external file data
///\exception H5::PropListIException
///\par Description
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index 7434b9b..8794971 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -68,7 +68,7 @@ class H5_DLLCPP DSetCreatPropList : public PropList {
void setFillValue( const DataType& fvalue_type, const void* value ) const;
// Returns information about a filter in a pipeline.
- H5Z_filter_t getFilter(int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
+ H5Z_filter_t getFilter(unsigned int filter_number, unsigned int& flags, size_t& cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
// Returns information about a filter in a pipeline given the filter id.
void getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts, unsigned int* cd_values, size_t namelen, char name[], unsigned int &filter_config) const;
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index 8149b8e..f93676e 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -54,8 +54,6 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
// Gets data transform expression.
ssize_t getDataTransform(char* exp, size_t buf_size=0) const;
H5std_string getDataTransform() const;
- //H5std_string getDataTransform(const size_t buf_size=0) const;
- // this will collide with the first one when exp=NULL
// Sets the dataset transfer property list status to TRUE or FALSE.
void setPreserve( bool status ) const;
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index 4fb3836..ddd0708 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -264,7 +264,7 @@ FileAccPropList FileAccPropList::getFamily(hsize_t& memb_size) const
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFaplSplit
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
+void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
{
hid_t meta_pid = meta_plist.getId();
hid_t raw_pid = raw_plist.getId();
@@ -287,7 +287,7 @@ void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& ra
///\exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
-void FileAccPropList::setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
+void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
{
setSplit( meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
}
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index 5dd108f..5b41ecd 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -62,9 +62,9 @@ class H5_DLLCPP FileAccPropList : public PropList {
FileAccPropList getFamily(hsize_t& memb_size) const;
// Emulates the old split file driver,
- void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
+ void setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist,
const char* meta_ext = ".meta", const char* raw_ext = ".raw" ) const;
- void setSplit( FileAccPropList& meta_plist, FileAccPropList& raw_plist,
+ void setSplit(const FileAccPropList& meta_plist, const FileAccPropList& raw_plist,
const H5std_string& meta_ext, const H5std_string& raw_ext ) const;
// Sets the maximum size of the data sieve buffer.
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 615c1cb..c3a7e71 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -442,7 +442,7 @@ void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
/// closed and reopened or opened during a subsequent session.
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
+void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
{
hid_t fapl_id = fapl.getId();
herr_t ret_value = H5Fget_vfd_handle(id, fapl_id, file_handle);
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index 694d688..cd7563c 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -67,7 +67,7 @@ class H5_DLLCPP H5File : public H5Location, public CommonFG {
void getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const;
// Returns the pointer to the file handle of the low-level file driver.
- void getVFDHandle(FileAccPropList& fapl, void **file_handle) const;
+ void getVFDHandle(const FileAccPropList& fapl, void **file_handle) const;
void getVFDHandle(void **file_handle) const;
// Determines if a file, specified by its name, is in HDF5 format
diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp
index 6dbee98..727a09d 100644
--- a/c++/src/H5PredType.cpp
+++ b/c++/src/H5PredType.cpp
@@ -272,12 +272,12 @@ PredType& PredType::operator=( const PredType& rhs )
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// These dummy functions do not inherit from DataType - they'll
// throw an DataTypeIException if invoked.
-void PredType::commit(H5Location& loc, const char* name )
+void PredType::commit(const H5Location& loc, const char* name )
{
throw DataTypeIException("PredType::commit", "Error: Attempted to commit a predefined datatype. Invalid operation!" );
}
-void PredType::commit(H5Location& loc, const H5std_string& name )
+void PredType::commit(const H5Location& loc, const H5std_string& name )
{
commit( loc, name.c_str());
}
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
index a8ec0b8..981a29c 100644
--- a/c++/src/H5PredType.h
+++ b/c++/src/H5PredType.h
@@ -233,11 +233,11 @@ class H5_DLLCPP PredType : public AtomType {
/*! \brief This dummy function do not inherit from DataType - it will
throw a DataTypeIException if invoked.
*/
- void commit(H5Location& loc, const H5std_string& name );
+ void commit(const H5Location& loc, const H5std_string& name );
/*! \brief This dummy function do not inherit from DataType - it will
throw a DataTypeIException if invoked.
*/
- void commit(H5Location& loc, const char* name );
+ void commit(const H5Location& loc, const char* name );
/*! \brief This dummy function do not inherit from DataType - it will
throw a DataTypeIException if invoked.
*/