35#include <libdap/InternalErr.h>
41HDF5CFInt64::HDF5CFInt64(
const string &n,
const string &d) : Int64(n, d)
45HDF5CFInt64::HDF5CFInt64(
const string &n,
const string &d,
const string &d_f) : Int64(n, d),filename(d_f)
48BaseType *HDF5CFInt64::ptr_duplicate()
50 auto HDF5CFInt64_unique = make_unique<HDF5CFInt64>(*
this);
51 return HDF5CFInt64_unique.release();
54bool HDF5CFInt64::read()
57 BESDEBUG(
"h5",
"Coming to HDF5CFInt64 read "<<endl);
62 hid_t file_id = H5Fopen(filename.c_str(),H5F_ACC_RDONLY,H5P_DEFAULT);
64 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the HDF5 file ID .");
68 dset_id = H5Dopen2(file_id,dataset().c_str(),H5P_DEFAULT);
72 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the dataset .");
83 if (H5Dclose(dset_id) < 0) {
84 throw InternalErr(__FILE__, __LINE__,
"Unable to close the dset.");
This class provides a way to map HDF5 64-bit integer to DAP4 Int64 for the CF option.
void get_data(hid_t dset, void *buf)