Exemple #1
0
// Determines whether two datatype identifiers refer to the same datatype.
// htri_t H5Tequal( hid_t dtype_id1, hid_t dtype_id2 )
func (t *DataType) Equal(o *DataType) bool {
	v := int(C.H5Tequal(t.id, o.id))
	if v > 0 {
		return true
	}
	return false
}
Exemple #2
0
func checkArrayType(tid C.hid_t, bid C.hid_t) error {
	if cid := C.H5Tget_class(tid); cid < 0 {
		return errors.New("cannot get a data class")
	} else if cid != C.H5T_ARRAY {
		return errors.New("expected an array datatype")
	}

	if tid := C.H5Tget_super(tid); tid < 0 { // Close?
		return errors.New("cannot get the base type of a datatype")
	} else if C.H5Tequal(bid, tid) == 0 {
		return errors.New("the types do not match")
	}

	return nil
}
Exemple #3
0
// Equal determines whether two datatype identifiers refer to the same datatype.
func (t *Datatype) Equal(o *Datatype) bool {
	return C.H5Tequal(t.id, o.id) > 0
}