summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorlrknox <lrknox>2017-03-22 17:01:22 (GMT)
committerlrknox <lrknox>2017-03-22 17:01:22 (GMT)
commitd37561605bda978ef8e5de03997dca4e493e213b (patch)
treed64fe8f0c74ccc063323dfb3ae3fdb24fac55380 /c++
parent36a30ecfd288afdf8ea62a858644e622ce72fd58 (diff)
parentd605ce46b37a1ca33d1e474fda78009e9bdabb18 (diff)
downloadhdf5-d37561605bda978ef8e5de03997dca4e493e213b.zip
hdf5-d37561605bda978ef8e5de03997dca4e493e213b.tar.gz
hdf5-d37561605bda978ef8e5de03997dca4e493e213b.tar.bz2
Merge branch 'hdf5_1_10' of https://bitbucket.hdfgroup.org/scm/~lrknox/hdf5_lrk into hdf5_1_10
Diffstat (limited to 'c++')
-rw-r--r--c++/src/H5AbstractDs.h6
-rw-r--r--c++/src/H5ArrayType.cpp8
-rw-r--r--c++/src/H5ArrayType.h6
-rw-r--r--c++/src/H5AtomType.h6
-rw-r--r--c++/src/H5Attribute.h5
-rw-r--r--c++/src/H5CommonFG.cpp2
-rw-r--r--c++/src/H5CommonFG.h6
-rw-r--r--c++/src/H5CompType.cpp6
-rw-r--r--c++/src/H5CompType.h6
-rw-r--r--c++/src/H5DataSet.h5
-rw-r--r--c++/src/H5DataSpace.h6
-rw-r--r--c++/src/H5DataType.cpp62
-rw-r--r--c++/src/H5DataType.h6
-rw-r--r--c++/src/H5DcreatProp.cpp16
-rw-r--r--c++/src/H5DcreatProp.h6
-rw-r--r--c++/src/H5DxferProp.h6
-rw-r--r--c++/src/H5EnumType.cpp6
-rw-r--r--c++/src/H5EnumType.h6
-rw-r--r--c++/src/H5Exception.h4
-rw-r--r--c++/src/H5FaccProp.h5
-rw-r--r--c++/src/H5FcreatProp.cpp72
-rw-r--r--c++/src/H5FcreatProp.h16
-rw-r--r--c++/src/H5File.cpp143
-rw-r--r--c++/src/H5File.h6
-rw-r--r--c++/src/H5FloatType.cpp6
-rw-r--r--c++/src/H5FloatType.h6
-rw-r--r--c++/src/H5Group.cpp48
-rw-r--r--c++/src/H5Group.h6
-rw-r--r--c++/src/H5IdComponent.cpp10
-rw-r--r--c++/src/H5IdComponent.h2
-rw-r--r--c++/src/H5IntType.cpp6
-rw-r--r--c++/src/H5IntType.h6
-rw-r--r--c++/src/H5LaccProp.h5
-rw-r--r--c++/src/H5Library.h5
-rw-r--r--c++/src/H5Location.cpp19
-rw-r--r--c++/src/H5Location.h5
-rw-r--r--c++/src/H5Object.cpp5
-rw-r--r--c++/src/H5Object.h4
-rw-r--r--c++/src/H5OcreatProp.cpp9
-rw-r--r--c++/src/H5OcreatProp.h5
-rw-r--r--c++/src/H5PredType.h5
-rw-r--r--c++/src/H5PropList.cpp61
-rw-r--r--c++/src/H5PropList.h12
-rw-r--r--c++/src/H5StrType.cpp6
-rw-r--r--c++/src/H5StrType.h6
-rw-r--r--c++/src/H5VarLenType.cpp6
-rw-r--r--c++/src/H5VarLenType.h6
-rw-r--r--c++/test/tfile.cpp54
-rw-r--r--c++/test/titerate.cpp6
-rw-r--r--c++/test/trefer.cpp24
-rw-r--r--c++/test/ttypes.cpp3
-rw-r--r--c++/test/tvlstr.cpp41
52 files changed, 473 insertions, 320 deletions
diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h
index eaa9d14..f0859c8 100644
--- a/c++/src/H5AbstractDs.h
+++ b/c++/src/H5AbstractDs.h
@@ -91,6 +91,8 @@ class H5_DLLCPP AbstractDs {
private:
// This member function is implemented by DataSet and Attribute - pure virtual.
virtual hid_t p_get_type() const = 0;
-};
-}
+
+}; // end of AbstractDs
+} // namespace H5
+
#endif // __AbstractDs_H
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index 3cdcc0a..c8bd0fc 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -77,11 +77,12 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
// Function: ArrayType overloaded constructor
///\brief Creates an ArrayType instance by opening an HDF5 array datatype
/// given its name, provided as a C character string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Array type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openArrayType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -94,12 +95,13 @@ ArrayType::ArrayType(const H5Location& loc, const char *dtype_name) : DataType()
//--------------------------------------------------------------------------
// Function: ArrayType overloaded constructor
///\brief Creates an ArrayType instance by opening an HDF5 array datatype
-/// given its name, provided as an \c H5std_string.
+/// given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Array type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openArrayType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h
index 15b6bb3..dd9db51 100644
--- a/c++/src/H5ArrayType.h
+++ b/c++/src/H5ArrayType.h
@@ -60,6 +60,8 @@ class H5_DLLCPP ArrayType : public DataType {
// Default constructor
ArrayType();
-};
-}
+
+}; // end of ArrayType
+} // namespace H5
+
#endif // __H5ArrayType_H
diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h
index a1e0262..f4c70fd 100644
--- a/c++/src/H5AtomType.h
+++ b/c++/src/H5AtomType.h
@@ -78,6 +78,8 @@ class H5_DLLCPP AtomType : public DataType {
// Constructor that takes an existing id
AtomType(const hid_t existing_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+
+}; // end of AtomType
+} // namespace H5
+
#endif // __H5AtomType_H
diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h
index 0243cd9..6d6df2c 100644
--- a/c++/src/H5Attribute.h
+++ b/c++/src/H5Attribute.h
@@ -101,6 +101,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
// Friend function to set Attribute id. For library use only.
friend void f_Attribute_setId(Attribute* attr, hid_t new_id);
-};
-}
+}; // end of Attribute
+} // namespace H5
+
#endif // __H5Attribute_H
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index 5c01055..f3390aa 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -381,4 +381,4 @@ void f_DataSet_setId(DataSet* dset, hid_t new_id)
#endif // DOXYGEN_SHOULD_SKIP_THIS
-}
+} // end namespace
diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h
index 588d49a..0c7b799 100644
--- a/c++/src/H5CommonFG.h
+++ b/c++/src/H5CommonFG.h
@@ -84,10 +84,8 @@ class H5_DLLCPP CommonFG {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-}; // end of CommonFG declaration
+}; // end of CommonFG
+} // namespace H5
-#ifndef H5_NO_NAMESPACE
-}
-#endif
#endif // __CommonFG_H
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index 037527f..7db2cfe 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -91,11 +91,12 @@ CompType::CompType(const DataSet& dataset) : DataType()
// Function: CompType overloaded constructor
///\brief Creates an CompType instance by opening an HDF5 compound
/// given its name, provided as a C character string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Compound type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openCompType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -109,11 +110,12 @@ CompType::CompType(const H5Location& loc, const char *dtype_name) : DataType()
// Function: CompType overloaded constructor
///\brief Creates an CompType instance by opening an HDF5 compound
/// datatype given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Compound type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openCompType(const H5Location&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h
index 222044d..042b59f 100644
--- a/c++/src/H5CompType.h
+++ b/c++/src/H5CompType.h
@@ -115,6 +115,8 @@ class H5_DLLCPP CompType : public DataType {
// Contains common code that is used by the member functions
// getMemberXxxType
hid_t p_get_member_type(unsigned member_num) const;
-};
-}
+
+}; // end of CompType
+} // namespace H5
+
#endif // __H5CompType_H
diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h
index 93f9782..f9e29ff 100644
--- a/c++/src/H5DataSet.h
+++ b/c++/src/H5DataSet.h
@@ -130,6 +130,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// Friend function to set DataSet id. For library use only.
friend void f_DataSet_setId(DataSet* dset, hid_t new_id);
-};
-}
+}; // end of DataSet
+} // namespace H5
+
#endif // __H5DataSet_H
diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h
index 969e146..281e865 100644
--- a/c++/src/H5DataSpace.h
+++ b/c++/src/H5DataSpace.h
@@ -149,6 +149,8 @@ class H5_DLLCPP DataSpace : public IdComponent {
friend void f_DataSpace_setId(DataSpace *dspace, hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+
+}; // end of DataSpace
+} // namespace H5
+
#endif // __H5DataSpace_H
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 1cfc259..2795485 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -109,13 +109,13 @@ DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type,
//--------------------------------------------------------------------------
// Function: DataType overload constructor - dereference
-///\brief Given a reference, ref, to an hdf5 group, creates a
-/// DataType object
-///\param attr - IN: Specifying location where the referenced object is in
-///\param ref - IN: Reference pointer
-///\param ref_type - IN: Reference type - default to H5R_OBJECT
-///\param plist - IN: Property list - default to PropList::DEFAULT
-///\exception H5::ReferenceException
+// brief Given a reference, ref, to an hdf5 group, creates a
+// DataType object
+// param attr - IN: Specifying location where the referenced object is in
+// param ref - IN: Reference pointer
+// param ref_type - IN: Reference type - default to H5R_OBJECT
+// param plist - IN: Property list - default to PropList::DEFAULT
+// exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// Jul, 2008
@@ -162,11 +162,12 @@ DataType::DataType(const PredType& pred_type) : H5Object()
// Function: DataType overloaded constructor
///\brief Creates a DataType instance by opening an HDF5 datatype given
/// its name as a char*.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Datatype name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openDataType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -180,11 +181,12 @@ DataType::DataType(const H5Location& loc, const char *dtype_name) : H5Object()
// Function: DataType overloaded constructor
///\brief Creates a DataType instance by opening an HDF5 datatype given
/// its name as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Datatype name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openDataType(const H5std_string&) to
// improve usability.
// -BMR, Dec 2016
@@ -300,27 +302,6 @@ bool DataType::operator==(const DataType& compared_type) const
}
//--------------------------------------------------------------------------
-// Function: DataType::p_opentype (private)
-///\brief Opens an HDF5 datatype given its name
-///\param dtype_name - IN: Datatype name
-///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
-// Description
-// This function was introduced in 1.10.1 to be used by the new
-// XxxType constructors that were introduced to replace the
-// existing functions CommonFG::openXxxType(), which is awkward
-// to use. -BMR, Dec 2016
-//--------------------------------------------------------------------------
-hid_t DataType::p_opentype(const H5Location& loc, const char *dtype_name) const
-{
- // Call C function to open the named datatype at this location
- hid_t ret_value = H5Topen2(loc.getId(), dtype_name, H5P_DEFAULT);
- if (ret_value < 0)
- throw DataTypeIException("DataType constructor", "H5Topen2 failed");
- return(ret_value);
-}
-
-//--------------------------------------------------------------------------
// Function: DataType::p_commit (private)
//\brief Commits a transient datatype to a file, creating a new
// named datatype
@@ -787,6 +768,26 @@ hid_t DataType::getId() const
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
+// Function: DataType::p_opentype (private)
+///\brief Opens an HDF5 datatype given its name
+///\param loc - IN: Location of the type
+///\param dtype_name - IN: Datatype name
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - Dec 2016
+// Description
+// This function was introduced in 1.10.1 to be used by the new
+// XxxType constructors that open a datatype. -BMR, Dec 2016
+//--------------------------------------------------------------------------
+hid_t DataType::p_opentype(const H5Location& loc, const char *dtype_name) const
+{
+ // Call C function to open the named datatype at this location
+ hid_t ret_value = H5Topen2(loc.getId(), dtype_name, H5P_DEFAULT);
+ if (ret_value < 0)
+ throw DataTypeIException("DataType constructor", "H5Topen2 failed");
+ return(ret_value);
+}
+
+//--------------------------------------------------------------------------
// Function: DataType::p_setId
///\brief Sets the identifier of this object to a new value.
///
@@ -861,4 +862,5 @@ DataType::~DataType()
cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl;
}
}
+
} // end namespace
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index 6501bb9..c2ea2a3 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -155,6 +155,8 @@ class H5_DLLCPP DataType : public H5Object {
friend void f_DataType_setId(DataType* dtype, hid_t new_id);
void p_commit(hid_t loc_id, const char* name);
-};
-}
+
+}; // end of DataType
+} // namespace H5
+
#endif // __H5DataType_H
diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp
index e1be3c4..966ca16 100644
--- a/c++/src/H5DcreatProp.cpp
+++ b/c++/src/H5DcreatProp.cpp
@@ -744,13 +744,13 @@ void DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char* name,
// Function: DSetCreatPropList::setVirtual
///\brief Maps elements of a virtual dataset to elements of the source
/// dataset.
-///\param vspace - IN: Dataspace the virtual dataset, possibly an
+///\param vspace - IN: Dataspace the virtual dataset, possibly an
/// unlimited selection
-///\param src_fname - IN: Name of the HDF5 file where the source dataset
+///\param src_fname - IN: Name of the HDF5 file where the source dataset
/// is located (\a char*)
-///\param src_fname - IN: Path to the dataset in the file specified by
+///\param src_dsname - IN: Path to the dataset in the file specified by
/// \a src_file_name (\a char*)
-///\param sspace - IN: Dataspace with a selection applied, possibly
+///\param sspace - IN: Dataspace with a selection applied, possibly
/// an unlimited selection
///\exception H5::PropListIException
///\par Description
@@ -771,13 +771,13 @@ void DSetCreatPropList::setVirtual(const DataSpace& vspace, const char *src_fnam
// Function: DSetCreatPropList::setVirtual
///\brief Maps elements of a virtual dataset to elements of the source
/// dataset.
-///\param vspace - IN: Dataspace the virtual dataset, possibly an
+///\param vspace - IN: Dataspace the virtual dataset, possibly an
/// unlimited selection
-///\param src_fname - IN: Name of the HDF5 file where the source dataset
+///\param src_fname - IN: Name of the HDF5 file where the source dataset
/// is located (\a H5std_string)
-///\param src_fname - IN: Path to the dataset in the file specified by
+///\param src_dsname - IN: Path to the dataset in the file specified by
/// \a src_file_name (\a H5std_string)
-///\param sspace - IN: Dataspace with a selection applied, possibly
+///\param sspace - IN: Dataspace with a selection applied, possibly
/// an unlimited selection
///\exception H5::PropListIException
///\par Description
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index 5371e03..f0475eb 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -146,6 +146,8 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
static DSetCreatPropList* getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+
+}; // end of DSetCreatPropList
+} // namespace H5
+
#endif // __H5DSCreatPropList_H
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index f1c363f..39d3ba8 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -127,6 +127,8 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
static DSetMemXferPropList* getConstant();
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+
+}; // end of DSetMemXferPropList
+} // namespace H5
+
#endif // __H5DSetMemXferPropList_H
diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp
index 49f60e6..9072aab 100644
--- a/c++/src/H5EnumType.cpp
+++ b/c++/src/H5EnumType.cpp
@@ -114,10 +114,11 @@ EnumType::EnumType(const IntType& data_type) : DataType()
///\brief Creates an EnumType instance by opening an HDF5 enum datatype
/// given its name, provided as a C character string.
///\param dtype_name - IN: Enum datatype name
+///\param loc - IN: Location of the type
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openEnumType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -131,11 +132,12 @@ EnumType::EnumType(const H5Location& loc, const char *dtype_name) : DataType()
// Function: EnumType overloaded constructor
///\brief Creates an EnumType instance by opening an HDF5 enum datatype
/// given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Enum datatype name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openEnumType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h
index 2fbe2cd..cd93eb5 100644
--- a/c++/src/H5EnumType.h
+++ b/c++/src/H5EnumType.h
@@ -78,6 +78,8 @@ class H5_DLLCPP EnumType : public DataType {
EnumType(const EnumType& original);
virtual ~EnumType();
-};
-}
+
+}; // end of EnumType
+} // namespace H5
+
#endif // __H5EnumType_H
diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h
index 1f85711..2e68cf0 100644
--- a/c++/src/H5Exception.h
+++ b/c++/src/H5Exception.h
@@ -174,8 +174,8 @@ class H5_DLLCPP IdComponentException : public Exception {
IdComponentException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG);
IdComponentException();
virtual ~IdComponentException() throw();
-};
-}
+}; // end of IdComponentException
+} // namespace H5
#endif // __H5Exception_H
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index 586dcf8..8e488e5 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -162,6 +162,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of FileAccPropList
+} // namespace H5
+
#endif // __H5FileAccPropList_H
diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp
index ea69049..b3e6b7b 100644
--- a/c++/src/H5FcreatProp.cpp
+++ b/c++/src/H5FcreatProp.cpp
@@ -294,12 +294,12 @@ unsigned FileCreatPropList::getIstorek() const
return(ik);
}
-#ifndef H5_NO_DEPRECATED_SYMBOLS
//--------------------------------------------------------------------------
-// Function: FileCreatPropList::setFileSpace
+// Function: FileCreatPropList::setFileSpaceStrategy
///\brief Sets the strategy and the threshold value that the library
/// will employ in managing file space.
-///\param strategy - IN: Strategy for file space management
+///\param strategy - IN: Strategy for file space management
+///\param persist - IN: Whether to persist free-space
///\param threshold - IN: Free-space section threshold. The library
/// default is 1, which is to track all free-space sections.
///\exception H5::PropListIException
@@ -308,64 +308,76 @@ unsigned FileCreatPropList::getIstorek() const
/// changed and the existing strategy will be retained.
/// If the given threshold value is zero, the property will not be
/// changed and the existing threshold will be retained.
-/// Valid values of \a libver_low are as follows:
-/// \li \c H5F_FILE_SPACE_ALL (Default)
-/// \li \c H5F_FILE_SPACE_ALL_PERSIST
-/// \li \c H5F_FILE_SPACE_AGGR_VFD
-/// \li \c H5F_FILE_SPACE_VFD
/// For information, please see the C layer Reference Manual at:
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetFileSpace
// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
-void FileCreatPropList::setFileSpace(H5F_file_space_type_t strategy, hsize_t threshold) const
+void FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t persist, hsize_t threshold) const
{
- herr_t ret_value = H5Pset_file_space(id, strategy, threshold);
+ herr_t ret_value = H5Pset_file_space_strategy(id, strategy, persist, threshold);
if (ret_value < 0)
{
- throw PropListIException("FileCreatPropList::setFileSpace",
- "H5Pset_file_space failed");
+ throw PropListIException("FileCreatPropList::setFileSpaceStrategy",
+ "H5Pset_file_space_strategy failed");
}
}
//--------------------------------------------------------------------------
// Function: FileCreatPropList::getFileSpaceStrategy
-///\brief Returns the strategy that the library uses in managing file space.
-///\return The strategy value
+///\brief Retrieves the strategy, persist, and threshold that the library
+/// uses in managing file space.
+///\param strategy - OUT: Strategy for file space management
+///\param persist - OUT: Whether to persist free-space
+///\param threshold - OUT: Free-space section threshold
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
-H5F_file_space_type_t FileCreatPropList::getFileSpaceStrategy() const
+void FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t& strategy, hbool_t& persist, hsize_t& threshold) const
{
- H5F_file_space_type_t strategy = H5F_FILE_SPACE_ALL;
- herr_t ret_value = H5Pget_file_space(id, &strategy, NULL);
+ herr_t ret_value = H5Pget_file_space_strategy(id, &strategy, &persist, &threshold);
if (ret_value < 0)
{
throw PropListIException("FileCreatPropList::getFileSpaceStrategy",
- "H5Pget_file_space for strategy failed");
+ "H5Pget_file_space_strategy failed");
}
- return(strategy);
}
//--------------------------------------------------------------------------
-// Function: FileCreatPropList::getFileSpaceThreshold
-///\brief Returns the threshold value that the library uses in tracking
-/// free space sections.
-///\return The threshold value
+// Function: FileCreatPropList::setFileSpacePagesize
+///\brief Sets the file space page size for paged aggregation.
+///\param fsp_psize - IN: Filespace's page size
///\exception H5::PropListIException
// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
-hsize_t FileCreatPropList::getFileSpaceThreshold() const
+void FileCreatPropList::setFileSpacePagesize(hsize_t fsp_psize) const
{
- hsize_t threshold = 0;
- herr_t ret_value = H5Pget_file_space(id, NULL, &threshold);
+ herr_t ret_value = H5Pset_file_space_page_size(id, fsp_psize);
if (ret_value < 0)
{
- throw PropListIException("FileCreatPropList::getFileSpaceThreshold",
- "H5Pget_file_space for threshold failed");
+ throw PropListIException("FileCreatPropList::setFileSpacePagesize",
+ "H5Pset_file_space_page_size failed");
}
- return(threshold);
}
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+//--------------------------------------------------------------------------
+// Function: FileCreatPropList::getFileSpacePagesize
+///\brief Returns the file space page size for aggregating small
+/// metadata or raw data.
+///\return File space page size
+///\exception H5::PropListIException
+// Programmer Binh-Minh Ribler - Feb, 2017
+//--------------------------------------------------------------------------
+hsize_t FileCreatPropList::getFileSpacePagesize() const
+{
+ hsize_t fsp_psize = 0;
+ herr_t ret_value = H5Pget_file_space_page_size(id, &fsp_psize);
+ if (ret_value < 0)
+ {
+ throw PropListIException("FileCreatPropList::getFileSpacePagesize",
+ "H5Pget_file_space_page_size failed");
+ }
+ return(fsp_psize);
+}
//--------------------------------------------------------------------------
// Function: FileCreatPropList destructor
diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h
index 1d999cb..6beac02 100644
--- a/c++/src/H5FcreatProp.h
+++ b/c++/src/H5FcreatProp.h
@@ -65,18 +65,19 @@ class H5_DLLCPP FileCreatPropList : public PropList {
// indexing chunked datasets.
void setIstorek(unsigned ik) const;
-#ifndef H5_NO_DEPRECATED_SYMBOLS
// Sets the strategy and the threshold value that the library will
// will employ in managing file space.
- void setFileSpace(H5F_file_space_type_t strategy, hsize_t threshold) const;
+ void setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t persist, hsize_t threshold) const;
// Returns the strategy that the library uses in managing file space.
- H5F_file_space_type_t getFileSpaceStrategy() const;
+ void getFileSpaceStrategy(H5F_fspace_strategy_t& strategy, hbool_t& persist, hsize_t& threshold) const;
+
+ // Sets the file space page size for paged aggregation.
+ void setFileSpacePagesize(hsize_t fsp_psize) const;
// Returns the threshold value that the library uses in tracking free
// space sections.
- hsize_t getFileSpaceThreshold() const;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ hsize_t getFileSpacePagesize() const;
///\brief Returns this class name.
virtual H5std_string fromClass() const { return("FileCreatPropList"); }
@@ -104,6 +105,7 @@ class H5_DLLCPP FileCreatPropList : public PropList {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of FileCreatPropList
+} // namespace H5
+
#endif // __H5FileCreatPropList_H
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index cdb5837..bea4612 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -45,7 +45,7 @@ namespace H5 {
using std::endl;
//--------------------------------------------------------------------------
-// Function H5File default constructor
+// Function H5File default constructor
///\brief Default constructor: creates a stub H5File object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
@@ -64,30 +64,30 @@ H5File::H5File() : Group(), id(H5I_INVALID_HID) {}
///\par Description
/// Valid values of \a flags include:
/// \li \c H5F_ACC_TRUNC - Truncate file, if it already exists,
-/// erasing all data previously stored in
-/// the file.
+/// erasing all data previously stored in
+/// the file.
/// \li \c H5F_ACC_EXCL - Fail if file already exists.
-/// \c H5F_ACC_TRUNC and \c H5F_ACC_EXCL are mutually exclusive
+/// \c H5F_ACC_TRUNC and \c H5F_ACC_EXCL are mutually exclusive
/// \li \c H5F_ACC_RDONLY - Open file as read-only, if it already
-/// exists, and fail, otherwise
+/// exists, and fail, otherwise
/// \li \c H5F_ACC_RDWR - Open file for read/write, if it already
-/// exists, and fail, otherwise
+/// exists, and fail, otherwise
///\par
/// For info on file creation in the case of an already-open file,
/// please refer to the \b Special \b case section in the C layer
/// Reference Manual at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5F.html#File-Create
-// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
-// could not be caught in the applications. Added try block here
-// to catch then re-throw it. -BMR 2013/03/21
+// Notes With a PGI compiler (~2012-2013,) the exception thrown by
+// p_get_file could not be caught in the applications. Added try
+// block here to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : Group(), id(H5I_INVALID_HID)
{
try {
- p_get_file(name, flags, create_plist, access_plist);
+ p_get_file(name, flags, create_plist, access_plist);
} catch (FileIException& open_file) {
- throw open_file;
+ throw open_file;
}
}
@@ -102,17 +102,17 @@ H5File::H5File(const char* name, unsigned int flags, const FileCreatPropList& cr
/// FileCreatPropList::DEFAULT
///\param access_plist - IN: File access property list. Default to
/// FileAccPropList::DEFAULT
-// Notes With a PGI compiler (~2012-2013), the exception thrown by p_get_file
-// could not be caught in the applications. Added try block here
-// to catch then re-throw it. -BMR 2013/03/21
+// Notes With a PGI compiler (~2012-2013,) the exception thrown by
+// p_get_file could not be caught in the applications. Added try
+// block here to catch then re-throw it. -BMR 2013/03/21
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5File::H5File(const H5std_string& name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist) : Group(), id(H5I_INVALID_HID)
{
try {
- p_get_file(name.c_str(), flags, create_plist, access_plist);
+ p_get_file(name.c_str(), flags, create_plist, access_plist);
} catch (FileIException& open_file) {
- throw open_file;
+ throw open_file;
}
}
@@ -131,23 +131,23 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
// create the file.
if (flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC))
{
- hid_t create_plist_id = create_plist.getId();
- hid_t access_plist_id = access_plist.getId();
- id = H5Fcreate(name, flags, create_plist_id, access_plist_id);
- if (id < 0) // throw an exception when open/create fail
- {
- throw FileIException("H5File constructor", "H5Fcreate failed");
- }
+ hid_t create_plist_id = create_plist.getId();
+ hid_t access_plist_id = access_plist.getId();
+ id = H5Fcreate(name, flags, create_plist_id, access_plist_id);
+ if (id < 0) // throw an exception when open/create fail
+ {
+ throw FileIException("H5File constructor", "H5Fcreate failed");
+ }
}
// Open the file if none of the bits above are set.
else
{
- hid_t access_plist_id = access_plist.getId();
- id = H5Fopen(name, flags, access_plist_id);
- if (id < 0) // throw an exception when open/create fail
- {
- throw FileIException("H5File constructor", "H5Fopen failed");
- }
+ hid_t access_plist_id = access_plist.getId();
+ id = H5Fopen(name, flags, access_plist_id);
+ if (id < 0) // throw an exception when open/create fail
+ {
+ throw FileIException("H5File constructor", "H5Fopen failed");
+ }
}
}
@@ -157,7 +157,7 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
///\param existing_id - IN: Id of an existing file
// Programmer Binh-Minh Ribler - 2015
// Description
-// Mar 29, 2015
+// Mar 29, 2015
// Added in responding to a request from user Jason Newton.
// However, it is not recommended to use the private member "id"
// in applications. Unlike other situations, where similar
@@ -230,9 +230,9 @@ bool H5File::isHdf5(const H5std_string& name)
///\par Description
/// Valid values of \a flags include:
/// H5F_ACC_RDWR: Open with read/write access. If the file is
-/// currently open for read-only access then it
-/// will be reopened. Absence of this flag
-/// implies read-only access.
+/// currently open for read-only access then it
+/// will be reopened. Absence of this flag
+/// implies read-only access.
///
/// H5F_ACC_RDONLY: Open with read only access. - default
///
@@ -251,7 +251,7 @@ void H5File::openFile(const char* name, unsigned int flags, const FileAccPropLis
id = H5Fopen (name, flags, access_plist_id);
if (id < 0) // throw an exception when open fails
{
- throw FileIException("H5File::openFile", "H5Fopen failed");
+ throw FileIException("H5File::openFile", "H5Fopen failed");
}
}
@@ -397,14 +397,14 @@ hssize_t H5File::getFreeSpace() const
///\exception H5::FileIException
///\par Description
/// The valid values for \a types include:
-/// \li \c H5F_OBJ_FILE - Files only
-/// \li \c H5F_OBJ_DATASET - Datasets only
-/// \li \c H5F_OBJ_GROUP - Groups only
-/// \li \c H5F_OBJ_DATATYPE - Named datatypes only
-/// \li \c H5F_OBJ_ATTR - Attributes only
+/// \li \c H5F_OBJ_FILE - Files only
+/// \li \c H5F_OBJ_DATASET - Datasets only
+/// \li \c H5F_OBJ_GROUP - Groups only
+/// \li \c H5F_OBJ_DATATYPE - Named datatypes only
+/// \li \c H5F_OBJ_ATTR - Attributes only
/// \li \c H5F_OBJ_ALL - All of the above, i.e., \c H5F_OBJ_FILE
-/// | \c H5F_OBJ_DATASET | \c H5F_OBJ_GROUP
-/// | \c H5F_OBJ_DATATYPE | \c H5F_OBJ_ATTR
+/// | \c H5F_OBJ_DATASET | \c H5F_OBJ_GROUP
+/// | \c H5F_OBJ_DATATYPE | \c H5F_OBJ_ATTR
///\par
/// Multiple object types can be combined with the logical OR operator (|).
// Programmer Binh-Minh Ribler - May 2004
@@ -425,19 +425,19 @@ ssize_t H5File::getObjCount(unsigned types) const
/// groups and datatypes) in the same file.
///\param types - Type of object to retrieve the count
///\param max_objs - Maximum number of object identifiers to place
-/// into obj_id_list.
+/// into obj_id_list.
///\param oid_list - List of open object identifiers
///\exception H5::FileIException
///\par Description
/// The valid values for \a types include:
-/// \li \c H5F_OBJ_FILE - Files only
-/// \li \c H5F_OBJ_DATASET - Datasets only
-/// \li \c H5F_OBJ_GROUP - Groups only
-/// \li \c H5F_OBJ_DATATYPE - Named datatypes only
-/// \li \c H5F_OBJ_ATTR - Attributes only
+/// \li \c H5F_OBJ_FILE - Files only
+/// \li \c H5F_OBJ_DATASET - Datasets only
+/// \li \c H5F_OBJ_GROUP - Groups only
+/// \li \c H5F_OBJ_DATATYPE - Named datatypes only
+/// \li \c H5F_OBJ_ATTR - Attributes only
/// \li \c H5F_OBJ_ALL - All of the above, i.e., \c H5F_OBJ_FILE
-/// | \c H5F_OBJ_DATASET | \c H5F_OBJ_GROUP
-/// | \c H5F_OBJ_DATATYPE | \c H5F_OBJ_ATTR
+/// | \c H5F_OBJ_DATASET | \c H5F_OBJ_GROUP
+/// | \c H5F_OBJ_DATATYPE | \c H5F_OBJ_ATTR
///\par
/// Multiple object types can be combined with the logical OR operator (|).
//
@@ -459,7 +459,7 @@ void H5File::getObjIDs(unsigned types, size_t max_objs, hid_t *oid_list) const
/// driver.
///\param fapl - File access property list
///\param file_handle - Pointer to the file handle being used by
-/// the low-level virtual file driver
+/// the low-level virtual file driver
///\exception H5::FileIException
///\par Description
/// For the \c FAMILY or \c MULTI drivers, \a fapl should be
@@ -487,10 +487,10 @@ void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
// Purpose This is an overloaded member function, kept for backward
// compatibility. It differs from the above function in that it
// misses const's. This wrapper will be removed in future release.
-// Param fapl - File access property list
-// Param file_handle - Pointer to the file handle being used by
-// the low-level virtual file driver
-// Exception H5::FileIException
+// Param fapl - File access property list
+// Param file_handle - Pointer to the file handle being used by
+// the low-level virtual file driver
+// Exception H5::FileIException
// Programmer Binh-Minh Ribler - May 2004
// Modification
// Planned for removal. -BMR, 2014/04/16
@@ -508,7 +508,7 @@ void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
/// It differs from the above function only in what arguments it
/// accepts.
///\param file_handle - Pointer to the file handle being used by
-/// the low-level virtual file driver
+/// the low-level virtual file driver
///\exception H5::FileIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
@@ -547,7 +547,7 @@ hsize_t H5File::getFileSize() const
///\brief Get the id of this file
///\return File identifier
// Modification
-// May 2008 - BMR
+// May 2008 - BMR
// Class hierarchy is revised to address bugzilla 1068. Class
// AbstractDS and Attribute are moved out of H5Object. In
// addition, member IdComponent::id is moved into subclasses, and
@@ -562,8 +562,8 @@ hid_t H5File::getId() const
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5File::reopen
-// Purpose Reopens this file.
-// Exception H5::FileIException
+// Purpose Reopens this file.
+// Exception H5::FileIException
// Description
// This function is replaced by the above function reOpen.
// Programmer Binh-Minh Ribler - 2000
@@ -575,14 +575,15 @@ void H5File::reopen()
//--------------------------------------------------------------------------
// Function: H5File::getLocId
-// Purpose Get the id of this file
+// Purpose Get the id of this file
// Description
// This function is a redefinition of CommonFG::getLocId. It
// is used by CommonFG member functions to get the file id.
// Programmer Binh-Minh Ribler - 2000
// Deprecated:
-// After HDFFV-9920, the Group's methods can use getId() and getLocId()
-// is kept for backward compatibility. Aug 18, 2016 -BMR
+// Aug 18, 2016 -BMR
+// After HDFFV-9920, the Group's methods can use getId() and
+// getLocId() is kept for backward compatibility.
//--------------------------------------------------------------------------
hid_t H5File::getLocId() const
{
@@ -626,13 +627,13 @@ void H5File::close()
{
if (p_valid_id(id))
{
- herr_t ret_value = H5Fclose(id);
- if (ret_value < 0)
- {
- throw FileIException("H5File::close", "H5Fclose failed");
- }
- // reset the id
- id = H5I_INVALID_HID;
+ herr_t ret_value = H5Fclose(id);
+ if (ret_value < 0)
+ {
+ throw FileIException("H5File::close", "H5Fclose failed");
+ }
+ // reset the id
+ id = H5I_INVALID_HID;
}
}
@@ -643,7 +644,7 @@ void H5File::close()
///\param msg - Message describing the failure
///\exception H5::FileIException
// Description
-// This function is also used in H5Location implementation so that
+// This function is also used in H5Location implementation so that
// proper exception can be thrown for file or group. The
// "H5File::" will be inserted to indicate the function called is
// an implementation of H5File.
@@ -669,9 +670,9 @@ void H5File::throwException(const H5std_string& func_name, const H5std_string& m
H5File::~H5File()
{
try {
- close();
+ close();
} catch (Exception& close_error) {
- cerr << "H5File::~H5File - " << close_error.getDetailMsg() << endl;
+ cerr << "H5File::~H5File - " << close_error.getDetailMsg() << endl;
}
}
diff --git a/c++/src/H5File.h b/c++/src/H5File.h
index 5ac9118..df5cca6 100644
--- a/c++/src/H5File.h
+++ b/c++/src/H5File.h
@@ -17,7 +17,6 @@
#ifndef __H5File_H
#define __H5File_H
-
namespace H5 {
/*! \class H5File
@@ -123,7 +122,8 @@ class H5_DLLCPP H5File : public Group {
// constructors taking a string or a char*
void p_get_file(const char* name, unsigned int flags, const FileCreatPropList& create_plist, const FileAccPropList& access_plist);
-};
-}
+}; // end of H5File
+} // namespace H5
+
#endif // __H5File_H
diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp
index 5902cbe..f573add 100644
--- a/c++/src/H5FloatType.cpp
+++ b/c++/src/H5FloatType.cpp
@@ -95,11 +95,12 @@ FloatType::FloatType(const DataSet& dataset) : AtomType()
// Function: FloatType overloaded constructor
///\brief Creates an FloatType instance by opening an HDF5 float datatype
/// given its name, provided as a C character string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Float type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openFloatType(const char*)
// to improve usability.
// -BMR, Dec 2016
@@ -113,11 +114,12 @@ FloatType::FloatType(const H5Location& loc, const char *dtype_name) : AtomType()
// Function: FloatType overloaded constructor
///\brief Creates an FloatType instance by opening an HDF5 float datatype
/// given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Float type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openFloatType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h
index 2c925de..8affa1a 100644
--- a/c++/src/H5FloatType.h
+++ b/c++/src/H5FloatType.h
@@ -75,6 +75,8 @@ class H5_DLLCPP FloatType : public AtomType {
// Noop destructor.
virtual ~FloatType();
-};
-}
+
+}; // end of FloatType
+} // namespace H5
+
#endif // __H5FloatType_H
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 6e5cdaa..66e2339 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -66,6 +66,9 @@ Group::Group(const Group& original) : H5Object(), CommonFG(), id(original.id)
//--------------------------------------------------------------------------
// Function: Group::getObjId
///\brief Opens an object via object header.
+///\param obj_name - IN: Path to the object
+///\param plist - IN: Access property list for the link pointing to
+/// the object
///\exception H5::FileIException or H5::GroupIException
///\par Description
/// This function opens an object in a group or file, using
@@ -88,6 +91,8 @@ hid_t Group::getObjId(const char* obj_name, const PropList& plist) const
///\brief This is an overloaded member function, provided for convenience.
/// It takes a reference to a \c H5std_string for the object's name.
///\param obj_name - IN: Path to the object
+///\param plist - IN: Access property list for the link pointing to
+/// the object
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - March, 2017
//--------------------------------------------------------------------------
@@ -113,14 +118,15 @@ void Group::closeObjId(hid_t obj_id) const
//--------------------------------------------------------------------------
// Function: Group::getLocId
-// Purpose: Get the id of this group
+// Purpose: Get the id of this group
// Programmer Binh-Minh Ribler - 2000
// Description
// This function is a redefinition of CommonFG::getLocId. It
// is used by CommonFG member functions to get the file id.
// Deprecated:
-// After HDFFV-9920, the Group's methods can use getId() and getLocId()
-// is kept for backward compatibility. Aug 18, 2016 -BMR
+// Aug 18, 2016 -BMR
+// After HDFFV-9920, the Group's methods can use getId() and
+// getLocId() is kept for backward compatibility.
//--------------------------------------------------------------------------
hid_t Group::getLocId() const
{
@@ -158,15 +164,19 @@ Group::Group(const H5Location& loc, const void* ref, H5R_type_t ref_type, const
//--------------------------------------------------------------------------
// Function: Group overload constructor - dereference
-///\brief Given a reference, ref, to an hdf5 group, creates a Group object
-///\param attr - IN: Specifying location where the referenced object is in
-///\param ref - IN: Reference pointer
-///\param ref_type - IN: Reference type - default to H5R_OBJECT
-///\param plist - IN: Property list - default to PropList::DEFAULT
-///\exception H5::ReferenceException
+// brief Given a reference, ref, to an hdf5 group, creates a Group objec
+// param attr - IN: Specifying location where the referenced object is i
+// param ref - IN: Reference pointer
+// param ref_type - IN: Reference type - default to H5R_OBJECT
+// param plist - IN: Property list - default to PropList::DEFAULT
+// exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
+// Modification
+// Mar, 2017
+// Removed in 1.10.1 because H5Location is Attribute's baseclass
+// now. -BMR
//--------------------------------------------------------------------------
- /* Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
+/* Group::Group(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID)
{
id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference");
}
@@ -227,13 +237,13 @@ void Group::close()
{
if (p_valid_id(id))
{
- herr_t ret_value = H5Gclose(id);
- if (ret_value < 0)
- {
- throwException("Group::close", "H5Gclose failed");
- }
- // reset the id
- id = H5I_INVALID_HID;
+ herr_t ret_value = H5Gclose(id);
+ if (ret_value < 0)
+ {
+ throwException("Group::close", "H5Gclose failed");
+ }
+ // reset the id
+ id = H5I_INVALID_HID;
}
}
@@ -270,10 +280,10 @@ void Group::throwException(const H5std_string& func_name, const H5std_string& ms
Group::~Group()
{
try {
- close();
+ close();
}
catch (Exception& close_error) {
- cerr << "Group::~Group - " << close_error.getDetailMsg() << endl;
+ cerr << "Group::~Group - " << close_error.getDetailMsg() << endl;
}
}
diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h
index 3118aa7..c8b2961 100644
--- a/c++/src/H5Group.h
+++ b/c++/src/H5Group.h
@@ -52,6 +52,7 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
// Creates a group by way of dereference.
Group(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
+ // Removed in 1.10.1, because H5Location is baseclass
// Group(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
// Opens an object within a group or a file, i.e., root group.
@@ -84,7 +85,8 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
private:
hid_t id; // HDF5 group id
-};
-}
+}; // end of Group
+} // namespace H5
+
#endif // __Group_H
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index 0bcc67a..122479f 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -24,6 +24,7 @@
namespace H5 {
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
// This flag indicates whether H5Library::initH5cpp has been called to register
// the terminating functions with atexit()
bool IdComponent::H5cppinit = false;
@@ -32,6 +33,7 @@ bool IdComponent::H5cppinit = false;
// Subclasses that have global constants use it. This is a temporary
// work-around in 1.8.16. It will be removed after HDFFV-9540 is fixed.
bool IdComponent::H5dontAtexit_called = false;
+#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: IdComponent::incRefCount
@@ -165,7 +167,7 @@ H5I_type_t IdComponent::getHDFObjType() const
// Function: getNumMembers (static)
///\brief Returns the number of members of the given type.
///\return Number of members
-///\Description
+///\par Description
/// If there is no member of the given type, getNumMembers will
/// return 0. Valid types are:
/// \li \c H5I_FILE (= 1)
@@ -197,9 +199,9 @@ hsize_t IdComponent::getNumMembers(H5I_type_t type)
// Function: isValid (static)
///\brief Checks if the given ID is valid.
///\return true if the given identifier is valid, and false, otherwise.
-///\Description
+///\par Description
/// A valid ID is one that is in use and has an application
-/// reference count of at least 1.
+/// reference count of at least 1.
// Programmer Binh-Minh Ribler - Mar 1, 2017
//--------------------------------------------------------------------------
bool IdComponent::isValid(hid_t an_id)
@@ -219,7 +221,7 @@ bool IdComponent::isValid(hid_t an_id)
///\brief Queries if a given type is currently registered with the
/// library.
///\return true if the given type exists, and false, otherwise.
-///\Description
+///\par Description
/// Valid types are:
/// \li \c H5I_FILE (= 1)
/// \li \c H5I_GROUP
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index b449d4a..0603e5c 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -123,6 +123,6 @@ class H5_DLLCPP IdComponent {
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end class IdComponent
+} // namespace H5
-}
#endif // __IdComponent_H
diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp
index c64dae9..3aadcab 100644
--- a/c++/src/H5IntType.cpp
+++ b/c++/src/H5IntType.cpp
@@ -94,11 +94,12 @@ IntType::IntType(const DataSet& dataset) : AtomType()
// Function: IntType overloaded constructor
///\brief Creates a IntType instance by opening an HDF5 integer datatype
/// given its name as a char*.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Integer type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openIntType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -112,11 +113,12 @@ IntType::IntType(const H5Location& loc, const char *dtype_name) : AtomType()
// Function: IntType overloaded constructor
///\brief Creates a IntType instance by opening an HDF5 integer datatype
/// given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Integer type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openArrayType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h
index ae4b3df..1ce05c8 100644
--- a/c++/src/H5IntType.h
+++ b/c++/src/H5IntType.h
@@ -57,6 +57,8 @@ class H5_DLLCPP IntType : public AtomType {
// Noop destructor.
virtual ~IntType();
-};
-}
+
+}; // end of IntType
+} // namespace H5
+
#endif // __H5IntType_H
diff --git a/c++/src/H5LaccProp.h b/c++/src/H5LaccProp.h
index 1cb80f7..f31c3fc 100644
--- a/c++/src/H5LaccProp.h
+++ b/c++/src/H5LaccProp.h
@@ -69,6 +69,7 @@ class H5_DLLCPP LinkAccPropList : public PropList {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of LinkAccPropList
+} // namespace H5
+
#endif // __H5LinkAccPropList_H
diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h
index 018ba38..76b5f82 100644
--- a/c++/src/H5Library.h
+++ b/c++/src/H5Library.h
@@ -69,6 +69,7 @@ class H5_DLLCPP H5Library {
~H5Library();
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of H5Library
+} // namespace H5
+
#endif // __H5Library_H
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index 5a0bb73..79b353a 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -524,16 +524,19 @@ void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t
//--------------------------------------------------------------------------
// Function: H5Location::dereference
-///\brief Dereferences a reference into an HDF5 object, given an attribute.
-///\param attr - IN: Attribute specifying the location of the referenced object
-///\param ref - IN: Reference pointer
-///\param ref_type - IN: Reference type
-///\param plist - IN: Property list - default to PropList::DEFAULT
-///\exception H5::ReferenceException
+// brief Dereferences a reference into an HDF5 object, given an attribute.
+// param attr - IN: Attribute specifying the location of the referenced object
+// param ref - IN: Reference pointer
+// param ref_type - IN: Reference type
+// param plist - IN: Property list - default to PropList::DEFAULT
+// exception H5::ReferenceException
// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// May, 2008
-// Corrected missing parameters. - BMR
+// Corrected missing parameters. -BMR
+// Mar, 2017
+// Removed in 1.10.1 because H5Location is Attribute's baseclass
+// now. -BMR
//--------------------------------------------------------------------------
/* void H5Location::dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist)
{
@@ -865,7 +868,7 @@ DataSet H5Location::createDataSet(const char* name, const DataType& data_type, c
//--------------------------------------------------------------------------
DataSet H5Location::createDataSet(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const DSetCreatPropList& create_plist) const
{
- return(createDataSet( name.c_str(), data_type, data_space, create_plist));
+ return(createDataSet(name.c_str(), data_type, data_space, create_plist));
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index 337a2b3..48fc2b1 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -86,6 +86,7 @@ class H5_DLLCPP H5Location : public IdComponent {
// Open a referenced object whose location is specified by either
// a file, an HDF5 object, or an attribute.
void dereference(const H5Location& loc, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
+ // Removed in 1.10.1, because H5Location is baseclass
//void dereference(const Attribute& attr, const void* ref, H5R_type_t ref_type = H5R_OBJECT, const PropList& plist = PropList::DEFAULT);
// Retrieves a dataspace with the region pointed to selected.
@@ -220,7 +221,7 @@ class H5_DLLCPP H5Location : public IdComponent {
// Noop destructor.
virtual ~H5Location();
-}; /* end class H5Location */
+}; // end of H5Location
+} // namespace H5
-}
#endif // __H5Location_H
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index b5d0f88..359fab2 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -51,7 +51,6 @@ extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
myData->op(*myData->location, s_attr_name, myData->opData);
return 0;
}
-#endif
//--------------------------------------------------------------------------
// Function: H5Object default constructor (protected)
@@ -101,6 +100,7 @@ void f_Attribute_setId(Attribute* attr, hid_t new_id)
{
attr->p_setId(new_id);
}
+#endif
//--------------------------------------------------------------------------
// Function: H5Object::createAttribute
@@ -391,6 +391,8 @@ void H5Object::renameAttr(const H5std_string& oldname, const H5std_string& newna
{
renameAttr (oldname.c_str(), newname.c_str());
}
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: getObjName
///\brief Given an id, returns the type of the object.
@@ -502,7 +504,6 @@ ssize_t H5Object::getObjName(H5std_string& obj_name, size_t len) const
return(name_size);
}
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Object destructor
///\brief Noop destructor.
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h
index 866d739..53f183e 100644
--- a/c++/src/H5Object.h
+++ b/c++/src/H5Object.h
@@ -131,7 +131,7 @@ class H5_DLLCPP H5Object : public H5Location {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-}; /* end class H5Object */
+}; // end of H5Object
+} // namespace H5
-}
#endif // __H5Object_H
diff --git a/c++/src/H5OcreatProp.cpp b/c++/src/H5OcreatProp.cpp
index 6fdd9dc..9a3af7e 100644
--- a/c++/src/H5OcreatProp.cpp
+++ b/c++/src/H5OcreatProp.cpp
@@ -155,7 +155,7 @@ void ObjCreatPropList::getAttrPhaseChange(unsigned& max_compact, unsigned& min_d
//--------------------------------------------------------------------------
// Function: ObjCreatPropList::setAttrCrtOrder
-///\brief Sets tracking and indexing of attribute creation order.
+///\brief Set the flags for creation order of attributes on an object
///\param crt_order_flags - IN: Flags specifying whether to track and
/// index attribute creation order. Default: No flag set
///\exception H5::PropListIException
@@ -183,10 +183,9 @@ void ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
//--------------------------------------------------------------------------
// Function: ObjCreatPropList::getAttrCrtOrder
-///\brief Gets tracking and indexing settings for attribute
-/// creation order.
-///\param crt_order_flags - OUT: Flags specifying whether to track and
-/// index attribute creation order
+///\brief Returns the flags indicating creation order is tracked/indexed
+/// for attributes on an object.
+///\return The flags
///\exception H5::PropListIException
///\par Description
/// When no flag is set, i.e. crt_order_flags = 0, attribute
diff --git a/c++/src/H5OcreatProp.h b/c++/src/H5OcreatProp.h
index 4858e07..c9c245a 100644
--- a/c++/src/H5OcreatProp.h
+++ b/c++/src/H5OcreatProp.h
@@ -72,6 +72,7 @@ class H5_DLLCPP ObjCreatPropList : public PropList {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of ObjCreatPropList
+} // namespace H5
+
#endif // __H5ObjCreatPropList_H
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
index a8d6e37..2fd8a6b 100644
--- a/c++/src/H5PredType.h
+++ b/c++/src/H5PredType.h
@@ -438,6 +438,7 @@ class H5_DLLCPP PredType : public AtomType {
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of PredType
+} // namespace H5
+
#endif // __H5PredType_H
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index c4176c2..0df0a9f 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -565,8 +565,27 @@ size_t PropList::getNumProps() const
///\param name - IN: Name of property to set - \c char pointer
///\param value - IN: Void pointer to the value for the property
///\exception H5::PropListIException
+// Description
+// Revision svn r29815 changed 'value' to const, hence, deprecated
+// the non-const setProperty.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
+void PropList::setProperty(const char* name, const void* value) const
+{
+ herr_t ret_value = H5Pset(id, name, value);
+ if (ret_value < 0)
+ {
+ throw PropListIException(inMemFunc("setProperty"), "H5Pset failed");
+ }
+}
+
+//--------------------------------------------------------------------------
+// Function: PropList::setProperty
+///\brief Deprecated due to missing const in prototype. (1.10.1)
+// Programmer: Binh-Minh Ribler - March, 2017
+// Modification
+// Planned for removal. -BMR, 2017/03/17 1.10.1
+//--------------------------------------------------------------------------
void PropList::setProperty(const char* name, void* value) const
{
herr_t ret_value = H5Pset(id, name, value);
@@ -575,6 +594,7 @@ void PropList::setProperty(const char* name, void* value) const
throw PropListIException(inMemFunc("setProperty"), "H5Pset failed");
}
}
+
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief This is an overloaded member function, provided for convenience.
@@ -582,11 +602,14 @@ void PropList::setProperty(const char* name, void* value) const
/// accepts.
///\param name - IN: Name of property to set - \c char pointer
///\param charptr - IN: Char pointer to the value for the property
+// Description
+// Revision svn r29815 changed 'value' to const, hence, deprecated
+// the non-const setProperty.
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void PropList::setProperty(const char* name, const char* charptr) const
{
- herr_t ret_value = H5Pset(id, name, (void*)charptr);
+ herr_t ret_value = H5Pset(id, name, (const void*)charptr);
if (ret_value < 0)
{
throw PropListIException(inMemFunc("setProperty"), "H5Pset failed");
@@ -601,6 +624,18 @@ void PropList::setProperty(const char* name, const char* charptr) const
///\param strg - IN: Value for the property is a \c H5std_string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
+void PropList::setProperty(const char* name, const H5std_string& strg) const
+{
+ setProperty(name, strg.c_str());
+}
+
+//--------------------------------------------------------------------------
+// Function: PropList::setProperty
+///\brief Deprecated due to missing const in prototype. (1.10.1)
+// Programmer: Binh-Minh Ribler - March, 2017
+// Modification
+// Planned for removal. -BMR, 2017/03/17 1.10.1
+//--------------------------------------------------------------------------
void PropList::setProperty(const char* name, H5std_string& strg) const
{
setProperty(name, strg.c_str());
@@ -615,6 +650,18 @@ void PropList::setProperty(const char* name, H5std_string& strg) const
///\param value - IN: Void pointer to the value for the property
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
+void PropList::setProperty(const H5std_string& name, const void* value) const
+{
+ setProperty(name.c_str(), value);
+}
+
+//--------------------------------------------------------------------------
+// Function: PropList::setProperty
+///\brief Deprecated due to missing const in prototype. (1.10.1)
+// Programmer: Binh-Minh Ribler - March, 2017
+// Modification
+// Planned for removal. -BMR, 2017/03/17 1.10.1
+//--------------------------------------------------------------------------
void PropList::setProperty(const H5std_string& name, void* value) const
{
setProperty(name.c_str(), value);
@@ -629,6 +676,18 @@ void PropList::setProperty(const H5std_string& name, void* value) const
///\param strg - IN: Value for the property is a \c H5std_string
// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
+void PropList::setProperty(const H5std_string& name, const H5std_string& strg) const
+{
+ setProperty(name.c_str(), strg.c_str());
+}
+
+//--------------------------------------------------------------------------
+// Function: PropList::setProperty
+///\brief Deprecated due to missing const in prototype. (1.10.1)
+// Programmer: Binh-Minh Ribler - March, 2017
+// Modification
+// Planned for removal. -BMR, 2017/03/17 1.10.1
+//--------------------------------------------------------------------------
void PropList::setProperty(const H5std_string& name, H5std_string& strg) const
{
setProperty(name.c_str(), strg.c_str());
diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h
index 3977774..772e96c 100644
--- a/c++/src/H5PropList.h
+++ b/c++/src/H5PropList.h
@@ -78,8 +78,13 @@ class H5_DLLCPP PropList : public IdComponent {
H5std_string getProperty(const H5std_string& name) const;
// Set a property's value in a property list.
- void setProperty(const char* name, void* value) const;
void setProperty(const char* name, const char* charptr) const;
+ void setProperty(const char* name, const void* value) const;
+ void setProperty(const char* name, const H5std_string& strg) const;
+ void setProperty(const H5std_string& name, const void* value) const;
+ void setProperty(const H5std_string& name, const H5std_string& strg) const;
+ // Deprecated after 1.10.1, missing const
+ void setProperty(const char* name, void* value) const;
void setProperty(const char* name, H5std_string& strg) const;
void setProperty(const H5std_string& name, void* value) const;
void setProperty(const H5std_string& name, H5std_string& strg) const;
@@ -135,7 +140,8 @@ class H5_DLLCPP PropList : public IdComponent {
friend void f_PropList_setId(PropList* plist, hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
-};
-}
+}; // end of PropList
+} // namespace H5
+
#endif // __H5PropList_H
diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp
index 54981ab..db1cf04 100644
--- a/c++/src/H5StrType.cpp
+++ b/c++/src/H5StrType.cpp
@@ -148,11 +148,12 @@ StrType::StrType(const DataSet& dataset) : AtomType ()
// Function: StrType overloaded constructor
///\brief Creates an StrType instance by opening an HDF5 string datatype
/// given its name, provided as a C character string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: String type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openStrType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -166,11 +167,12 @@ StrType::StrType(const H5Location& loc, const char *dtype_name) : AtomType()
// Function: StrType overloaded constructor
///\brief Creates an StrType instance by opening an HDF5 string datatype
/// given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: String type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openStrType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h
index 3272ad3..aa87bba 100644
--- a/c++/src/H5StrType.h
+++ b/c++/src/H5StrType.h
@@ -69,6 +69,8 @@ class H5_DLLCPP StrType : public AtomType {
// Noop destructor.
virtual ~StrType();
-};
-}
+
+}; // end of StrType
+} // namespace H5
+
#endif // __H5StrType_H
diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp
index 7f50b9a..64029cc 100644
--- a/c++/src/H5VarLenType.cpp
+++ b/c++/src/H5VarLenType.cpp
@@ -76,11 +76,12 @@ VarLenType::VarLenType(const DataType* base_type) : DataType()
// Function: VarLenType overloaded constructor
///\brief Creates an VarLenType instance by opening an HDF5 variable
/// length datatype given its name, provided as a C char*.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Variable length type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openVarLenType(const char*) to
// improve usability.
// -BMR, Dec 2016
@@ -94,11 +95,12 @@ VarLenType::VarLenType(const H5Location& loc, const char *dtype_name) : DataType
// Function: VarLenType overloaded constructor
///\brief Creates an VarLenType instance by opening an HDF5 variable
/// length datatype given its name, provided as an \c H5std_string.
+///\param loc - IN: Location of the type
///\param dtype_name - IN: Variable length type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
-// In 1.10.1, this constructor was introduced and will replace the
+// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openVarLenType(const H5std_string&)
// to improve usability.
// -BMR, Dec 2016
diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h
index a93f44d..4dc0eb5 100644
--- a/c++/src/H5VarLenType.h
+++ b/c++/src/H5VarLenType.h
@@ -49,6 +49,8 @@ class H5_DLLCPP VarLenType : public DataType {
// Default constructor
VarLenType();
-};
-}
+
+}; // end of VarLenType
+} // namespace H5
+
#endif // __H5VarLenType_H
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index eb07657..715bb30 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -812,19 +812,17 @@ const H5std_string FILE7("tfile7.h5");
*
*-------------------------------------------------------------------------
*/
+const hsize_t FSP_SIZE_DEF = 4096;
+const hsize_t FSP_SIZE512 = 512;
static void test_file_info()
{
// Output message about test being performed
SUBTEST("File general information");
-#ifndef H5_NO_DEPRECATED_SYMBOLS
- hsize_t in_threshold = 2; // Free space section threshold to set */
- hsize_t out_threshold = 0; // Free space section threshold to get */
+ hsize_t out_threshold = 0; // Free space section threshold to get
+ hbool_t out_persist = FALSE;// Persist free-space read
// File space handling strategy
- H5F_file_space_type_t in_strategy = H5F_FILE_SPACE_ALL;
- // File space handling strategy
- H5F_file_space_type_t out_strategy = H5F_FILE_SPACE_DEFAULT;
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ H5F_fspace_strategy_t out_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR;
try {
// Create a file using default properties.
@@ -843,14 +841,30 @@ static void test_file_info()
// Create file creation property list.
FileCreatPropList fcpl;
+ // Retrieve file space information.
+ fcpl.getFileSpaceStrategy(out_strategy, out_persist, out_threshold);
+
+ // Verify file space information.
+ verify_val(out_strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5File::getFileInfo", __LINE__, __FILE__);
+ verify_val(out_persist, FALSE, "H5File::getFileInfo", __LINE__, __FILE__);
+ verify_val(out_threshold, 1, "H5File::getFileInfo", __LINE__, __FILE__);
+
+ /* Retrieve file space page size */
+ hsize_t out_fsp_psize = fcpl.getFileSpacePagesize();
+ verify_val(out_fsp_psize, FSP_SIZE_DEF, "FileCreatPropList::getFileSpacePagesize", __LINE__, __FILE__);
+
// Set various file information.
fcpl.setUserblock(F2_USERBLOCK_SIZE);
fcpl.setSizes(F2_OFFSET_SIZE, F2_LENGTH_SIZE);
fcpl.setSymk(F2_SYM_INTERN_K, F2_SYM_LEAF_K);
fcpl.setIstorek(F2_ISTORE);
-#ifndef H5_NO_DEPRECATED_SYMBOLS
- fcpl.setFileSpace(in_strategy, in_threshold);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
+ hsize_t threshold = 5; // Free space section threshold to set
+ hbool_t persist = TRUE; // Persist free-space to set
+ H5F_fspace_strategy_t strategy = H5F_FSPACE_STRATEGY_PAGE;
+
+ fcpl.setFileSpaceStrategy(strategy, persist, threshold);
+ fcpl.setFileSpacePagesize(FSP_SIZE512);
// Creating a file with the non-default file creation property list
// should create a version 1 superblock
@@ -863,11 +877,7 @@ static void test_file_info()
// Get the file's version information.
file7.getFileInfo(finfo);
-#ifndef H5_NO_DEPRECATED_SYMBOLS
verify_val(finfo.super.version, 2, "H5File::getFileInfo", __LINE__, __FILE__);
-#else /* H5_NO_DEPRECATED_SYMBOLS */
- verify_val(finfo.super.version, 1, "H5File::getFileInfo", __LINE__, __FILE__);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
verify_val(finfo.free.version, 0, "H5File::getFileInfo", __LINE__, __FILE__);
verify_val(finfo.sohm.version, 0, "H5File::getFileInfo", __LINE__, __FILE__);
@@ -882,11 +892,7 @@ static void test_file_info()
// Get the file's version information.
file7.getFileInfo(finfo);
-#ifndef H5_NO_DEPRECATED_SYMBOLS
verify_val(finfo.super.version, 2, "H5File::getFileInfo", __LINE__, __FILE__);
-#else /* H5_NO_DEPRECATED_SYMBOLS */
- verify_val(finfo.super.version, 1, "H5File::getFileInfo", __LINE__, __FILE__);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
verify_val(finfo.free.version, 0, "H5File::getFileInfo", __LINE__, __FILE__);
verify_val(finfo.sohm.version, 0, "H5File::getFileInfo", __LINE__, __FILE__);
@@ -912,14 +918,14 @@ static void test_file_info()
VERIFY(nindexes, MISC11_NINDEXES, "H5Pget_shared_mesg_nindexes");
*/
-#ifndef H5_NO_DEPRECATED_SYMBOLS
// Get and verify the file space info from the creation property list */
- out_strategy = fcpl2.getFileSpaceStrategy();
- verify_val(static_cast<unsigned>(out_strategy), static_cast<unsigned>(in_strategy), "FileCreatPropList::getFileSpaceStrategy", __LINE__, __FILE__);
+ fcpl2.getFileSpaceStrategy(out_strategy, out_persist, out_threshold);
+ verify_val(out_strategy, strategy, "FileCreatPropList::getFileSpaceStrategy", __LINE__, __FILE__);
+ verify_val(out_persist, persist, "FileCreatPropList::getFileSpaceStrategy", __LINE__, __FILE__);
+ verify_val(out_threshold, threshold, "FileCreatPropList::getFileSpaceStrategy", __LINE__, __FILE__);
- out_threshold = fcpl2.getFileSpaceThreshold();
- verify_val(static_cast<unsigned>(out_threshold), static_cast<unsigned>(in_threshold), "FileCreatPropList::getFileSpaceThreshold", __LINE__, __FILE__);
-#endif /* H5_NO_DEPRECATED_SYMBOLS */
+ out_fsp_psize = fcpl2.getFileSpacePagesize();
+ verify_val(out_fsp_psize, FSP_SIZE512, "FileCreatPropList::getFileSpacePagesize", __LINE__, __FILE__);
PASSED();
} // end of try block
diff --git a/c++/test/titerate.cpp b/c++/test/titerate.cpp
index fce42fa..34e6892 100644
--- a/c++/test/titerate.cpp
+++ b/c++/test/titerate.cpp
@@ -503,9 +503,9 @@ void test_iterate()
FileAccPropList fapl;
fapl.setLibverBounds(H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
- test_iter_group(fapl); // Test iterating groups
- test_HDFFV_9920(); // Test the fix of HDFFV-9920
- //test_iter_attr(fapl); // Test iterating attributes
+ test_iter_group(fapl); // Test iterating groups
+ test_HDFFV_9920(); // Test the fix of HDFFV-9920
+ //test_iter_attr(fapl); // Test iterating attributes
} // test_iterate
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index d8a0d5f..c232809 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -16,7 +16,7 @@
/*****************************************************************************
FILE
trefer.cpp - HDF5 C++ testing the functionalities associated with the C
- Reference interface (H5R)
+ Reference interface (H5R)
***************************************************************************/
#ifdef OLD_HEADER_FILENAME
@@ -93,7 +93,7 @@ test_reference_params(void)
file1 = new H5File (FILE1, H5F_ACC_TRUNC);
// Create dataspace for datasets
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a group
@@ -172,7 +172,7 @@ test_reference_params(void)
catch (Exception& E)
{
issue_fail_msg("test_reference_param()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ E.getCFuncName(), E.getCDetailMsg());
}
if(file1)
@@ -209,7 +209,7 @@ static void test_reference_obj(void)
file1 = new H5File (FILE1, H5F_ACC_TRUNC);
// Create dataspace for datasets
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create dataset access property list
@@ -364,7 +364,7 @@ static void test_reference_obj(void)
catch (Exception& E)
{
issue_fail_msg("test_reference_obj()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ E.getCFuncName(), E.getCDetailMsg());
}
if(file1)
@@ -493,7 +493,7 @@ test_reference_group(void)
catch (Exception& E)
{
issue_fail_msg("test_reference_group()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ E.getCFuncName(), E.getCDetailMsg());
}
if(file1)
@@ -523,10 +523,10 @@ test_reference_region_1D(void)
SUBTEST("1-D Dataset Region Reference Functions");
try {
- hdset_reg_ref_t *wbuf, // buffer to write to disk
+ hdset_reg_ref_t *wbuf, // buffer to write to disk
*rbuf; // buffer read from disk
- uint8_t *dwbuf, // Buffer for writing numeric data to disk
- *drbuf; // Buffer for reading numeric data from disk
+ uint8_t *dwbuf, // Buffer for writing numeric data to disk
+ *drbuf; // Buffer for reading numeric data from disk
// Allocate write & read buffers
wbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)SPACE1_DIM1);
@@ -538,7 +538,7 @@ test_reference_region_1D(void)
H5File file1(FILE2, H5F_ACC_TRUNC);
// Create dataspace for datasets
- hsize_t dims3[] = {SPACE3_DIM1};
+ hsize_t dims3[] = {SPACE3_DIM1};
DataSpace sid3(SPACE3_RANK, dims3);
// Create dataset access property list
@@ -558,7 +558,7 @@ test_reference_region_1D(void)
dset3.close();
// Create dataspace for datasets
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
DataSpace sid1(SPACE1_RANK, dims1);
// Create a dataset
@@ -785,7 +785,7 @@ test_reference_region_1D(void)
catch (Exception& E)
{
issue_fail_msg("test_reference_region_1D()",__LINE__,__FILE__,
- E.getCFuncName(), E.getCDetailMsg());
+ E.getCFuncName(), E.getCDetailMsg());
}
} /* test_reference_region_1D() */
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index 22db539..fee4115 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -272,9 +272,8 @@ static void test_query()
tcpl.close();
tid2.close();
- // Open the datatypes for query
+ // Open the datatypes for query. Testing both ways
- // Deprecated functions
tid1 = file.openCompType(CompT_NAME);
tid1.close();
tid2 = file.openEnumType(EnumT_NAME);
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index 5dee1a2..859867b 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -57,7 +57,7 @@ static void *test_vlstr_alloc_custom(size_t size, void *info)
{
void *ret_value=NULL; // Pointer to return
size_t *mem_used=(size_t *)info; // Get the pointer to the memory used
- size_t extra; // Extra space needed
+ size_t extra; // Extra space needed
/*
* This weird contortion is required on the DEC Alpha to keep the
@@ -91,7 +91,7 @@ static void test_vlstr_free_custom(void *_mem, void *info)
{
unsigned char *mem;
size_t *mem_used=(size_t *)info; // Get the pointer to the memory used
- size_t extra; // Extra space needed
+ size_t extra; // Extra space needed
/*
* This weird contortion is required on the DEC Alpha to keep the
@@ -257,7 +257,7 @@ static void test_vlstring_array_dataset()
for (ii = 0; ii < SPACE1_DIM1; ii++)
{
if(HDstrcmp(string_ds_check[ii], string_ds_array[ii])!=0)
- TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n",__LINE__, string_ds_array[ii], string_ds_check[ii]);
+ TestErrPrintf("Line %d: Dataset data different: written=%s,read=%s\n",__LINE__, string_ds_array[ii], string_ds_check[ii]);
HDfree(string_ds_check[ii]);
}
@@ -351,23 +351,26 @@ static void test_vlstrings_special()
hsize_t ii; // counting variable
for (ii=0; ii<SPACE1_DIM1; ii++)
if(rdata[ii]!=NULL)
- TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)ii,rdata[ii]);
+ TestErrPrintf("VL doesn't match!, rdata[%d]=%p\n",(int)ii,rdata[ii]);
// Write dataset to disk, then read it back.
dataset.write(wdata, vlst);
dataset.read(rdata, vlst);
// Compare data read in.
- for (ii = 0; ii < SPACE1_DIM1; ii++) {
+ for (ii = 0; ii < SPACE1_DIM1; ii++)
+ {
size_t wlen = HDstrlen(wdata[ii]);
size_t rlen = HDstrlen(rdata[ii]);
- if(wlen != rlen) {
- TestErrPrintf("VL data lengths don't match!, strlen(wdata[%d])=%u, strlen(rdata[%d])=%u\n", (int)ii, (unsigned)wlen, (int)ii, (unsigned)rlen);
- continue;
+ if(wlen != rlen)
+ {
+ TestErrPrintf("VL data lengths don't match!, strlen(wdata[%d])=%u, strlen(rdata[%d])=%u\n", (int)ii, (unsigned)wlen, (int)ii, (unsigned)rlen);
+ continue;
} // end if
- if(HDstrcmp(wdata[ii],rdata[ii]) != 0) {
- TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)ii, wdata[ii], (int)ii, rdata[ii]);
- continue;
+ if(HDstrcmp(wdata[ii],rdata[ii]) != 0)
+ {
+ TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n", (int)ii, wdata[ii], (int)ii, rdata[ii]);
+ continue;
} // end if
} // end for
@@ -384,7 +387,7 @@ static void test_vlstrings_special()
// Create the property list and set the fill value for the second
// dataset.
DSetCreatPropList dcpl;
- char *fill = NULL; // Fill value
+ char *fill = NULL; // Fill value
dcpl.setFillValue(vlst, &fill);
dataset = file1.createDataSet("Dataset4", vlst, sid1, dcpl);
@@ -566,12 +569,12 @@ static void test_compact_vlstring()
hsize_t i;
for (i=0; i<SPACE1_DIM1; i++) {
if (HDstrlen(wdata[i])!=strlen(rdata[i])) {
- TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
- continue;
+ TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n",(int)i,(int)strlen(wdata[i]),(int)i,(int)strlen(rdata[i]));
+ continue;
} // end if
if (HDstrcmp(wdata[i],rdata[i]) != 0) {
- TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
- continue;
+ TestErrPrintf("VL data values don't match!, wdata[%d]=%s, rdata[%d]=%s\n",(int)i,wdata[i],(int)i,rdata[i]);
+ continue;
} // end if
} // end for
@@ -800,7 +803,7 @@ static void test_vlstring_array_attribute()
for (ii = 0; ii < SPACE1_DIM1; ii++)
{
if(HDstrcmp(string_att_check[ii], string_att_array[ii])!=0)
- TestErrPrintf("Line %d: Attribute data different: written=%s,read=%s\n",__LINE__, string_att_check[ii], string_att_check[ii]);
+ TestErrPrintf("Line %d: Attribute data different: written=%s,read=%s\n",__LINE__, string_att_check[ii], string_att_check[ii]);
HDfree(string_att_check[ii]); // note: no need for std::string test
}
@@ -821,7 +824,7 @@ static void test_vlstring_array_attribute()
/* Helper routine for test_vl_rewrite() */
static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
- char *name, char *data)
+ char *name, char *data)
{
DataSet dset;
try {
@@ -839,7 +842,7 @@ static void write_scalar_dset(H5File& file, DataType& type, DataSpace& space,
/* Helper routine for test_vl_rewrite() */
static void read_scalar_dset(H5File& file, DataType& type, DataSpace& space,
- char *name, char *data)
+ char *name, char *data)
{
char *data_read;
DataSet dset;