summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2005-10-12 07:36:33 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2005-10-12 07:36:33 (GMT)
commitc02f0675589d12c331302e9c7a38d9b194f05417 (patch)
treeb43cbc3f23b1b5f87ef4e8a3485b23921a7a1713
parente2cf3a6b1a1c45471fce6c2d5d3a97d92103c714 (diff)
downloadhdf5-c02f0675589d12c331302e9c7a38d9b194f05417.zip
hdf5-c02f0675589d12c331302e9c7a38d9b194f05417.tar.gz
hdf5-c02f0675589d12c331302e9c7a38d9b194f05417.tar.bz2
[svn-r11555] Purpose: Code cleanup
Description: Removed obsolete function CompType::getMemberDims. Fixed some typos. Platforms tested: Linux 2.4 (heping) SunOS 5.8 64-bit (sol)
-rw-r--r--c++/src/H5CompType.cpp8
-rw-r--r--c++/src/H5CompType.h3
-rw-r--r--c++/src/H5DataType.cpp1
-rw-r--r--c++/src/H5IdComponent.h15
-rw-r--r--c++/src/H5PredType.h6
-rw-r--r--c++/src/H5PropList.cpp2
-rw-r--r--c++/src/H5PropList.h4
7 files changed, 9 insertions, 30 deletions
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index e692abe..e7106e5 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -175,14 +175,6 @@ size_t CompType::getMemberOffset( unsigned member_num ) const
return( offset );
}
-// Returns the dimensionality of the member.
-int CompType::getMemberDims( unsigned member_num, size_t* dims, int* perm ) const
-{
- throw DataTypeIException( "Error: getMemberDims is no longer supported." );
- return (-1); // unreachable statement; but without it, the compiler
- // will complain
-}
-
//--------------------------------------------------------------------------
// Function: CompType::getMemberClass
///\brief Gets the type class of the specified member.
diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h
index 45d5968..ccf4fe9 100644
--- a/c++/src/H5CompType.h
+++ b/c++/src/H5CompType.h
@@ -36,9 +36,6 @@ class H5_DLLCPP CompType : public DataType {
// to create another datatype of the same class
H5T_class_t getMemberClass( unsigned member_num ) const;
- // Returns the dimensionality of the specified member.
- int getMemberDims( unsigned member_num, size_t* dims, int* perm ) const;
-
// Returns the index of a member in this compound data type.
int getMemberIndex(const char* name) const;
int getMemberIndex(const string& name) const;
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index b4906cb..7eaed51 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -570,7 +570,6 @@ void* DataType::Reference(const char* name) const
catch (IdComponentException E) {
throw DataTypeIException(inMemFunc("Reference"), E.getDetailMsg());
}
-
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index 181677a..118eafa 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -20,6 +20,9 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
+#ifndef H5_NO_STD
+ using std::string;
+#endif // H5_NO_STD
#endif
class H5_DLLCPP IdComponent {
@@ -61,18 +64,10 @@ class H5_DLLCPP IdComponent {
// Makes and returns the string "<class-name>::<func_name>";
// <class-name> is returned by fromClass().
-#ifdef H5_NO_STD
string inMemFunc(const char* func_name) const;
-#else
- std::string inMemFunc(const char* func_name) const;
-#endif // H5_NO_STD
// Returns this class name.
-#ifdef H5_NO_STD
virtual string fromClass() const {return ("IdComponent");}
-#else
- virtual std::string fromClass() const {return ("IdComponent");}
-#endif // H5_NO_STD
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -87,11 +82,7 @@ class H5_DLLCPP IdComponent {
IdComponent();
// Gets the name of the file, in which an HDF5 object belongs.
-#ifdef H5_NO_STD
string p_get_file_name() const;
-#else
- std::string p_get_file_name() const;
-#endif // H5_NO_STD
// Gets the id of the H5 file in which the given object is located.
hid_t p_get_file_id();
diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h
index aed3c72..407e4a6 100644
--- a/c++/src/H5PredType.h
+++ b/c++/src/H5PredType.h
@@ -27,6 +27,9 @@ namespace H5 {
class H5_DLLCPP PredType : public AtomType {
public:
+ // Returns this class name
+ virtual string fromClass () const { return ("PredType"); }
+
// Makes a copy of the predefined type and stores the new
// id in the left hand side object.
PredType& operator=( const PredType& rhs );
@@ -180,9 +183,6 @@ class H5_DLLCPP PredType : public AtomType {
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Returns this class name
- virtual string fromClass () const { return ("PredType"); }
-
// These dummy functions do not inherit from DataType - they'll
// throw a DataTypeIException if invoked.
void commit( H5Object& loc, const string& name );
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index 9e8c3f6..8a92f6d 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -606,7 +606,7 @@ bool PropList::operator==(const PropList& rhs) const
PropList PropList::getClassParent() const
{
hid_t class_id = H5Pget_class_parent(id);
- if (class_id <= 0)
+ if (class_id < 0)
{
throw PropListIException(inMemFunc("getClassParent"), "H5Pget_class_parent failed");
}
diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h
index c6c7b1e..f820518 100644
--- a/c++/src/H5PropList.h
+++ b/c++/src/H5PropList.h
@@ -35,8 +35,8 @@ class H5_DLLCPP PropList : public IdComponent {
// Compares this property list or class against the given list or class.
bool operator==(const PropList& rhs) const;
- // Close this property list.
- virtual void close();
+ // Close this property list.
+ virtual void close();
// Close a property list class.
void closeClass() const;