summaryrefslogtreecommitdiffstats
path: root/c++/src/H5CompType.cpp
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
commit6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch)
tree5a7a112fe7a8a98c6fecb45b513789d15962eb3d /c++/src/H5CompType.cpp
parent6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff)
downloadhdf5-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/H5CompType.cpp')
-rw-r--r--c++/src/H5CompType.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp
index aed4b58..9990087 100644
--- a/c++/src/H5CompType.cpp
+++ b/c++/src/H5CompType.cpp
@@ -89,7 +89,7 @@ CompType::CompType( const DataSet& dataset ) : DataType()
//--------------------------------------------------------------------------
// Function: CompType::getNmembers
-///\brief Returns the number of members in this compound datatype.
+///\brief Returns the number of members in this compound datatype.
///\return Number of members
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
@@ -99,7 +99,7 @@ int CompType::getNmembers() const
int num_members = H5Tget_nmembers( id );
if( num_members < 0 )
{
- throw DataTypeIException("CompType::getNmembers",
+ throw DataTypeIException("CompType::getNmembers",
"H5Tget_nmembers returns negative number of members");
}
return( num_members );
@@ -107,7 +107,7 @@ int CompType::getNmembers() const
//--------------------------------------------------------------------------
// Function: CompType::getMemberName
-///\brief Returns the name of a member in this compound datatype.
+///\brief Returns the name of a member in this compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return Name of member
///\exception H5::DataTypeIException
@@ -118,23 +118,23 @@ string CompType::getMemberName( unsigned member_num ) const
char* member_name_C = H5Tget_member_name( id, member_num );
if( member_name_C == NULL ) // NULL means failure
{
- throw DataTypeIException("CompType::getMemberName",
+ throw DataTypeIException("CompType::getMemberName",
"H5Tget_member_name returns NULL for member name");
}
- string member_name = string(member_name_C); // convert C string to string
- HDfree(member_name_C); // free the C string
+ string member_name = string(member_name_C); // convert C string to string
+ HDfree(member_name_C); // free the C string
return( member_name ); // return the member name string
}
//--------------------------------------------------------------------------
// Function: CompType::getMemberIndex
-///\brief Returns the index of a member in this compound datatype.
+///\brief Returns the index of a member in this compound datatype.
///\param name - IN: Name of the member
///\return Index of member
///\exception H5::DataTypeIException
///\par Description
-/// Members are stored in no particular order with numbers 0
-/// through N-1, where N is the value returned by the member
+/// Members are stored in no particular order with numbers 0
+/// through N-1, where N is the value returned by the member
/// function \c CompType::getNmembers.
// Programmer Binh-Minh Ribler - May 16, 2002
//--------------------------------------------------------------------------
@@ -143,7 +143,7 @@ int CompType::getMemberIndex(const char* name) const
int member_index = H5Tget_member_index(id, name);
if( member_index < 0 )
{
- throw DataTypeIException("CompType::getMemberIndex",
+ throw DataTypeIException("CompType::getMemberIndex",
"H5Tget_member_index returns negative value");
}
return( member_index );
@@ -162,8 +162,8 @@ int CompType::getMemberIndex(const string& name) const
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
// Description
-/// Members are stored in no particular order with numbers 0
-/// through N-1, where N is the value returned by the member
+/// Members are stored in no particular order with numbers 0
+/// through N-1, where N is the value returned by the member
/// function \c CompType::getNmembers.
//
// Note that byte offset being returned as 0 doesn't indicate
@@ -175,11 +175,11 @@ size_t CompType::getMemberOffset( unsigned member_num ) const
return( offset );
}
-// Returns the dimensionality of the member.
+// 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
+ return (-1); // unreachable statement; but without it, the compiler
// will complain
}
@@ -204,7 +204,7 @@ H5T_class_t CompType::getMemberClass( unsigned member_num ) const
return(member_class);
}
-// This private member function calls the C API to get the identifier
+// This private member function calls the C API to get the identifier
// of the specified member. It provides the id to construct appropriate
// sub-types in the functions getMemberXxxType below, where Xxx indicates
// the sub-types.
@@ -224,8 +224,8 @@ hid_t CompType::p_get_member_type(unsigned member_num) const
//--------------------------------------------------------------------------
// Function: CompType::getMemberDataType
-///\brief Returns the generic datatype of the specified member in this
-/// compound datatype.
+///\brief Returns the generic datatype of the specified member in this
+/// compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return DataType instance
///\exception H5::DataTypeIException
@@ -234,7 +234,7 @@ hid_t CompType::p_get_member_type(unsigned member_num) const
DataType CompType::getMemberDataType( unsigned member_num ) const
{
try {
- DataType datatype(p_get_member_type(member_num));
+ DataType datatype(p_get_member_type(member_num));
return(datatype);
}
catch (DataTypeIException E) {
@@ -264,8 +264,8 @@ ArrayType CompType::getMemberArrayType( unsigned member_num ) const
//--------------------------------------------------------------------------
// Function: CompType::getMemberEnumType
-///\brief Returns the enumeration datatype of the specified member in
-/// this compound datatype.
+///\brief Returns the enumeration datatype of the specified member in
+/// this compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return EnumType instance
///\exception H5::DataTypeIException
@@ -274,7 +274,7 @@ ArrayType CompType::getMemberArrayType( unsigned member_num ) const
EnumType CompType::getMemberEnumType( unsigned member_num ) const
{
try {
- EnumType enumtype(p_get_member_type(member_num));
+ EnumType enumtype(p_get_member_type(member_num));
return(enumtype);
}
catch (DataTypeIException E) {
@@ -284,8 +284,8 @@ EnumType CompType::getMemberEnumType( unsigned member_num ) const
//--------------------------------------------------------------------------
// Function: CompType::getMemberCompType
-///\brief Returns the compound datatype of the specified member in this
-/// compound datatype.
+///\brief Returns the compound datatype of the specified member in this
+/// compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return CompType instance
///\exception H5::DataTypeIException
@@ -294,7 +294,7 @@ EnumType CompType::getMemberEnumType( unsigned member_num ) const
CompType CompType::getMemberCompType( unsigned member_num ) const
{
try {
- CompType comptype(p_get_member_type(member_num));
+ CompType comptype(p_get_member_type(member_num));
return(comptype);
}
catch (DataTypeIException E) {
@@ -304,8 +304,8 @@ CompType CompType::getMemberCompType( unsigned member_num ) const
//--------------------------------------------------------------------------
// Function: CompType::getMemberIntType
-///\brief Returns the integer datatype of the specified member in this
-/// compound datatype.
+///\brief Returns the integer datatype of the specified member in this
+/// compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return IntType instance
///\exception H5::DataTypeIException
@@ -314,7 +314,7 @@ CompType CompType::getMemberCompType( unsigned member_num ) const
IntType CompType::getMemberIntType( unsigned member_num ) const
{
try {
- IntType inttype(p_get_member_type(member_num));
+ IntType inttype(p_get_member_type(member_num));
return(inttype);
}
catch (DataTypeIException E) {
@@ -324,8 +324,8 @@ IntType CompType::getMemberIntType( unsigned member_num ) const
//--------------------------------------------------------------------------
// Function: CompType::getMemberFloatType
-///\brief Returns the floating-point datatype of the specified member
-/// in this compound datatype.
+///\brief Returns the floating-point datatype of the specified member
+/// in this compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return FloatType instance
///\exception H5::DataTypeIException
@@ -334,7 +334,7 @@ IntType CompType::getMemberIntType( unsigned member_num ) const
FloatType CompType::getMemberFloatType( unsigned member_num ) const
{
try {
- FloatType floatype(p_get_member_type(member_num));
+ FloatType floatype(p_get_member_type(member_num));
return(floatype);
}
catch (DataTypeIException E) {
@@ -344,8 +344,8 @@ FloatType CompType::getMemberFloatType( unsigned member_num ) const
//--------------------------------------------------------------------------
// Function: CompType::getMemberStrType
-///\brief Returns the string datatype of the specified member in this
-/// compound datatype.
+///\brief Returns the string datatype of the specified member in this
+/// compound datatype.
///\param member_num - IN: Zero-based index of the member
///\return StrType instance
///\exception H5::DataTypeIException
@@ -354,13 +354,13 @@ FloatType CompType::getMemberFloatType( unsigned member_num ) const
StrType CompType::getMemberStrType( unsigned member_num ) const
{
try {
- StrType strtype(p_get_member_type(member_num));
+ StrType strtype(p_get_member_type(member_num));
return(strtype);
}
catch (DataTypeIException E) {
throw DataTypeIException("CompType::getMemberStrType", E.getDetailMsg());
}
-}
+}
//--------------------------------------------------------------------------
// Function: CompType::getMemberVarLenType
@@ -382,35 +382,35 @@ VarLenType CompType::getMemberVarLenType( unsigned member_num ) const
}
}
-/* old style of getMemberType - using overloads; new style above
+/* old style of getMemberType - using overloads; new style above
returns the appropriate datatypes but has different named functions.
In the old style, a datatype must be passed into the function.
May, 2004: These should be reconsidered to provide more convenience.
-// Returns the datatype of the specified member in this compound datatype.
+// Returns the datatype of the specified member in this compound datatype.
// Several overloading of getMemberType are for different datatypes
void CompType::getMemberType( unsigned member_num, EnumType& enumtype ) const
{
- p_get_member_type(member_num, enumtype);
+ p_get_member_type(member_num, enumtype);
}
void CompType::getMemberType( unsigned member_num, CompType& comptype ) const
{
- p_get_member_type(member_num, comptype);
+ p_get_member_type(member_num, comptype);
}
void CompType::getMemberType( unsigned member_num, IntType& inttype ) const
{
- p_get_member_type(member_num, inttype);
+ p_get_member_type(member_num, inttype);
}
void CompType::getMemberType( unsigned member_num, FloatType& floatype ) const
{
- p_get_member_type(member_num, floatype);
+ p_get_member_type(member_num, floatype);
}
void CompType::getMemberType( unsigned member_num, StrType& strtype ) const
{
- p_get_member_type(member_num, strtype);
+ p_get_member_type(member_num, strtype);
}
// end of overloading of getMemberType
*/
@@ -442,7 +442,7 @@ void CompType::insertMember( const string& name, size_t offset, const DataType&
//--------------------------------------------------------------------------
// Function: CompType::pack
-///\brief Recursively removes padding from within a compound datatype.
+///\brief Recursively removes padding from within a compound datatype.
///
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000