summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2016-05-09 18:55:46 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2016-05-09 18:55:46 (GMT)
commit44640ecf685cfbd15fe176a1b96c6a7105288678 (patch)
treed812c113ba801562f0e9a607456bf8daa14a5c9e /c++/src
parent45b57227d47476490cd720dc65e9c2fbfc94cd9f (diff)
parent57b7130acf69256ddaee7c6295a65c6ba16e3096 (diff)
downloadhdf5-44640ecf685cfbd15fe176a1b96c6a7105288678.zip
hdf5-44640ecf685cfbd15fe176a1b96c6a7105288678.tar.gz
hdf5-44640ecf685cfbd15fe176a1b96c6a7105288678.tar.bz2
[svn-r29903] merge from trunk.
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/CMakeLists.txt2
-rw-r--r--c++/src/H5AbstractDs.cpp5
-rw-r--r--c++/src/H5AbstractDs.h2
-rw-r--r--c++/src/H5ArrayType.cpp166
-rw-r--r--c++/src/H5ArrayType.h6
-rw-r--r--c++/src/H5Attribute.cpp27
-rw-r--r--c++/src/H5CommonFG.cpp101
-rw-r--r--c++/src/H5CompType.cpp11
-rw-r--r--c++/src/H5DataSet.cpp59
-rw-r--r--c++/src/H5DataSpace.cpp21
-rw-r--r--c++/src/H5DataType.cpp42
-rw-r--r--c++/src/H5Exception.cpp6
-rw-r--r--c++/src/H5FaccProp.cpp45
-rw-r--r--c++/src/H5File.cpp18
-rw-r--r--c++/src/H5Group.cpp6
-rw-r--r--c++/src/H5Library.cpp4
-rw-r--r--c++/src/H5Location.cpp12
-rw-r--r--c++/src/H5Object.cpp2
-rw-r--r--c++/src/H5PropList.cpp5
-rw-r--r--c++/src/H5StrType.cpp21
-rw-r--r--c++/src/Makefile.am2
-rw-r--r--c++/src/cpp_doc_config2
22 files changed, 330 insertions, 235 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 473605a..1a182e3 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -94,7 +94,7 @@ if (BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}")
- H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED)
+ H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED ${HDF5_CXX_PACKAGE_SOVERSION})
set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES
FOLDER libraries/cpp
COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp
index 06b3e22..8d88c53 100644
--- a/c++/src/H5AbstractDs.cpp
+++ b/c++/src/H5AbstractDs.cpp
@@ -49,7 +49,7 @@ AbstractDs::AbstractDs(){}
// removal does not raise any problems in 1.10, it will be removed from 1.8 in
// subsequent releases.
//--------------------------------------------------------------------------
-AbstractDs::AbstractDs(const hid_t ds_id){}
+// Mar 2016 -BMR, AbstractDs::AbstractDs(const hid_t ds_id){}
//--------------------------------------------------------------------------
// Function: AbstractDs::getTypeClass
@@ -141,8 +141,11 @@ ArrayType AbstractDs::getArrayType() const
// depending on which object invokes getArrayType. Then, create and
// return the ArrayType object
try {
+ // Create ArrayType and set values this way to work around the
+ // problem described in the JIRA issue HDFFV-7947
ArrayType arraytype;
f_DataType_setId(&arraytype, p_get_type());
+ arraytype.setArrayInfo();
return(arraytype);
}
catch (DataSetIException E) {
diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h
index ee2e45e..6975d6f 100644
--- a/c++/src/H5AbstractDs.h
+++ b/c++/src/H5AbstractDs.h
@@ -85,7 +85,7 @@ class H5_DLLCPP AbstractDs {
// other will be removed from 1.10 release, and then from 1.8 if its
// removal does not raise any problems in two 1.10 releases.
- AbstractDs(const hid_t h5_id);
+ // Mar 2016 -BMR, AbstractDs(const hid_t h5_id);
// Copy constructor
// AbstractDs( const AbstractDs& original );
diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp
index 85340f8..9731a13 100644
--- a/c++/src/H5ArrayType.cpp
+++ b/c++/src/H5ArrayType.cpp
@@ -35,12 +35,7 @@ namespace H5 {
///\brief Default constructor: Creates a stub ArrayType
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-ArrayType::ArrayType() : DataType()
-{
- // Initialize members
- rank = -1;
- dimensions = NULL;
-}
+ArrayType::ArrayType() : DataType(), rank(-1), dimensions(NULL) {}
//--------------------------------------------------------------------------
// Function: ArrayType overloaded constructor
@@ -51,20 +46,7 @@ ArrayType::ArrayType() : DataType()
//--------------------------------------------------------------------------
ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
{
- // Get the rank of the existing array and store it in this array
- rank = H5Tget_array_ndims(existing_id);
- if (rank < 0)
- {
- throw DataTypeIException("ArrayType constructor (existing id)", "H5Tget_array_ndims failed");
- }
-
- // Allocate space for the dimensions
- dimensions = new hsize_t[rank];
-
- // Get the dimensions of the existing array and store it in this array
- int ret_value = H5Tget_array_dims2(id, dimensions);
- if (ret_value < 0)
- throw DataTypeIException("ArrayType constructor (existing id)", "H5Tget_array_dims2 failed");
+ setArrayInfo();
}
//--------------------------------------------------------------------------
@@ -72,11 +54,8 @@ ArrayType::ArrayType( const hid_t existing_id ) : DataType( existing_id )
///\brief Copy constructor: makes a copy of the original ArrayType object.
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
-ArrayType::ArrayType( const ArrayType& original ) : DataType( original )
+ArrayType::ArrayType( const ArrayType& original ) : DataType( original ), rank(original.rank)
{
- // Copy the rank of the original array
- rank = original.rank;
-
// Allocate space then copy the dimensions from the original array
dimensions = new hsize_t[rank];
for (int i = 0; i < rank; i++)
@@ -111,25 +90,105 @@ ArrayType::ArrayType(const DataType& base_type, int ndims, const hsize_t* dims)
}
//--------------------------------------------------------------------------
+// Function: ArrayType::operator=
+///\brief Assignment operator
+///\param rhs - IN: Reference to the existing array datatype
+///\return Reference to ArrayType instance
+///\exception H5::DataTypeIException
+/// std::bad_alloc
+// Description
+// Closes the id on the lhs object first with setId, then copies
+// each data member from the rhs object.
+// Programmer Binh-Minh Ribler - Mar 2016
+// Modification
+//--------------------------------------------------------------------------
+ArrayType& ArrayType::operator=(const ArrayType& rhs)
+{
+ if (this != &rhs)
+ {
+ // handling references to this id
+ try {
+ setId(rhs.id);
+ // Note: a = b, so there are two objects with the same hdf5 id
+ // that's why incRefCount is needed, and it is called by setId
+ }
+ catch (Exception close_error) {
+ throw DataTypeIException(inMemFunc("operator="), close_error.getDetailMsg());
+ }
+
+ // Copy the rank of the rhs array
+ rank = rhs.rank;
+
+ // Allocate space then copy the dimensions from the rhs array
+ dimensions = new hsize_t[rank];
+ for (int i = 0; i < rank; i++)
+ dimensions[i] = rhs.dimensions[i];
+ }
+ return(*this);
+}
+
+//--------------------------------------------------------------------------
+// Function: ArrayType::setArrayInfo
+///\brief Retrieves the rank and dimensions from the array datatype
+/// and store the info in this ArrayType object.
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - January 2016
+//--------------------------------------------------------------------------
+void ArrayType::setArrayInfo()
+{
+ // Get the rank of the array type specified by id from the C API
+ int ndims = H5Tget_array_ndims(id);
+ if (ndims < 0)
+ {
+ throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_ndims failed");
+ }
+
+ // Get the dimensions from the C API
+ hsize_t* dims;
+ dims = new hsize_t[ndims];
+ if (dims != NULL)
+ {
+ // Get the dimensions
+ ndims = H5Tget_array_dims2(id, dims);
+ if (ndims < 0)
+ throw DataTypeIException("ArrayType::setArrayInfo", "H5Tget_array_dims2 failed");
+
+ // Store the array's info in memory
+ rank = ndims;
+ dimensions = new hsize_t[rank];
+ for (int i = 0; i < rank; i++)
+ dimensions[i] = dims[i];
+ delete []dims;
+ }
+} // setArrayInfo
+
+//--------------------------------------------------------------------------
// Function: ArrayType::getArrayNDims
///\brief Returns the number of dimensions for an array datatype.
///\return Number of dimensions
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
+// Modification
+// Modified to use setArrayInfo().
+// If rank is positive, return rank
+// If rank is invalid but object has a valid identifier, obtain the
+// rank and dimensions, store them in the object, and return rank
+// Otherwise, i.e., rank is invalid and object doesn't have a
+// valid identifier, throw an exception
//--------------------------------------------------------------------------
int ArrayType::getArrayNDims()
{
- // If the array's rank has not been stored, i.e. rank is init to -1,
- // retrieve it via the C API
- if (rank < 0)
- {
- rank = H5Tget_array_ndims(id);
- if (rank < 0)
- {
- throw DataTypeIException("ArrayType::getArrayNDims", "H5Tget_array_ndims failed");
- }
- }
- return(rank);
+ // Validate the id first, this object could be a default object
+ if (!p_valid_id(id))
+ throw DataTypeIException("ArrayType::getArrayNDims", "ArrayType object is not a valid array type.");
+
+ // If the array's info has not been stored, i.e. "rank" still has its
+ // initial value, -1, and "dimensions" is still NULL, retrieve rank and
+ // dimensions via the C API and store them in this ArrayType object.
+ if (rank < 0 && dimensions == NULL)
+ setArrayInfo();
+
+ return(rank);
}
//--------------------------------------------------------------------------
@@ -139,25 +198,30 @@ int ArrayType::getArrayNDims()
///\return Number of dimensions
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
+// Modification
+// Jan, 2016
+// Modified to use setArrayInfo().
+// If the array information has not been stored, retrieve rank and
+// dimensions of the array type identified by "id" via the C API.
+// Copy "dimensions" to the user's buffer
//--------------------------------------------------------------------------
int ArrayType::getArrayDims(hsize_t* dims)
{
- // If the array's dimensions have not been stored, retrieve them via C API
- if (dimensions == NULL)
- {
- int ndims = H5Tget_array_dims2(id, dims);
- if (ndims < 0)
- throw DataTypeIException("ArrayType::getArrayDims", "H5Tget_array_dims2 failed");
- // Store the array's info in memory
- rank = ndims;
- dimensions = new hsize_t[rank];
- for (int i = 0; i < rank; i++)
- dimensions[i] = dims[i];
- }
- // Otherwise, simply copy what's in 'dimensions' to 'dims'
- for (int i = 0; i < rank; i++)
- dims[i] = dimensions[i];
- return(rank);
+ // Validate the id first, this object could be a default object
+ if (!p_valid_id(id))
+ throw DataTypeIException("ArrayType::getArrayDims", "ArrayType object is not a valid array type.");
+
+ // If the array's info has not been stored, i.e. "rank" still has its
+ // initial value, -1, and "dimensions" is still NULL, retrieve rank and
+ // dimensions via the C API and store them in this ArrayType object.
+ if (rank < 0 && dimensions == NULL)
+ setArrayInfo();
+
+ // Copy what's in "dimensions" to user's buffer "dims"
+ for (int i = 0; i < rank; i++)
+ dims[i] = dimensions[i];
+
+ return(rank);
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h
index 6577a6e..ddbb5e2 100644
--- a/c++/src/H5ArrayType.h
+++ b/c++/src/H5ArrayType.h
@@ -31,6 +31,12 @@ class H5_DLLCPP ArrayType : public DataType {
// specified base type.
ArrayType(const DataType& base_type, int ndims, const hsize_t* dims);
+ // Assignment operator
+ ArrayType& operator=(const ArrayType& rhs);
+
+ // Stores the rank and dimensions in memory.
+ void setArrayInfo();
+
// Returns the number of dimensions of this array datatype.
int getArrayNDims();
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index ea8c5bb..34489fa 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -60,9 +60,8 @@ Attribute::Attribute() : AbstractDs(), IdComponent(), id(H5I_INVALID_HID) {}
///\param original - IN: Original Attribute object to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Attribute::Attribute(const Attribute& original) : AbstractDs(), IdComponent()
+Attribute::Attribute(const Attribute& original) : AbstractDs(), IdComponent(), id(original.id)
{
- id = original.getId();
incRefCount(); // increment number of references to this id
}
@@ -74,9 +73,8 @@ Attribute::Attribute(const Attribute& original) : AbstractDs(), IdComponent()
///\exception H5::AttributeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Attribute::Attribute(const hid_t existing_id) : AbstractDs(), IdComponent()
+Attribute::Attribute(const hid_t existing_id) : AbstractDs(), IdComponent(), id(existing_id)
{
- id = existing_id;
incRefCount(); // increment number of references to this id
}
@@ -453,17 +451,18 @@ ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
}
//--------------------------------------------------------------------------
-// Function: Attribute::getName
-///\brief This function is replaced by the previous function, which
-/// provides more convenient prototype. It will be removed
-/// in future release.
-///\param len - IN: Desired length of the name
-///\param attr_name - OUT: Buffer for the name string
-///\return Actual length of the attribute name
-///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - Nov, 2001
+// Function: Attribute::getName
+// Purpose This function is replaced by the previous function, which
+// provides more convenient prototype. It will be removed
+// in future release.
+// Param len - IN: Desired length of the name
+// Param attr_name - OUT: Buffer for the name string
+// Return Actual length of the attribute name
+// Exception H5::AttributeIException
+// Programmer Binh-Minh Ribler - Nov, 2001
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
ssize_t Attribute::getName( size_t len, H5std_string& attr_name ) const
{
@@ -568,7 +567,7 @@ void Attribute::p_read_fixed_len(const DataType& mem_type, H5std_string& strg) c
// If there is data, allocate buffer and read it.
if (attr_size > 0)
{
- char *strg_C = new char[(size_t)attr_size+1];
+ char *strg_C = new char[attr_size+1];
herr_t ret_value = H5Aread(id, mem_type.getId(), strg_C);
if( ret_value < 0 )
{
diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp
index c88f6c1..339af54 100644
--- a/c++/src/H5CommonFG.cpp
+++ b/c++/src/H5CommonFG.cpp
@@ -68,21 +68,21 @@ using namespace std;
/// then a default size is chosen.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group CommonFG::createGroup( const char* name, size_t size_hint ) const
+ Group CommonFG::createGroup( const char* name, size_t size_hint ) const
{
- // Group creation property list for size_hint
- hid_t gcpl_id = 0;
-
- // Set the local heap size hint
- if(!(size_hint == (size_t)-1 || size_hint == 0)) {
+ // Group creation property list for size hint
+ hid_t gcpl_id = 0;
+ // Set the local heap size hint
+ if (size_hint > 0)
+ {
// If the creation of the property list failed, throw an exception
- if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
+ if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
throwException("createGroup", "H5Pcreate failed");
- if( H5Pset_local_heap_size_hint(gcpl_id, size_hint) < 0) {
+ if (H5Pset_local_heap_size_hint(gcpl_id, size_hint) < 0) {
H5Pclose(gcpl_id);
- throwException("createGroup", "H5Pset_local_heap_size failed");
+ throwException("createGroup", "H5Pset_local_heap_size_hint failed");
}
}
@@ -269,6 +269,9 @@ void CommonFG::link( H5L_type_t link_type, const char* curr_name, const char* ne
ret_value = H5Lcreate_soft( curr_name, getLocId(), new_name, H5P_DEFAULT, H5P_DEFAULT );
break;
+ case H5L_TYPE_ERROR:
+ case H5L_TYPE_EXTERNAL:
+ case H5L_TYPE_MAX:
default:
throwException("link", "unknown link type");
break;
@@ -328,7 +331,7 @@ void CommonFG::unlink( const H5std_string& name ) const
/// Exercise care in moving groups as it is possible to render
/// data in a file inaccessible with Group::move. Please refer
/// to the Group Interface in the HDF5 User's Guide for details at:
-/// http://www.hdfgroup.org/HDF5/doc/UG/UG_frame09Groups.html
+/// https://www.hdfgroup.org/HDF5/doc/UG/HDF5_Users_Guide-Responsive%20HTML5/index.html#t=HDF5_Users_Guide%2FGroups%2FHDF5_Groups.htm
// Programmer Binh-Minh Ribler - 2000
// Modification
// 2007: QAK modified to use H5L APIs - BMR
@@ -496,18 +499,21 @@ void CommonFG::mount(const char* name, const H5File& child, const PropList& plis
//--------------------------------------------------------------------------
// Function: CommonFG::mount
-///\brief 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 name - IN: Name of the group
-///\param child - IN: File to mount
-///\param plist - IN: Property list to use
-///\exception H5::FileIException or H5::GroupIException
+// 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 name - IN: Name of the group
+// Param child - IN: File to mount
+// Param plist - IN: Property list to use
+// Exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - 2000
+// Modification
+// Modified to call its replacement. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void CommonFG::mount(const char* name, H5File& child, PropList& plist) const
{
- mount(name, (const H5File)child, (const PropList)plist);
+ mount(name, child, plist);
}
//--------------------------------------------------------------------------
@@ -523,14 +529,17 @@ void CommonFG::mount(const H5std_string& name, const H5File& child, const PropLi
//--------------------------------------------------------------------------
// Function: CommonFG::mount
-///\brief 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.
+// 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.
// Programmer Binh-Minh Ribler - 2014
+// Modification
+// Modified to call its replacement. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void CommonFG::mount(const H5std_string& name, H5File& child, PropList& plist) const
{
- mount(name.c_str(), (const H5File)child, (const PropList)plist);
+ mount(name.c_str(), child, plist);
}
//--------------------------------------------------------------------------
@@ -1034,6 +1043,8 @@ H5O_type_t CommonFG::childObjType(const char* objname) const
case H5O_TYPE_NAMED_DATATYPE:
objtype = objinfo.type;
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
throwException("childObjType", "Unknown type of object");
}
@@ -1107,6 +1118,8 @@ H5O_type_t CommonFG::childObjType(hsize_t index, H5_index_t index_type, H5_iter_
case H5O_TYPE_NAMED_DATATYPE:
objtype = objinfo.type;
break;
+ case H5O_TYPE_UNKNOWN:
+ case H5O_TYPE_NTYPES:
default:
throwException("childObjType", "Unknown type of object");
}
@@ -1195,21 +1208,13 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx) const
///\return Object type
///\exception H5::FileIException or H5::GroupIException
// Programmer Binh-Minh Ribler - May, 2010
+// Modification
+// Modified to use the other function. -BMR, 2016/03/07
//--------------------------------------------------------------------------
H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
{
- H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
- switch (obj_type)
- {
- case H5G_LINK: HDstrcpy(type_name, "symbolic link"); break;
- case H5G_GROUP: HDstrcpy(type_name, "group"); break;
- case H5G_DATASET: HDstrcpy(type_name, "dataset"); break;
- case H5G_TYPE: HDstrcpy(type_name, "datatype"); break;
- case H5G_UNKNOWN:
- default:
- throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
- }
- return (obj_type);
+ H5std_string stype_name(type_name);
+ return(getObjTypeByIdx(idx, stype_name));
}
//--------------------------------------------------------------------------
// Function: CommonFG::getObjTypeByIdx
@@ -1224,18 +1229,22 @@ H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, char* type_name) const
//--------------------------------------------------------------------------
H5G_obj_t CommonFG::getObjTypeByIdx(hsize_t idx, H5std_string& type_name) const
{
- H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
- switch (obj_type)
- {
- case H5G_LINK: type_name = H5std_string("symbolic link"); break;
- case H5G_GROUP: type_name = H5std_string("group"); break;
- case H5G_DATASET: type_name = H5std_string("dataset"); break;
- case H5G_TYPE: type_name = H5std_string("datatype"); break;
- case H5G_UNKNOWN:
- default:
- throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
- }
- return (obj_type);
+ H5G_obj_t obj_type = H5Gget_objtype_by_idx(getLocId(), idx);
+ switch (obj_type)
+ {
+ case H5G_LINK: type_name = H5std_string("symbolic link"); break;
+ case H5G_GROUP: type_name = H5std_string("group"); break;
+ case H5G_DATASET: type_name = H5std_string("dataset"); break;
+ case H5G_TYPE: type_name = H5std_string("datatype"); break;
+ case H5G_UNKNOWN:
+ case H5G_UDLINK:
+ case H5G_RESERVED_5:
+ case H5G_RESERVED_6:
+ case H5G_RESERVED_7:
+ default:
+ throwException("getObjTypeByIdx", "H5Gget_objtype_by_idx failed");
+ }
+ return (obj_type);
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index 6d31a68..82575d6 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -228,12 +228,12 @@ hid_t CompType::p_get_member_type(unsigned member_num) const
DataType CompType::getMemberDataType( unsigned member_num ) const
{
try {
- DataType datatype;
+ DataType datatype;
f_DataType_setId(&datatype, p_get_member_type(member_num));
- return(datatype);
+ return(datatype);
}
catch (DataTypeIException E) {
- throw DataTypeIException("CompType::getMemberDataType", E.getDetailMsg());
+ throw DataTypeIException("CompType::getMemberDataType", E.getDetailMsg());
}
}
@@ -249,9 +249,10 @@ DataType CompType::getMemberDataType( unsigned member_num ) const
ArrayType CompType::getMemberArrayType( unsigned member_num ) const
{
try {
- ArrayType arraytype(p_get_member_type(member_num));
+ ArrayType arraytype;
f_DataType_setId(&arraytype, p_get_member_type(member_num));
- return(arraytype);
+ arraytype.setArrayInfo();
+ return(arraytype);
}
catch (DataTypeIException E) {
throw DataTypeIException("CompType::getMemberArrayType", E.getDetailMsg());
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 059da85..7305347 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -67,9 +67,8 @@ DataSet::DataSet() : H5Object(), AbstractDs(), id(H5I_INVALID_HID) {}
// when one of those objects is deleted, the id will be closed if
// the reference counter is only 1.
//--------------------------------------------------------------------------
-DataSet::DataSet(const hid_t existing_id) : H5Object(), AbstractDs()
+DataSet::DataSet(const hid_t existing_id) : H5Object(), AbstractDs(), id(existing_id)
{
- id = existing_id;
incRefCount(); // increment number of references to this id
}
@@ -79,9 +78,8 @@ DataSet::DataSet(const hid_t existing_id) : H5Object(), AbstractDs()
///\param original - IN: DataSet instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSet::DataSet(const DataSet& original) : H5Object(), AbstractDs()
+DataSet::DataSet(const DataSet& original) : H5Object(), AbstractDs(), id(original.id)
{
- id = original.getId();
incRefCount(); // increment number of references to this id
}
@@ -325,16 +323,19 @@ hsize_t DataSet::getVlenBufSize(const DataType& type, const DataSpace& space ) c
//--------------------------------------------------------------------------
// Function: DataSet::getVlenBufSize
-///\brief 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.
-///\return Amount of storage
-///\exception H5::DataSetIException
+// 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.
+// Return Amount of storage
+// Exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
+// Modification
+// Modified to call its replacement. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
hsize_t DataSet::getVlenBufSize( DataType& type, DataSpace& space ) const
{
- return(getVlenBufSize((const DataType)type, (const DataSpace)space));
+ return(getVlenBufSize(type, space));
}
//--------------------------------------------------------------------------
@@ -620,16 +621,19 @@ void DataSet::fillMemBuf(const void *fill, const DataType& fill_type, void *buf,
//--------------------------------------------------------------------------
// Function: DataSet::fillMemBuf
-///\brief 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 fill - IN: Pointer to fill value to use - default NULL
-///\param fill_type - IN: Datatype of the fill value
-///\param buf - IN/OUT: Memory buffer to fill selection within
-///\param buf_type - IN: Datatype of the elements in buffer
-///\param space - IN: Dataspace describing memory buffer & containing selection to use
-///\exception H5::DataSetIException
+// 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 fill - IN: Pointer to fill value to use - default NULL
+// Param fill_type - IN: Datatype of the fill value
+// Param buf - IN/OUT: Memory buffer to fill selection within
+// Param buf_type - IN: Datatype of the elements in buffer
+// Param space - IN: Dataspace describing memory buffer & containing selection to use
+// Exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
+// Modification
+// Modified to call its replacement. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(const void *fill, DataType& fill_type, void *buf, DataType& buf_type, DataSpace& space)
{
@@ -658,14 +662,17 @@ void DataSet::fillMemBuf(void *buf, const DataType& buf_type, const DataSpace& s
//--------------------------------------------------------------------------
// Function: DataSet::fillMemBuf
-///\brief 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 buf - IN/OUT: Memory buffer to fill selection within
-///\param buf_type - IN: Datatype of the elements in buffer
-///\param space - IN: Dataspace describing memory buffer & containing selection to use
-///\exception H5::DataSetIException
+// 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 buf - IN/OUT: Memory buffer to fill selection within
+// Param buf_type - IN: Datatype of the elements in buffer
+// Param space - IN: Dataspace describing memory buffer & containing selection to use
+// Exception H5::DataSetIException
// Programmer Binh-Minh Ribler - 2000
+// Modification
+// Modified to call its replacement. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void DataSet::fillMemBuf(void *buf, DataType& buf_type, DataSpace& space)
{
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 311180f..690f328 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -132,9 +132,8 @@ DataSpace::DataSpace( int rank, const hsize_t * dims, const hsize_t * maxdims) :
///\exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSpace::DataSpace(const hid_t existing_id) : IdComponent()
+DataSpace::DataSpace(const hid_t existing_id) : IdComponent(), id(existing_id)
{
- id = existing_id;
incRefCount(); // increment number of references to this id
}
@@ -144,9 +143,8 @@ DataSpace::DataSpace(const hid_t existing_id) : IdComponent()
///\param original - IN: DataSpace object to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSpace::DataSpace(const DataSpace& original) : IdComponent()
+DataSpace::DataSpace(const DataSpace& original) : IdComponent(), id(original.id)
{
- id = original.getId();
incRefCount(); // increment number of references to this id
}
@@ -342,16 +340,19 @@ void DataSpace::extentCopy (const DataSpace& dest_space) const
//--------------------------------------------------------------------------
// Function: DataSpace::extentCopy
-///\brief This is an overloaded member function, kept for backward
-/// compatibility. It differs from the above function in that it
-/// misses const. This wrapper will be removed in future release.
-///\param dest_space - IN: Dataspace to copy from
-///\exception H5::DataSpaceIException
+// Purpose This is an overloaded member function, kept for backward
+// compatibility. It differs from the above function in that it
+// misses const. This wrapper will be removed in future release.
+// Param dest_space - IN: Dataspace to copy from
+// Exception H5::DataSpaceIException
// Programmer Binh-Minh Ribler - 2000
+// Modification
+// Modified to call its replacement. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void DataSpace::extentCopy( DataSpace& dest_space ) const
{
- extentCopy((const DataSpace)dest_space);
+ extentCopy(dest_space);
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 1bbabe3..3e5ad0f 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -69,9 +69,8 @@ DataType::DataType() : H5Object(), id(H5I_INVALID_HID) {}
// Removed second argument, "predefined", after changing to the
// new ref counting mechanism that relies on C's ref counting.
//--------------------------------------------------------------------------
-DataType::DataType(const hid_t existing_id) : H5Object()
+DataType::DataType(const hid_t existing_id) : H5Object(), id(existing_id)
{
- id = existing_id;
incRefCount(); // increment number of references to this id
}
@@ -136,9 +135,8 @@ DataType::DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type,
///\brief Copy constructor: makes a copy of the original DataType object.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType::DataType(const DataType& original) : H5Object()
+DataType::DataType(const DataType& original) : H5Object(), id(original.id)
{
- id = original.getId();
incRefCount(); // increment number of references to this id
}
@@ -306,13 +304,16 @@ void DataType::commit(const H5Location& loc, const char* name)
//--------------------------------------------------------------------------
// Function: DataType::commit
-///\brief 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 loc - IN: A location (file, dataset, datatype, or group)
-///\param name - IN: Name of the datatype
-///\exception H5::DataTypeIException
+// 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 loc - IN: A location (file, dataset, datatype, or group)
+// Param name - IN: Name of the datatype
+// Exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jan, 2007
+// Modification
+// Planned for removal. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void DataType::commit(H5Location& loc, const char* name)
{
@@ -333,13 +334,16 @@ void DataType::commit(const H5Location& loc, const H5std_string& name)
//--------------------------------------------------------------------------
// Function: DataType::commit
-///\brief 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 loc - IN: A location (file, dataset, datatype, or group)
-///\param name - IN: Name of the datatype
-///\exception H5::DataTypeIException
+// 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 loc - IN: A location (file, dataset, datatype, or group)
+// Param name - IN: Name of the datatype
+// Exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jan, 2007
+// Modification
+// Planned for removal. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void DataType::commit(H5Location& loc, const H5std_string& name)
{
@@ -358,10 +362,10 @@ void DataType::commit(H5Location& loc, const H5std_string& name)
bool DataType::committed() const
{
// Call C function to determine if a datatype is a named one
- htri_t committed = H5Tcommitted( id );
- if( committed > 0 )
+ htri_t is_committed = H5Tcommitted( id );
+ if (is_committed > 0)
return true;
- else if( committed == 0 )
+ else if (is_committed == 0)
return false;
else
{
diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp
index 1ca059b..270b232 100644
--- a/c++/src/H5Exception.cpp
+++ b/c++/src/H5Exception.cpp
@@ -47,11 +47,7 @@ Exception::Exception(const H5std_string& func, const H5std_string& message) : de
///\param orig - IN: Exception instance to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Exception::Exception( const Exception& orig )
-{
- detail_message = orig.detail_message;
- func_name = orig.func_name;
-}
+Exception::Exception( const Exception& orig ) : detail_message(orig.detail_message), func_name(orig.func_name) {}
//--------------------------------------------------------------------------
// Function: Exception::getMajorString
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index d3d7811..c284500 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -330,20 +330,22 @@ void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccP
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
-///\brief 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 meta_plist - IN: File access plist for the metadata file
-///\param raw_plist - IN: File access plist for the raw data file
-///\param meta_ext - IN: Metadata filename extension as \c char*
-///\param raw_ext - IN: Raw data filename extension as \c char*
-///\exception H5::PropListIException
+// 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 meta_plist - IN: File access plist for the metadata file
+// Param raw_plist - IN: File access plist for the raw data file
+// Param meta_ext - IN: Metadata filename extension as \c char*
+// Param raw_ext - IN: Raw data filename extension as \c char*
+// Exception H5::PropListIException
// Programmer: Binh-Minh Ribler - April, 2004
-// Note: Retiring April, 2014
+// Modification
+// Planned for removal. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const char* meta_ext, const char* raw_ext ) const
{
- setSplit((const FileAccPropList)meta_plist, (const FileAccPropList)raw_plist, meta_ext, raw_ext);
+ setSplit(meta_plist, raw_plist, meta_ext, raw_ext);
}
//--------------------------------------------------------------------------
@@ -364,20 +366,21 @@ void FileAccPropList::setSplit(const FileAccPropList& meta_plist, const FileAccP
//--------------------------------------------------------------------------
// Function: FileAccPropList::setSplit
-///\brief 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 meta_plist - IN: File access plist for the metadata file
-///\param raw_plist - IN: File access plist for the raw data file
-///\param meta_ext - IN: Metadata filename extension as \c string
-///\param raw_ext - IN: Raw data filename extension as \c string
-///\exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
-// Note: Retiring April, 2014
+// 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 meta_plist - IN: File access plist for the metadata file
+// Param raw_plist - IN: File access plist for the raw data file
+// Param meta_ext - IN: Metadata filename extension as \c char*
+// Param raw_ext - IN: Raw data filename extension as \c char*
+// Exception H5::PropListIException
+// Modification
+// Planned for removal. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void FileAccPropList::setSplit(FileAccPropList& meta_plist, FileAccPropList& raw_plist, const H5std_string& meta_ext, const H5std_string& raw_ext ) const
{
- setSplit((const FileAccPropList)meta_plist, (const FileAccPropList)raw_plist, meta_ext.c_str(), raw_ext.c_str() );
+ setSplit(meta_plist, raw_plist, meta_ext.c_str(), raw_ext.c_str() );
}
// Stream Virtual File Driver had been removed from the main library.
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index b6e9f51..dcf03c2 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -472,15 +472,17 @@ void H5File::getVFDHandle(const FileAccPropList& fapl, void **file_handle) const
//--------------------------------------------------------------------------
// Function: H5File::getVFDHandle
-///\brief This is an overloaded member function, kept for backward
-/// compatibility. It differs from the above function in that it
-/// misses const. 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
+// 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
// Programmer Binh-Minh Ribler - May 2004
-// Note: Retiring April, 2014
+// Modification
+// Planned for removal. -BMR, 2014/04/16
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
void H5File::getVFDHandle(FileAccPropList& fapl, void **file_handle) const
{
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 0823d0e..f9aabcb 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -60,9 +60,8 @@ Group::Group() : H5Object(), CommonFG(), id(H5I_INVALID_HID) {}
///\param original - IN: Original group to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group::Group(const Group& original) : H5Object(), CommonFG()
+Group::Group(const Group& original) : H5Object(), CommonFG(), id(original.id)
{
- id = original.getId();
incRefCount(); // increment number of references to this id
}
@@ -83,9 +82,8 @@ hid_t Group::getLocId() const
///\param existing_id - IN: Id of an existing group
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Group::Group(const hid_t existing_id) : H5Object(), CommonFG()
+Group::Group(const hid_t existing_id) : H5Object(), CommonFG(), id(existing_id)
{
- id = existing_id;
incRefCount(); // increment number of references to this id
}
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index 40c766a..be80fe4 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -262,10 +262,10 @@ void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim,
}
// Default constructor - private
-H5Library::H5Library(){};
+H5Library::H5Library(){}
// Destructor - private
-H5Library::~H5Library(){};
+H5Library::~H5Library(){}
#ifndef H5_NO_NAMESPACE
} // end namespace
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index b4c88ed..e2b68ae 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -50,7 +50,7 @@ extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name,
#ifdef NO_STATIC_CAST
UserData4Aiterate* myData = (UserData4Aiterate *) op_data;
#else
- UserData4Aiterate* myData = static_cast <UserData4Aiterate *> (op_data);
+ UserData4Aiterate* myData = reinterpret_cast<UserData4Aiterate *> (op_data);
#endif
myData->op( *myData->location, s_attr_name, myData->opData );
return 0;
@@ -190,7 +190,7 @@ Attribute H5Location::openAttribute( const H5std_string& name ) const
Attribute H5Location::openAttribute( const unsigned int idx ) const
{
hid_t attr_id = H5Aopen_by_idx(getId(), ".", H5_INDEX_CRT_ORDER,
- H5_ITER_INC, (hsize_t)idx, H5P_DEFAULT, H5P_DEFAULT);
+ H5_ITER_INC, static_cast<hsize_t>(idx), H5P_DEFAULT, H5P_DEFAULT);
if( attr_id > 0 )
{
Attribute attr;
@@ -232,7 +232,7 @@ int H5Location::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_
// call the C library routine H5Aiterate2 to iterate the attributes
hsize_t idx = _idx ? (hsize_t)*_idx : 0;
int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx,
- userAttrOpWrpr, (void *) userData);
+ userAttrOpWrpr, reinterpret_cast<void *>(userData));
// release memory
delete userData;
@@ -240,7 +240,7 @@ int H5Location::iterateAttrs( attr_operator_t user_op, unsigned *_idx, void *op_
if( ret_value >= 0 ) {
/* Pass back update index value to calling code */
if (_idx)
- *_idx = (unsigned)idx;
+ *_idx = static_cast<unsigned>(idx);
return( ret_value );
}
@@ -262,7 +262,7 @@ int H5Location::getNumAttrs() const
if(H5Oget_info(getId(), &oinfo) < 0)
throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed");
else
- return( (int)oinfo.num_attrs );
+ return(static_cast<int>(oinfo.num_attrs));
}
//--------------------------------------------------------------------------
@@ -517,7 +517,7 @@ ssize_t H5Location::getComment(const char* name, size_t buf_size, char* comment)
}
// If the comment is longer than the provided buffer size, the C library
// will not null terminate it
- if ((size_t)comment_len >= buf_size)
+ if (static_cast<size_t>(comment_len) >= buf_size)
comment[buf_size-1] = '\0';
// Return the actual comment length, which might be different from buf_size
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp
index 35e34b5..3cce9fe 100644
--- a/c++/src/H5Object.cpp
+++ b/c++/src/H5Object.cpp
@@ -109,7 +109,7 @@ H5std_string H5Object::getObjName() const
H5std_string obj_name(""); // object name to return
// Preliminary call to get the size of the object name
- ssize_t name_size = H5Iget_name(getId(), NULL, (size_t)0);
+ ssize_t name_size = H5Iget_name(getId(), NULL, static_cast<size_t>(0));
// If H5Iget_name failed, throw exception
if (name_size < 0)
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index 807aa0a..b954191 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -104,9 +104,8 @@ PropList::PropList() : IdComponent(), id(H5P_DEFAULT) {}
///\param original - IN: The original property list to copy
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-PropList::PropList(const PropList& original) : IdComponent()
+PropList::PropList(const PropList& original) : IdComponent(), id(original.id)
{
- id = original.getId();
incRefCount(); // increment number of references to this id
}
@@ -593,7 +592,7 @@ void PropList::setProperty(const char* name, void* value) const
//--------------------------------------------------------------------------
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, (void*)charptr);
if (ret_value < 0)
{
throw PropListIException(inMemFunc("setProperty"), "H5Pset failed");
diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp
index b067746..3cfa342 100644
--- a/c++/src/H5StrType.cpp
+++ b/c++/src/H5StrType.cpp
@@ -58,10 +58,10 @@ StrType::StrType( const PredType& pred_type ) : AtomType()
//--------------------------------------------------------------------------
// Function: StrType overloaded constructor
-///\brief Creates a string datatype with a specified length
-///\param pred_type - IN: String predefined type to replicate.
-///\param size - IN: Length of the new string type
-///\exception H5::DataTypeIException
+// Purpose Creates a string datatype with a specified length
+// Param pred_type - IN: String predefined type to replicate.
+// Param size - IN: Length of the new string type
+// Exception H5::DataTypeIException
// Description
// The 1st argument could have been skipped, but this
// constructor will collide with the one that takes an
@@ -71,10 +71,13 @@ StrType::StrType( const PredType& pred_type ) : AtomType()
// avoid the clashing problem, that doesn't eliminate the
// the 1st argument but it's simpler for the user to type
// a '0' than PredType::C_S1. - Dec 2, 2005
-///\note
-/// The use of this constructor can be shortened by using
-/// its overloaded below as StrType(0, size).
+// Note
+// The use of this constructor can be shortened by using
+// its overloaded below as StrType(0, size).
// Programmer Binh-Minh Ribler - 2000
+// Modification
+// Planned for removal. -BMR, 2005/12/02
+// Removed from documentation. -BMR, 2016/03/07
//--------------------------------------------------------------------------
StrType::StrType( const PredType& pred_type, const size_t& size ) : AtomType()
{
@@ -96,8 +99,8 @@ StrType::StrType( const PredType& pred_type, const size_t& size ) : AtomType()
/// previous constructor, such as:
/// StrType atype(0, size) instead of
/// StrType atype(PredType::C_S1, size)
-///\note
-/// This constructor may replace the previous one in the future.
+// Note
+// This constructor replaced the previous one.
// Programmer Binh-Minh Ribler - Nov 28, 2005
//--------------------------------------------------------------------------
StrType::StrType( const int dummy, const size_t& size ) : AtomType()
diff --git a/c++/src/Makefile.am b/c++/src/Makefile.am
index 84af348..6cd4768 100644
--- a/c++/src/Makefile.am
+++ b/c++/src/Makefile.am
@@ -28,7 +28,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src
lib_LTLIBRARIES=libhdf5_cpp.la
# Add libtool numbers to the HDF5 C++ library (from config/lt_vers.am)
-libhdf5_cpp_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS)
+libhdf5_cpp_la_LDFLAGS= -version-info $(LT_CXX_VERS_INTERFACE):$(LT_CXX_VERS_REVISION):$(LT_CXX_VERS_AGE) $(AM_LDFLAGS)
bin_SCRIPTS=h5c++
diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config
index 7060fd2..623f9c7 100644
--- a/c++/src/cpp_doc_config
+++ b/c++/src/cpp_doc_config
@@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = "1.9.233 currently under development"
+PROJECT_NUMBER = "1.9.234 currently under development"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a