mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[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)
This commit is contained in:
parent
e2cf3a6b1a
commit
c02f067558
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -570,7 +570,6 @@ void* DataType::Reference(const char* name) const
|
||||
catch (IdComponentException E) {
|
||||
throw DataTypeIException(inMemFunc("Reference"), E.getDetailMsg());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
@ -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();
|
||||
|
@ -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 );
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user