コード例 #1
0
ファイル: h5p.go プロジェクト: jonlawlor/go-hdf5
// 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
}
コード例 #2
0
ファイル: h5p.go プロジェクト: 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
}