示例#1
0
//--------------------------------------------------------------------------
// Function:	CompType::getMemberFloatType
///\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
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType CompType::getMemberFloatType( unsigned member_num ) const
{
   try {
      FloatType floatype(p_get_member_type(member_num));
      return(floatype);
   }
   catch (DataTypeIException E) {
      throw DataTypeIException("CompType::getMemberFloatType", E.getDetailMsg());
   }
}
示例#2
0
//--------------------------------------------------------------------------
// Function:	AbstractDs::getFloatType
///\brief	Returns the floating-point datatype of this abstract dataset,
///		which can be a dataset or an attribute.
///\return	FloatType instance
///\exception	H5::DataTypeIException
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType AbstractDs::getFloatType() const
{
    // Gets the id of the datatype used by this dataset or attribute using
    // p_get_type.  p_get_type calls either H5Dget_type or H5Aget_type
    // depending on which object invokes getFloatType.  Then, create and
    // return the FloatType object
    try {
        FloatType floatype(p_get_type());
        return(floatype);
    }
    catch (DataSetIException E) {
        throw DataTypeIException("DataSet::getFloatType", E.getDetailMsg());
    }
    catch (AttributeIException E) {
        throw DataTypeIException("Attribute::getFloatType", E.getDetailMsg());
    }
}