35#include <libdap/InternalErr.h>
42HDF5CFUInt64::HDF5CFUInt64(
const string &n,
const string &d) : UInt64(n, d)
46HDF5CFUInt64::HDF5CFUInt64(
const string &n,
const string &d,
const string &d_f) : UInt64(n, d),filename(d_f)
49BaseType *HDF5CFUInt64::ptr_duplicate()
51 auto HDF5CFUInt64_unique = make_unique<HDF5CFUInt64>(*
this);
52 return HDF5CFUInt64_unique.release();
55bool HDF5CFUInt64::read()
58 BESDEBUG(
"h5",
"Coming to HDF5CFUInt64 read "<<endl);
63 hid_t file_id = H5Fopen(filename.c_str(),H5F_ACC_RDONLY,H5P_DEFAULT);
65 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the HDF5 file ID .");
69 dset_id = H5Dopen2(file_id,dataset().c_str(),H5P_DEFAULT);
73 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the dataset .");
84 if (H5Dclose(dset_id) < 0) {
85 throw InternalErr(__FILE__, __LINE__,
"Unable to close the dset.");
This class provides a way to map HDF5 64-bit unsigned integer to DAP4 UInt64 for the CF option.
void get_data(hid_t dset, void *buf)