#include "h5get.h"
#include "HDF5Int32.h"
#include "HDF5UInt32.h"
#include "HDF5UInt16.h"
#include "HDF5Int16.h"
#include "HDF5Byte.h"
#include "HDF5Int8.h"
#include "HDF5Int64.h"
#include "HDF5UInt64.h"
#include "HDF5Array.h"
#include "HDF5Str.h"
#include "HDF5Float32.h"
#include "HDF5Float64.h"
#include "HDF5Url.h"
#include "HDF5Structure.h"
#include "HDF5RequestHandler.h"
#include <BESDebug.h>
#include <math.h>
#include <sstream>
Go to the source code of this file.
|
bool | check_dimscale (hid_t fileid) |
|
bool | check_h5str (hid_t h5type) |
|
bool | check_str_attr_value (hid_t attr_id, hid_t atype_id, const string &value_to_compare, bool check_substr) |
|
void | close_fileid (hid_t fid) |
|
D4AttributeType | daptype_strrep_to_dap4_attrtype (const string &s) |
|
hid_t | get_attr_info (hid_t dset, int index, bool is_dap4, DSattr_t *attr_inst_ptr, bool *ignore_attr_ptr) |
|
BaseType * | Get_bt (const string &vname, const string &vpath, const string &dataset, hid_t datatype, bool is_dap4) |
|
string | get_dap_type (hid_t type, bool is_dap4) |
|
void | get_dataset (hid_t pid, const string &dname, DS_t *dt_inst_ptr) |
|
void | get_dataset_dmr (const hid_t file_id, hid_t pid, const string &dname, DS_t *dt_inst_ptr, bool use_dimscale, bool &is_pure_dim, vector< link_info_t > &hdf5_hls) |
|
hid_t | get_fileid (const char *filename) |
|
Structure * | Get_structure (const string &varname, const string &vpath, const 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 ndims, DS_t *dt_inst_ptr, vector< link_info_t > &hdf5_hls) |
|
std::string | obtain_shortest_ancestor_path (const std::vector< std::string > &hls) |
|
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 *attr_inst_ptr, D4Attribute *d4_attr, AttrTable *d2_attr, bool is_dap4) |
|
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.
◆ check_dimscale()
bool check_dimscale |
( |
hid_t |
fileid | ) |
|
◆ check_h5str()
check_h5str |
( |
hid_t |
h5type | ) |
|
checks if type is HDF5 string type
- Parameters
-
- 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 |
check_substr |
|
) |
| |
◆ close_fileid()
close_fileid |
( |
hid_t |
fid | ) |
|
closes HDF5 file reffered by fid.
This function closes the HDF5 file.
- Parameters
-
- Returns
- throws an error if it can't close the file.
Definition at line 434 of file h5get.cc.
◆ daptype_strrep_to_dap4_attrtype()
D4AttributeType daptype_strrep_to_dap4_attrtype |
( |
const string & |
s | ) |
|
◆ get_attr_info()
get_attr_info |
( |
hid_t |
dset, |
|
|
int |
index, |
|
|
bool |
is_dap4, |
|
|
DSattr_t * |
attr_inst_ptr, |
|
|
bool * |
ignoreptr |
|
) |
| |
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] | dset | dataset id |
[in] | index | index of attribute |
[in] | is_dap4 | is this for DAP4 |
[out] | attr_inst_ptr | an attribute instance pointer |
[out] | ignoreptr | a flag to record whether it can be ignored. |
- Returns
- pointer to attribute structure
- Exceptions
-
Definition at line 90 of file h5get.cc.
◆ Get_bt()
BaseType * Get_bt |
( |
const string & |
vname, |
|
|
const string & |
vpath, |
|
|
const string & |
dataset, |
|
|
hid_t |
datatype, |
|
|
bool |
is_dap4 |
|
) |
| |
◆ get_dap_type()
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
-
type | datatype id |
is_dap4 | is this for DAP4(for the calls from DMR-related routines) |
Definition at line 292 of file h5get.cc.
◆ get_dataset()
get_dataset |
( |
hid_t |
pid, |
|
|
const string & |
dname, |
|
|
DS_t * |
dt_inst_ptr |
|
) |
| |
For DAP2, 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] | pid | parent object id(group id) |
[in] | dname | dataset name |
[out] | dt_inst_ptr | pointer to the attribute struct(* attr_inst_ptr) |
Definition at line 453 of file h5get.cc.
◆ get_dataset_dmr()
void get_dataset_dmr |
( |
const hid_t |
file_id, |
|
|
hid_t |
pid, |
|
|
const string & |
dname, |
|
|
DS_t * |
dt_inst_ptr, |
|
|
bool |
use_dimscale, |
|
|
bool & |
is_pure_dim, |
|
|
vector< link_info_t > & |
hdf5_hls |
|
) |
| |
◆ get_fileid()
get_fileid |
( |
const char * |
filename | ) |
|
gets HDF5 file id.
This function is used because H5Fopen cannot be directly used in a C++ code.
- Parameters
-
- Returns
- a file handler id
Definition at line 412 of file h5get.cc.
◆ Get_structure()
Structure * Get_structure |
( |
const string & |
varname, |
|
|
const string & |
vpath, |
|
|
const string & |
dataset, |
|
|
hid_t |
datatype, |
|
|
bool |
is_dap4 |
|
) |
| |
◆ has_dimscale_attr()
bool has_dimscale_attr |
( |
hid_t |
dataset | ) |
|
◆ obtain_dimnames()
void obtain_dimnames |
( |
const hid_t |
file_id, |
|
|
hid_t |
dset, |
|
|
int |
ndims, |
|
|
DS_t * |
dt_inst_ptr, |
|
|
vector< link_info_t > & |
hdf5_hls |
|
) |
| |
◆ obtain_shortest_ancestor_path()
std::string obtain_shortest_ancestor_path |
( |
const std::vector< std::string > & |
hls | ) |
|
◆ print_attr()
print_attr |
( |
hid_t |
type, |
|
|
int |
loc, |
|
|
void * |
sm_buf |
|
) |
| |
will get the printed representation of an attribute.
- Parameters
-
type | HDF5 data type id |
loc | the number of array number |
sm_buf | pointer to an attribute |
- Returns
- a string
Definition at line 868 of file h5get.cc.
◆ write_vlen_str_attrs()
void write_vlen_str_attrs |
( |
hid_t |
attr_id, |
|
|
hid_t |
ty_id, |
|
|
const DSattr_t * |
attr_inst_ptr, |
|
|
D4Attribute * |
d4_attr, |
|
|
AttrTable * |
d2_attr, |
|
|
bool |
is_dap4 |
|
) |
| |