[svn-r25061] Description:
Put back overloaded functions for backward compatibility:
- were replaced by better prototyped versions, such as Attribute::getName.
- were modified to add const to constant arguments.
Added notes for future removal in documentation.
Platforms tested:
Linux/ppc64 (ostrich)
Linux/32 2.6 (jam)
SunOS 5.11 (emu)
This commit is contained in:
@@ -377,6 +377,27 @@ H5std_string Attribute::getName() const
|
||||
return(attr_name);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getName
|
||||
///\brief This is an overloaded member function, provided for convenience.
|
||||
/// It differs from the above function in that it takes an integer
|
||||
/// specifying a desired length to be retrieved of the name.
|
||||
///\return Name (or part of name) of the attribute
|
||||
///\param len - IN: Desired length of the name
|
||||
///\exception H5::AttributeIException
|
||||
// Programmer Binh-Minh Ribler - 2000
|
||||
// Modification
|
||||
// Mar 2014 - BMR
|
||||
// Revised to use the new getName() below
|
||||
//--------------------------------------------------------------------------
|
||||
H5std_string Attribute::getName(size_t len) const
|
||||
{
|
||||
H5std_string attr_name;
|
||||
ssize_t name_size = getName(attr_name, len);
|
||||
return(attr_name);
|
||||
// let caller catch exception if any
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getName
|
||||
///\brief Gets the name of this attribute, returning its length.
|
||||
@@ -391,7 +412,8 @@ H5std_string Attribute::getName() const
|
||||
// Programmer Binh-Minh Ribler - Nov, 2001
|
||||
// Modification
|
||||
// Mar 2014 - BMR
|
||||
// Revised to allow the argument "len" to be skipped
|
||||
// Added to replace getName(size_t, H5std_string&) so that it'll
|
||||
// allow the argument "len" to be skipped.
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
|
||||
{
|
||||
@@ -424,6 +446,24 @@ ssize_t Attribute::getName(H5std_string& attr_name, size_t len) const
|
||||
return(name_size);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// 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
|
||||
// Modification
|
||||
// Modified to call its replacement. -BMR, 2014/04/16
|
||||
//--------------------------------------------------------------------------
|
||||
ssize_t Attribute::getName( size_t len, H5std_string& attr_name ) const
|
||||
{
|
||||
return (getName(attr_name, len));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Function: Attribute::getStorageSize
|
||||
///\brief Returns the amount of storage size required for this attribute.
|
||||
|
||||
Reference in New Issue
Block a user