OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
h5get.cc File Reference

iterates all HDF5 internals. More...

#include "h5get.h"
Include dependency graph for h5get.cc:

Go to the source code of this file.

Functions

bool check_h5str (hid_t h5type)
 checks if type is HDF5 string type More...
 
void close_fileid (hid_t fid)
 closes HDF5 file reffered by fid. More...
 
hid_t get_attr_info (hid_t dset, int index, DSattr_t *attr_inst_ptr, bool *ignore_attr_ptr)
 
string get_dap_type (hid_t type)
 returns the string representation of HDF5 type. More...
 
void get_data (hid_t dset, void *buf)
 will get all data of a dset dataset and put it into buf. More...
 
void get_dataset (hid_t pid, const string &dname, DS_t *dt_inst_ptr)
 obtain data information in a dataset datatype, dataspace(dimension sizes) and number of dimensions and put these information into a pointer of data struct. More...
 
hid_t get_fileid (const char *filename)
 gets HDF5 file id. More...
 
int get_slabdata (hid_t dset, int *offset, int *step, int *count, int num_dim, void *buf)
 will get hyperslab data of a dataset and put it into buf. More...
 
void get_strdata (int strindex, char *allbuf, char *buf, int elesize)
 will get an individual string data from all string data elements and put it into buf. More...
 

Detailed Description

iterates all HDF5 internals.

This file includes all the routines to search HDF5 group, dataset, links, and attributes. since we are using HDF5 C APIs, we include all c functions in this file.

Author
Hyo-Kyung Lee hyokl.nosp@m.ee@h.nosp@m.dfgro.nosp@m.up.o.nosp@m.rg
Muqun Yang myang.nosp@m.6@hd.nosp@m.fgrou.nosp@m.p.or.nosp@m.g

Definition in file h5get.cc.

Function Documentation

check_h5str ( hid_t  h5type)

checks if type is HDF5 string type

Parameters
h5typedata type id
Returns
true if type is string
false otherwise

Definition at line 802 of file h5get.cc.

close_fileid ( hid_t  fid)

closes HDF5 file reffered by fid.

This function closes the HDF5 file.

Parameters
fidHDF5 file id
Returns
throws an error if it can't close the file.

Definition at line 356 of file h5get.cc.

Referenced by HDF4RequestHandler::hdf4_build_das(), HDF4RequestHandler::hdf4_build_data(), HDF4RequestHandler::hdf4_build_data_with_IDs(), HDF4RequestHandler::hdf4_build_dds(), HDF5RequestHandler::hdf5_build_das(), HDF5RequestHandler::hdf5_build_data(), and HDF5RequestHandler::hdf5_build_dds().

hid_t get_attr_info ( hid_t  dset,
int  index,
DSattr_t attr_inst_ptr,
bool *  ignore_attr_ptr 
)

Definition at line 56 of file h5get.cc.

References DODS_MAX_RANK, and NULL.

Referenced by read_objects().

get_dap_type ( hid_t  type)

returns the string representation of HDF5 type.

This function will get the text representation(string) of the corresponding DODS datatype. DODS-HDF5 subclass method will use this function.

Returns
string
Parameters
typedatatype id

Definition at line 237 of file h5get.cc.

Referenced by HDF5Float32::read(), HDF5Byte::read(), HDF5UInt16::read(), HDF5UInt32::read(), HDF5Int32::read(), HDF5Int16::read(), HDF5Float64::read(), HDF5Str::read(), HDF5Array::read(), and read_objects().

get_data ( hid_t  dset,
void *  buf 
)

will get all data of a dset dataset and put it into buf.

Parameters
[in]dsetdataset id(dset)
[out]bufpointer to a buffer

Definition at line 521 of file h5get.cc.

Referenced by HDF5Float32::read(), HDF5Byte::read(), HDF5UInt16::read(), HDF5UInt32::read(), HDF5Int32::read(), HDF5Int16::read(), HDF5Float64::read(), HDF5Str::read(), and HDF5Array::read().

get_dataset ( hid_t  pid,
const string &  dname,
DS_t dt_inst_ptr 
)

obtain data information in a dataset datatype, dataspace(dimension sizes) and number of dimensions and put these information into a pointer of data struct.

Parameters
[in]pidparent object id(group id)
[in]dnamedataset name
[out]dt_inst_ptrpointer to the attribute struct(* attr_inst_ptr)

Definition at line 374 of file h5get.cc.

References DODS_MAX_RANK.

Referenced by depth_first().

get_fileid ( const char *  filename)

gets HDF5 file id.

This function is used because H5Fopen cannot be directly used in a C++ code.

Parameters
filenameHDF5 filename
Returns
a file handler id

Definition at line 334 of file h5get.cc.

Referenced by HDF5RequestHandler::hdf5_build_das(), HDF5RequestHandler::hdf5_build_data(), and HDF5RequestHandler::hdf5_build_dds().

get_slabdata ( hid_t  dset,
int *  offset,
int *  step,
int *  count,
int  num_dim,
void *  buf 
)

will get hyperslab data of a dataset and put it into buf.

Parameters
[in]dsetdataset id
[in]offsetstarting point
[in]stepstride
[in]countcount
[in]num_dimnumber of array dimensions
[out]bufpointer to a buffer

Definition at line 661 of file h5get.cc.

References NULL.

Referenced by HDF5Array::read().

get_strdata ( int  strindex,
char *  allbuf,
char *  buf,
int  elesize 
)

will get an individual string data from all string data elements and put it into buf.

Parameters
[in]strindexindex of H5T_STRING array
[in]allbufpointer to string buffer that has been built so far
[in]elesizesize of string element in the array
[out]bufpointer to a buf
Returns
void

Definition at line 632 of file h5get.cc.