summaryrefslogtreecommitdiffstats
path: root/c++/src/H5AtomType.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2005-03-14 19:32:26 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2005-03-14 19:32:26 (GMT)
commit49fa4563ef21009a05c11da5e05d0e71d2c24366 (patch)
tree73f57a583375fef27b3616e0febaa786394c7ae5 /c++/src/H5AtomType.cpp
parent7e6577fdea9f78e4b140f2b1c7684c9cec7d9a7e (diff)
downloadhdf5-49fa4563ef21009a05c11da5e05d0e71d2c24366.zip
hdf5-49fa4563ef21009a05c11da5e05d0e71d2c24366.tar.gz
hdf5-49fa4563ef21009a05c11da5e05d0e71d2c24366.tar.bz2
[svn-r10212] Purpose: Added more wrappers
Description: Added the following to the C++ library + overloaded functions: string CommonFG::getObjnameByIdx(hsize_t idx) H5T_order_t AtomType::getOrder() + wrappers for H5*close + wrappers for H5Arename, H5Aget_storage_size, and H5Dget_storage_size Platforms tested: Linux 2.4 (heping) AIX 5.1 (copper) SunOS 5.8 64-bit (sol)
Diffstat (limited to 'c++/src/H5AtomType.cpp')
-rw-r--r--c++/src/H5AtomType.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp
index 902d07c..c8c38e9 100644
--- a/c++/src/H5AtomType.cpp
+++ b/c++/src/H5AtomType.cpp
@@ -73,15 +73,14 @@ void AtomType::setSize( size_t size ) const
//--------------------------------------------------------------------------
// Function: AtomType::getOrder
///\brief Returns the byte order of an atomic datatype.
-///\param order_string - OUT: Text description of the returned byte order
///\return Byte order, which can be:
/// \li \c H5T_ORDER_LE
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
-H5T_order_t AtomType::getOrder( string& order_string ) const
+H5T_order_t AtomType::getOrder() const
{
// Call C routine to get the byte ordering
H5T_order_t type_order = H5Tget_order( id );
@@ -92,6 +91,32 @@ H5T_order_t AtomType::getOrder( string& order_string ) const
throw DataTypeIException("AtomType::getOrder",
"H5Tget_order returns H5T_ORDER_ERROR");
}
+ return( type_order );
+}
+
+//--------------------------------------------------------------------------
+// Function: AtomType::getOrder
+///\brief This is an overloaded member function, provided for convenience.
+/// It takes a reference to a \c std::string for the buffer that
+/// provide the text description of the returned byte order.
+/// The text description can be either of the following:
+/// "Little endian byte ordering (0)";
+/// "Big endian byte ordering (1)";
+/// "VAX mixed byte ordering (2)";
+///\param order_string - OUT: Text description of the returned byte order
+///\return Byte order, which can be:
+/// \li \c H5T_ORDER_LE
+/// \li \c H5T_ORDER_BE
+/// \li \c H5T_ORDER_VAX
+///\exception H5::DataTypeIException
+// Programmer Binh-Minh Ribler - 2000
+//--------------------------------------------------------------------------
+H5T_order_t AtomType::getOrder( string& order_string ) const
+{
+ // Call the overloaded to get the type order without text
+ H5T_order_t type_order = getOrder();
+
+ // Then provide the text and return the type order
if( type_order == H5T_ORDER_LE )
order_string = "Little endian byte ordering (0)";
else if( type_order == H5T_ORDER_BE )