31#include "config_hdf5.h"
34#include <libdap/InternalErr.h>
42HDF5CFUInt32::HDF5CFUInt32(
const string &n,
const string &d) :
UInt32(n, d)
46HDF5CFUInt32::HDF5CFUInt32(
const string &n,
const string &d,
const string &d_f) :
UInt32(n, d), filename(d_f)
50BaseType *HDF5CFUInt32::ptr_duplicate()
52 auto HDF5CFUInt32_unique = make_unique<HDF5CFUInt32>(*
this);
53 return HDF5CFUInt32_unique.release();
56bool HDF5CFUInt32::read()
58 BESDEBUG(
"h5",
"Coming to HDF5CFUInt32 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 unsigned 32-bit integer to DAP uint32 for the CF option.
void get_data(hid_t dset, void *buf)