54 hsize_t d_num_elm = 0;
56 hsize_t d_memneed = 0;
61 int64_t format_constraint(int64_t *cor, int64_t *step, int64_t *edg);
64 bool m_array_of_structure(hid_t dsetid, std::vector<char>&values,
bool has_values,
size_t values_offset,
65 int64_t nelms,
const int64_t* offset,
const int64_t* count,
const int64_t *step);
67 void m_array_of_structure_member(libdap::BaseType *field, hid_t memtype,
unsigned int u,hid_t dsetid,
68 std::vector<char>&values,
bool has_values,
size_t struct_elem_offset )
const;
69 void m_array_of_structure_close_hdf5_ids(std::vector<char> &values,
bool has_values, hid_t mspace,
70 hid_t dtypeid, hid_t memtype)
const;
71 void m_array_of_structure_catch_close_hdf5_ids(hid_t memb_id,
char * memb_name, std::vector<char> &values,
72 bool has_values, hid_t mspace, hid_t dtypeid, hid_t memtype)
const;
74 bool m_array_of_reference(hid_t dset_id,hid_t dtype_id);
75 void m_array_of_region_reference(hid_t d_dset_id,std::vector<std::string>& v_str, int64_t nelms,
76 const std::vector<int64_t>& offset,
const std::vector<int64_t> &step);
77 void m_array_of_object_reference(hid_t d_dset_id, std::vector<std::string>& v_str, int64_t nelms,
78 const std::vector<int64_t>& offset,
const std::vector<int64_t> &step)
const;
80 bool m_array_of_reference_new_h5_apis(hid_t dset_id,hid_t dtype_id);
82 void m_intern_plain_array_data(
char *convbuf,hid_t memtype);
83 void m_array_of_atomic(hid_t, hid_t,int64_t ,
const int64_t *,
const int64_t *,
const int64_t *);
84 void handle_vlen_string(hid_t dset_id, hid_t memtype, int64_t nelms,
const std::vector<hsize_t>& hoffset,
85 const std::vector<hsize_t>& hcount,
const std::vector<hsize_t>& hstep);
86 void handle_array_read_whole(hid_t dset_id, hid_t memtype, int64_t nelms);
87 void handle_array_read_slab(hid_t dset_id, hid_t memtype, int64_t nelms,
88 const int64_t *offset,
const int64_t *step,
const int64_t *count);
90 void do_array_read(hid_t dset_id,hid_t dtype_id,std::vector<char>&values,
91 int64_t nelms,
const int64_t* offset,
const int64_t* count,
const int64_t* step);
92 bool do_h5_array_type_read(hid_t dsetid, hid_t memb_id,std::vector<char>&values,
bool has_values,
size_t values_offset,
93 int64_t at_nelms,int64_t* at_offset,int64_t*at_count,int64_t* at_step);
94 void do_h5_array_type_read_base_compound_member(hid_t dsetid, libdap::BaseType *field, hid_t child_memb_id,
95 H5T_class_t child_memb_cls, std::vector<char>&values,
bool has_values,
96 size_t values_offset, int64_t at_nelms, int64_t at_total_nelms,
97 size_t at_base_type_size, int64_t array_index,
98 int64_t at_orig_index,
size_t child_memb_offset)
const;
99 void do_h5_array_type_read_base_compound_member_string(libdap::BaseType *field, hid_t child_memb_id,
100 const std::vector<char> &values,
size_t data_offset)
const;
102 void do_h5_array_type_read_base_atomic(H5T_class_t array_cls, hid_t at_base_type,
size_t at_base_type_size,
103 std::vector<char>&values,
size_t values_offset, int64_t at_nelms,
104 int64_t at_total_nelms,
int at_ndims, std::vector<int64_t> &at_dims,
105 int64_t* at_offset, int64_t* at_step, int64_t *at_count);
106 void do_h5_array_type_read_base_atomic_whole_data(H5T_class_t array_cls, hid_t at_base_type,int64_t at_nelms,
107 std::vector<char> &values,
size_t values_offset);
108 inline int64_t INDEX_nD_TO_1D (
const std::vector < int64_t > &dims,
const std::vector < int64_t > &pos)
const;
109 bool obtain_next_pos(std::vector<int64_t>& pos, std::vector<int64_t>&start,std::vector<int64_t>&end,
110 std::vector<int64_t>&step,
int rank_change);
112 template<
typename T>
int subset(
115 std::vector<int64_t> & dim,
119 std::vector<T> *poutput,
120 std::vector<int64_t>& pos,
123 bool handle_one_dim(libdap::Array::Dim_iter d, libdap::D4Group *temp_grp, libdap::D4Dimension * &d4_dim,
125 void m_array_of_region_reference_point_selection(hid_t space_id,
int ndim,
const std::string &varname,
126 std::vector<std::string> &v_str,int64_t i)
const;
127 void m_array_of_region_reference_hyperslab_selection(hid_t space_id,
int ndim,
const std::string &varname,
128 std::vector<std::string> &v_str,int64_t i)
const;
129 friend class HDF5Structure;
133 HDF5Array(
const std::string & n,
const std::string &d, libdap::BaseType * v);
134 ~ HDF5Array()
override =
default;
144 bool read()
override;
158 void set_varpath(
const std::string& vpath) { var_path = vpath;}
159 libdap::BaseType *h5dims_transform_to_dap4(libdap::D4Group *root,
const std::vector<std::string> &dimpath);