bes Updated for version 3.20.13
h5get.h File Reference
#include "hdf5_handler.h"
#include "h5common.h"
#include "h5apicompatible.h"
Include dependency graph for h5get.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool check_dimscale (hid_t fid)
 
bool check_h5str (hid_t)
 
bool check_str_attr_value (hid_t attr_id, hid_t atype_id, const string &value_to_compare, bool is_substr)
 
void close_fileid (hid_t fid)
 
D4AttributeType daptype_strrep_to_dap4_attrtype (const std::string &s)
 
hid_t get_attr_info (hid_t dset, int index, bool, DSattr_t *attr_inst, bool *)
 
libdap::BaseType * Get_bt (const std::string &vname, const std::string &var_path, const std::string &dataset, hid_t datatype, bool is_dap4)
 
std::string get_dap_type (hid_t type, bool)
 
void get_dataset (hid_t pid, const std::string &dname, DS_t *dt_inst_ptr)
 
void get_dataset_dmr (const hid_t file_id, hid_t pid, const std::string &dname, DS_t *dt_inst_ptr, bool has_dimscale, bool &is_pure_dims, std::vector< link_info_t > &)
 
hid_t get_fileid (const char *filename)
 
libdap::Structure * Get_structure (const std::string &varname, const std::string &var_path, const std::string &dataset, hid_t datatype, bool is_dap4)
 
bool has_dimscale_attr (hid_t dataset)
 
void obtain_dimnames (const hid_t file_id, hid_t dset, int, DS_t *dt_inst_ptr, std::vector< link_info_t > &)
 
std::string obtain_shortest_ancestor_path (const std::vector< std::string > &)
 
std::string print_attr (hid_t type, int loc, void *sm_buf)
 
void write_vlen_str_attrs (hid_t attr_id, hid_t ty_id, const DSattr_t *, libdap::D4Attribute *d4_attr, libdap::AttrTable *d2_attr, bool is_dap4)
 

Detailed Description

Helper functions to generate DDS/DAS/DODS for the default option.

Definition in file h5get.h.

Function Documentation

◆ check_dimscale()

bool check_dimscale ( hid_t  fid)

Definition at line 1502 of file h5get.cc.

◆ check_h5str()

bool check_h5str ( hid_t  h5type)
Author
Hyo-Kyung Lee hyokl.nosp@m.ee@h.nosp@m.dfgro.nosp@m.up.o.nosp@m.rg
Muqun Yang ymuqu.nosp@m.n@hd.nosp@m.fgrou.nosp@m.p.or.nosp@m.g

checks if type is HDF5 string type

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

Definition at line 849 of file h5get.cc.

◆ check_str_attr_value()

bool check_str_attr_value ( hid_t  attr_id,
hid_t  atype_id,
const string &  value_to_compare,
bool  is_substr 
)

Definition at line 2226 of file h5get.cc.

◆ close_fileid()

void 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 434 of file h5get.cc.

◆ get_attr_info()

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

will get attribute information.

This function will get attribute information: datatype, dataspace(dimension sizes) and number of dimensions and put it into a data struct.

Parameters
[in]dsetdataset id
[in]indexindex of attribute
[in]is_dap4is this for DAP4
[out]attr_inst_ptran attribute instance pointer
[out]ignoreptra flag to record whether it can be ignored.
Returns
pointer to attribute structure
Exceptions
InternalError

Definition at line 90 of file h5get.cc.

◆ get_dap_type()

std::string get_dap_type ( hid_t  type,
bool  is_dap4 
)

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. Return type is different for DAP2 and DAP4.

Returns
string
Parameters
typedatatype id
is_dap4is this for DAP4(for the calls from DMR-related routines)

Definition at line 292 of file h5get.cc.

◆ get_fileid()

hid_t 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 412 of file h5get.cc.

◆ has_dimscale_attr()

bool has_dimscale_attr ( hid_t  dataset)

Definition at line 1586 of file h5get.cc.

◆ obtain_shortest_ancestor_path()

std::string obtain_shortest_ancestor_path ( const std::vector< std::string > &  hls)

Definition at line 2385 of file h5get.cc.

◆ print_attr()

std::string print_attr ( hid_t  type,
int  loc,
void *  sm_buf 
)

will get the printed representation of an attribute.

Parameters
typeHDF5 data type id
locthe number of array number
sm_bufpointer to an attribute
Returns
a string

Definition at line 868 of file h5get.cc.