Example #1
0
// NewPropList creates a new PropList as an instance of a property list class.
func NewPropList(cls_id PropType) (*PropList, error) {
	hid := C.H5Pcreate(C.hid_t(cls_id))
	if err := checkID(hid); err != nil {
		return nil, err
	}
	return newPropList(hid), nil
}
Example #2
0
File: h5p.go Project: pauh/go-hdf5
// Creates a new property as an instance of a property list class.
// hid_t H5Pcreate(hid_t cls_id )
func NewPropList(cls_id PropType) (*PropList, error) {
	hid := C.H5Pcreate(C.hid_t(cls_id))
	err := h5err(C.herr_t(int(hid)))
	if err != nil {
		return nil, err
	}
	p := new_proplist(hid)
	return p, err
}