diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
commit | 6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch) | |
tree | 5a7a112fe7a8a98c6fecb45b513789d15962eb3d /c++/src/H5DataType.cpp | |
parent | 6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff) | |
download | hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.zip hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.gz hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.bz2 |
[svn-r11245] Purpose:
Code cleanup
Description:
Trim trailing whitespace, which is making 'diff'ing the two branches
difficult.
Solution:
Ran this script in each directory:
foreach f (*.[ch] *.cpp)
sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
end
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest
Diffstat (limited to 'c++/src/H5DataType.cpp')
-rw-r--r-- | c++/src/H5DataType.cpp | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index 28668a46..62dca0f 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -43,11 +43,11 @@ namespace H5 { ///\param predefined - IN: Indicates whether or not this datatype is /// a predefined datatype; default to \c false // Description -// Constructor creates a copy of an existing DataType using -// its id. The argument "predefined" is default to false; -// when a default datatype is created, this argument is set -// to true so H5Tclose will not be called on it later. - need -// a reassessment after changing to the new ref counting mech. +// Constructor creates a copy of an existing DataType using +// its id. The argument "predefined" is default to false; +// when a default datatype is created, this argument is set +// to true so H5Tclose will not be called on it later. - need +// a reassessment after changing to the new ref counting mech. // - BMR 5/2004 // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -125,8 +125,8 @@ void DataType::copy( const DataType& like_type ) ///\return Reference to DataType instance ///\exception H5::DataTypeIException // Description -// Makes a copy of the type on the right hand side and stores -// the new id in the left hand side object. +// Makes a copy of the type on the right hand side and stores +// the new id in the left hand side object. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- DataType& DataType::operator=( const DataType& rhs ) @@ -137,7 +137,7 @@ DataType& DataType::operator=( const DataType& rhs ) //-------------------------------------------------------------------------- // Function: DataType::operator== -///\brief Compares this DataType against the given one to determines +///\brief Compares this DataType against the given one to determines /// whether the two objects refer to the same actual datatype. ///\param compared_type - IN: Reference to the datatype to compare ///\return true if the datatypes are equal, and false, otherwise. @@ -146,7 +146,7 @@ DataType& DataType::operator=( const DataType& rhs ) //-------------------------------------------------------------------------- bool DataType::operator==(const DataType& compared_type ) const { - // Call C routine H5Tequal to determines whether two datatype + // Call C routine H5Tequal to determines whether two datatype // identifiers refer to the same datatype htri_t ret_value = H5Tequal( id, compared_type.getId() ); if( ret_value > 0 ) @@ -161,7 +161,7 @@ bool DataType::operator==(const DataType& compared_type ) const //-------------------------------------------------------------------------- // Function: DataType::commit -///\brief Commits a transient datatype to a file, creating a new +///\brief Commits a transient datatype to a file, creating a new /// named datatype ///\param loc - IN: Either a file or a group ///\param name - IN: Name of the datatype @@ -172,7 +172,7 @@ void DataType::commit(CommonFG& loc, const char* name) const { hid_t loc_id = loc.getLocId(); // get location id for C API - // Call C routine to commit the transient datatype + // Call C routine to commit the transient datatype herr_t ret_value = H5Tcommit( loc_id, name, id ); if( ret_value < 0 ) { @@ -183,7 +183,7 @@ void DataType::commit(CommonFG& loc, const char* name) const //-------------------------------------------------------------------------- // Function: DataType::commit ///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function only in the type of the +/// It differs from the above function only in the type of the /// argument \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -194,8 +194,8 @@ void DataType::commit(CommonFG& loc, const string& name) const //-------------------------------------------------------------------------- // Function: DataType::committed -///\brief Determines whether a datatype is a named type or a -/// transient type. +///\brief Determines whether a datatype is a named type or a +/// transient type. ///\return true if the datatype is a named type, and false, otherwise. ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 @@ -216,11 +216,11 @@ bool DataType::committed() const //-------------------------------------------------------------------------- // Function: DataType::find -///\brief Finds a conversion function that can handle a conversion +///\brief Finds a conversion function that can handle a conversion /// from this datatype to the specified datatype, \a dest. ///\param dest - IN: Destination datatype ///\param pcdata - IN: Pointer to type conversion data -///\return Pointer to a suitable conversion function +///\return Pointer to a suitable conversion function ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -237,14 +237,14 @@ H5T_conv_t DataType::find( const DataType& dest, H5T_cdata_t **pcdata ) const //-------------------------------------------------------------------------- // Function: DataType::convert -///\brief Converts data from this datatype to the specified datatypes. +///\brief Converts data from this datatype to the specified datatypes. ///\param dest - IN: Destination datatype ///\param nelmts - IN: Size of array \a buf -///\param buf - IN/OUT: Array containing pre- and post-conversion +///\param buf - IN/OUT: Array containing pre- and post-conversion /// values ///\param background - IN: Optional backgroud buffer ///\param plist - IN: Dataset transfer property list -///\return Pointer to a suitable conversion function +///\return Pointer to a suitable conversion function ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -269,8 +269,8 @@ void DataType::convert( const DataType& dest, size_t nelmts, void *buf, void *ba /// ///\exception H5::DataTypeIException ///\par Descrition -/// This is normally done by the library for predefined data -/// types so the application doesn't inadvertently change or +/// This is normally done by the library for predefined data +/// types so the application doesn't inadvertently change or /// delete a predefined type. /// /// Once a data type is locked it can never be unlocked unless @@ -289,7 +289,7 @@ void DataType::lock() const //-------------------------------------------------------------------------- // Function: DataType::getClass -///\brief Returns the datatype class identifier. +///\brief Returns the datatype class identifier. ///\return Datatype class identifier ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 @@ -308,7 +308,7 @@ H5T_class_t DataType::getClass() const //-------------------------------------------------------------------------- // Function: DataType::getSize -///\brief Returns the size of a datatype. +///\brief Returns the size of a datatype. ///\return Datatype size in bytes ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 @@ -326,7 +326,7 @@ size_t DataType::getSize() const //-------------------------------------------------------------------------- // Function: DataType::getSuper -///\brief Returns the base datatype from which a datatype is derived. +///\brief Returns the base datatype from which a datatype is derived. ///\return DataType object ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 @@ -334,7 +334,7 @@ size_t DataType::getSize() const DataType DataType::getSuper() const { // Call C routine to get the base datatype from which the specified - // datatype is derived. + // datatype is derived. hid_t base_type_id = H5Tget_super( id ); // If H5Tget_super returns a valid datatype id, create and return @@ -352,14 +352,14 @@ DataType DataType::getSuper() const //-------------------------------------------------------------------------- // Function: DataType::registerFunc -///\brief Registers the specified conversion function. +///\brief Registers the specified conversion function. ///\param pers - IN: Conversion option /// \li \c H5T_PERS_HARD for hard conversion functions -/// \li \c H5T_PERS_SOFT for soft conversion functions. -///\param name - IN: Name displayed in diagnostic output. +/// \li \c H5T_PERS_SOFT for soft conversion functions. +///\param name - IN: Name displayed in diagnostic output. ///\param dest - IN: Destination datatype. -///\param func - IN: Function to convert between source and -/// destination datatypes. +///\param func - IN: Function to convert between source and +/// destination datatypes. ///\exception H5::DataTypeIException ///\par Description /// For more information, please see: @@ -381,7 +381,7 @@ void DataType::registerFunc( H5T_pers_t pers, const char* name, const DataType& //-------------------------------------------------------------------------- // Function: DataType::registerFunc ///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function only in the type of the +/// It differs from the above function only in the type of the /// argument \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -392,14 +392,14 @@ void DataType::registerFunc( H5T_pers_t pers, const string& name, const DataType //-------------------------------------------------------------------------- // Function: DataType::unregister -///\brief Removes a conversion function from all conversion paths. +///\brief Removes a conversion function from all conversion paths. ///\param pers - IN: Conversion option /// \li \c H5T_PERS_HARD for hard conversion functions -/// \li \c H5T_PERS_SOFT for soft conversion functions. -///\param name - IN: Name displayed in diagnostic output. +/// \li \c H5T_PERS_SOFT for soft conversion functions. +///\param name - IN: Name displayed in diagnostic output. ///\param dest - IN: Destination datatype. -///\param func - IN: Function to convert between source and -/// destination datatypes. +///\param func - IN: Function to convert between source and +/// destination datatypes. ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -407,7 +407,7 @@ void DataType::unregister( H5T_pers_t pers, const char* name, const DataType& de { hid_t dest_id = dest.getId(); // get id of the dest datatype for C API - // Call C routine H5Tunregister to remove the conversion function + // Call C routine H5Tunregister to remove the conversion function herr_t ret_value = H5Tunregister( pers, name, id, dest_id, func ); if( ret_value < 0 ) { @@ -418,7 +418,7 @@ void DataType::unregister( H5T_pers_t pers, const char* name, const DataType& de //-------------------------------------------------------------------------- // Function: DataType::unregister ///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function only in the type of the +/// It differs from the above function only in the type of the /// argument \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -429,15 +429,15 @@ void DataType::unregister( H5T_pers_t pers, const string& name, const DataType& //-------------------------------------------------------------------------- // Function: DataType::setTag -///\brief Tags an opaque datatype. -///\param tag - IN: Descriptive ASCII string with which the opaque -/// datatype is to be tagged. +///\brief Tags an opaque datatype. +///\param tag - IN: Descriptive ASCII string with which the opaque +/// datatype is to be tagged. ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- void DataType::setTag( const char* tag ) const { - // Call C routine H5Tset_tag to tag an opaque datatype. + // Call C routine H5Tset_tag to tag an opaque datatype. herr_t ret_value = H5Tset_tag( id, tag ); if( ret_value < 0 ) { @@ -448,7 +448,7 @@ void DataType::setTag( const char* tag ) const //-------------------------------------------------------------------------- // Function: DataType::setTag ///\brief This is an overloaded member function, provided for convenience. -/// It differs from the above function only in the type of the +/// It differs from the above function only in the type of the /// argument \a name. // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- @@ -459,7 +459,7 @@ void DataType::setTag( const string& tag ) const //-------------------------------------------------------------------------- // Function: DataType::getTag -///\brief Gets the tag associated with an opaque datatype. +///\brief Gets the tag associated with an opaque datatype. ///\return Tag associated with the opaque datatype ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 @@ -473,8 +473,8 @@ string DataType::getTag() const if( tag_Cstr != NULL ) { string tag = string(tag_Cstr); // convert C string to string object - HDfree(tag_Cstr); // free the C string - return (tag); // return the tag + HDfree(tag_Cstr); // free the C string + return (tag); // return the tag } else { @@ -486,7 +486,7 @@ string DataType::getTag() const // Function: DataType::detectClass ///\brief Checks whether a datatype contains (or is) a certain type of /// datatype. -///\return true if this datatype contains or is the specified type, +///\return true if this datatype contains or is the specified type, /// and false, otherwise. ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May, 2004 @@ -507,7 +507,7 @@ bool DataType::detectClass(H5T_class_t cls) const //-------------------------------------------------------------------------- // Function: DataType::isVariableStr ///\brief Check whether this datatype is a variable-length string. -///\return true if this datatype is a variable-length string, and +///\return true if this datatype is a variable-length string, and /// false, otherwise. ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May, 2004 @@ -554,7 +554,7 @@ void* DataType::Reference(const char* name, DataSpace& dataspace, H5R_type_t ref ///\return A reference ///\exception H5::DataTypeIException ///\par Description -// This function passes H5R_OBJECT and -1 to the protected +// This function passes H5R_OBJECT and -1 to the protected // function for it to pass to the C API H5Rcreate // to create a reference to the named object. // Programmer Binh-Minh Ribler - May, 2004 @@ -589,10 +589,10 @@ void* DataType::Reference(const string& name) const ///\param ref - IN: Reference to query ///\param ref_type - IN: Type of reference to query ///\return Object type, which can be one of the following: -/// \li \c H5G_LINK Object is a symbolic link. -/// \li \c H5G_GROUP Object is a group. -/// \li \c H5G_DATASET Object is a dataset. -/// \li \c H5G_TYPE Object is a named datatype +/// \li \c H5G_LINK Object is a symbolic link. +/// \li \c H5G_GROUP Object is a group. +/// \li \c H5G_DATASET Object is a dataset. +/// \li \c H5G_TYPE Object is a named datatype ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - May, 2004 //-------------------------------------------------------------------------- @@ -659,7 +659,7 @@ void DataType::close() // ID reference counting mechanism - June 1, 2004 //-------------------------------------------------------------------------- DataType::~DataType() -{ +{ // The datatype id will be closed properly if( is_predtype == false ) { try { @@ -669,7 +669,7 @@ DataType::~DataType() cerr << inMemFunc("~DataType - ") << close_error.getDetailMsg() << endl; } } -} +} #ifndef H5_NO_NAMESPACE } // end namespace |