46 #include "InternalErr.h"
62 BESDEBUG(
"h5",
"Coming to HDF5BaseArray read "<<endl);
75 Dim_iter p = dim_begin ();
77 while (p != dim_end ()) {
79 int start = dimension_start (p,
true);
80 int stride = dimension_stride (p,
true);
81 int stop = dimension_stop (p,
true);
85 if (stride < 0 || start < 0 || stop < 0 || start > stop) {
87 oss <<
"Array/Grid hyperslab indices are bad: [" << start <<
88 ":" << stride <<
":" << stop <<
"]";
89 throw Error (malformed_expr, oss.str ());
93 if (start == 0 && stop == 0 && stride == 0) {
94 start = dimension_start (p,
false);
95 stride = dimension_stride (p,
false);
96 stop = dimension_stop (p,
false);
101 count[id] = ((stop - start) / stride) + 1;
105 "=format_constraint():"
106 <<
"id=" <<
id <<
" offset=" << offset[
id]
107 <<
" step=" << step[
id]
108 <<
" count=" << count[
id]
121 throw InternalErr(__FILE__, __LINE__,
"Currently the rank of the missing field should be 1");
139 if (nelms == tnumelm) {
140 for (
int i = 0; i < nelms; i++)
142 set_value((dods_int32 *) &val[0], nelms);
145 for (
int i = 0; i < count[0]; i++)
146 val[i] = offset[0] + step[0] * i;
147 set_value((dods_int32 *) &val[0], nelms);
virtual BaseType * ptr_duplicate()
HDF5BaseArray(const string &n="", BaseType *v=0)
int format_constraint(int *cor, int *step, int *edg)
void write_nature_number_buffer(int rank, int tnumelm)
A helper class that aims to reduce code redundence for different special CF derived array class For e...
#define BESDEBUG(x, y)
macro used to send debug information to the debug stream