//-------------------------------------------------------------------------- // Function: CompType::getMemberEnumType ///\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 // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType CompType::getMemberEnumType( unsigned member_num ) const { try { EnumType enumtype(p_get_member_type(member_num)); return(enumtype); } catch (DataTypeIException E) { throw DataTypeIException("CompType::getMemberEnumType", E.getDetailMsg()); } }
//-------------------------------------------------------------------------- // Function: AbstractDs::getEnumType ///\brief Returns the enumeration datatype of this abstract dataset which /// can be a dataset or an attribute. ///\return EnumType instance ///\exception H5::DataTypeIException // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- EnumType AbstractDs::getEnumType() 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 getEnumType. Then, create and // return the EnumType object try { EnumType enumtype(p_get_type()); return(enumtype); } catch (DataSetIException E) { throw DataTypeIException("DataSet::getEnumType", E.getDetailMsg()); } catch (AttributeIException E) { throw DataTypeIException("Attribute::getEnumType", E.getDetailMsg()); } }