41#include "config_hdf5.h"
43#include <libdap/InternalErr.h>
50HDF5Int8::HDF5Int8(
const string & n,
const string &vpath,
const string &d):Int8(n, d),var_path(vpath)
64 hid_t file_id = H5Fopen(dataset().c_str(),H5F_ACC_RDONLY,H5P_DEFAULT);
66 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the HDF5 file ID .");
71 dset_id = H5Dopen2(file_id,var_path.c_str(),H5P_DEFAULT);
73 dset_id = H5Dopen2(file_id,name().c_str(),H5P_DEFAULT);
77 throw InternalErr(__FILE__,__LINE__,
"Fail to obtain the datatype .");
87 if (H5Dclose(dset_id) < 0) {
88 throw InternalErr(__FILE__, __LINE__,
"Unable to close the dset.");
This class provides a way to map HDF5 int8 to DAP Int8 for the default option.
libdap::BaseType * ptr_duplicate() override
HDF5Int8(const std::string &n, const std::string &vpath, const std::string &d)
Constructor.
bool read() override
Reads HDF5 int8 data into local buffer.
void get_data(hid_t dset, void *buf)
Data structure and retrieval processing header for the default option.