Merge remote-tracking branch 'origin/feature/ECC-1903-tablesVersion-switch' into feature/ECC-1903-tablesVersion-switch-with-chem-param-split

This commit is contained in:
Matthew Griffith 2024-12-09 11:30:51 +00:00
commit fe8cc1722b
264 changed files with 3725 additions and 4192 deletions

View File

@ -310,22 +310,27 @@ list( APPEND eccodes_src_files
grib_dependency.cc grib_dependency.cc
grib_value.cc grib_value.cc
grib_errors.cc grib_errors.cc
grib_expression_class_binop.cc
grib_expression_class_logical_and.cc expression/grib_arguments.cc
grib_expression_class_logical_or.cc
grib_expression_class_is_in_dict.cc expression/grib_expression.cc
grib_expression_class_true.cc expression/grib_expression_class_binop.cc
grib_expression_class_string_compare.cc expression/grib_expression_class_logical_and.cc
grib_expression_class_unop.cc expression/grib_expression_class_logical_or.cc
grib_expression_class_functor.cc expression/grib_expression_class_is_in_dict.cc
grib_expression_class_accessor.cc expression/grib_expression_class_true.cc
grib_expression_class_is_in_list.cc expression/grib_expression_class_string_compare.cc
grib_expression_class_is_integer.cc expression/grib_expression_class_unop.cc
grib_expression_class_length.cc expression/grib_expression_class_functor.cc
grib_expression_class_long.cc expression/grib_expression_class_accessor.cc
grib_expression_class_double.cc expression/grib_expression_class_is_in_list.cc
grib_expression_class_string.cc expression/grib_expression_class_is_integer.cc
grib_expression_class_sub_string.cc expression/grib_expression_class_length.cc
expression/grib_expression_class_long.cc
expression/grib_expression_class_double.cc
expression/grib_expression_class_string.cc
expression/grib_expression_class_sub_string.cc
geo_nearest/grib_nearest.cc geo_nearest/grib_nearest.cc
geo_nearest/grib_nearest_class_gen.cc geo_nearest/grib_nearest_class_gen.cc
geo_nearest/grib_nearest_class_healpix.cc geo_nearest/grib_nearest_class_healpix.cc
@ -337,6 +342,7 @@ list( APPEND eccodes_src_files
geo_nearest/grib_nearest_class_reduced.cc geo_nearest/grib_nearest_class_reduced.cc
geo_nearest/grib_nearest_class_regular.cc geo_nearest/grib_nearest_class_regular.cc
geo_nearest/grib_nearest_class_space_view.cc geo_nearest/grib_nearest_class_space_view.cc
geo_iterator/grib_iterator.cc geo_iterator/grib_iterator.cc
geo_iterator/grib_iterator_class_gaussian.cc geo_iterator/grib_iterator_class_gaussian.cc
geo_iterator/grib_iterator_class_gaussian_reduced.cc geo_iterator/grib_iterator_class_gaussian_reduced.cc
@ -351,7 +357,7 @@ list( APPEND eccodes_src_files
geo_iterator/grib_iterator_class_regular.cc geo_iterator/grib_iterator_class_regular.cc
geo_iterator/grib_iterator_class_space_view.cc geo_iterator/grib_iterator_class_space_view.cc
geo_iterator/grib_iterator_class_unstructured.cc geo_iterator/grib_iterator_class_unstructured.cc
grib_expression.cc
codes_util.cc codes_util.cc
grib_util.cc grib_util.cc
bufr_util.cc bufr_util.cc

View File

@ -17,8 +17,8 @@ void grib_accessor_bit_t::init(const long len, grib_arguments* arg)
{ {
grib_accessor_long_t::init(len, arg); grib_accessor_long_t::init(len, arg);
length_ = 0; length_ = 0;
owner_ = grib_arguments_get_name(grib_handle_of_accessor(this), arg, 0); owner_ = arg->get_name(grib_handle_of_accessor(this), 0);
bit_index_ = grib_arguments_get_long(grib_handle_of_accessor(this), arg, 1); bit_index_ = arg->get_long(grib_handle_of_accessor(this), 1);
} }
int grib_accessor_bit_t::unpack_long(long* val, size_t* len) int grib_accessor_bit_t::unpack_long(long* val, size_t* len)

View File

@ -54,10 +54,10 @@ void grib_accessor_bitmap_t::init(const long len, grib_arguments* arg)
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
int n = 0; int n = 0;
tableReference_ = grib_arguments_get_name(hand, arg, n++); tableReference_ = arg->get_name(hand, n++);
missing_value_ = grib_arguments_get_name(hand, arg, n++); missing_value_ = arg->get_name(hand, n++);
offsetbsec_ = grib_arguments_get_name(hand, arg, n++); offsetbsec_ = arg->get_name(hand, n++);
sLength_ = grib_arguments_get_name(hand, arg, n++); sLength_ = arg->get_name(hand, n++);
compute_size(); compute_size();
} }

View File

@ -23,12 +23,12 @@ void grib_accessor_bits_t::init(const long l, grib_arguments* c)
int n = 0; int n = 0;
referenceValue_ = 0; referenceValue_ = 0;
argument_ = grib_arguments_get_name(hand, c, n++); argument_ = c->get_name(hand, n++);
start_ = grib_arguments_get_long(hand, c, n++); start_ = c->get_long(hand, n++);
len_ = grib_arguments_get_long(hand, c, n++); len_ = c->get_long(hand, n++);
e = grib_arguments_get_expression(hand, c, n++); e = c->get_expression(hand, n++);
if (e) { if (e) {
grib_expression_evaluate_double(hand, e, &(referenceValue_)); e->evaluate_double(hand, &(referenceValue_));
referenceValuePresent_ = 1; referenceValuePresent_ = 1;
} }
else { else {
@ -36,7 +36,7 @@ void grib_accessor_bits_t::init(const long l, grib_arguments* c)
} }
scale_ = 1; scale_ = 1;
if (referenceValuePresent_) { if (referenceValuePresent_) {
scale_ = grib_arguments_get_double(hand, c, n++); scale_ = c->get_double(hand, n++);
} }
Assert(len_ <= sizeof(long) * 8); Assert(len_ <= sizeof(long) * 8);

View File

@ -17,8 +17,8 @@ void grib_accessor_bits_per_value_t::init(const long l, grib_arguments* args)
{ {
grib_accessor_long_t::init(l, args); grib_accessor_long_t::init(l, args);
int n = 0; int n = 0;
values_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); values_ = args->get_name(grib_handle_of_accessor(this), n++);
bits_per_value_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); bits_per_value_ = args->get_name(grib_handle_of_accessor(this), n++);
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
length_ = 0; length_ = 0;
} }

View File

@ -17,7 +17,7 @@ void grib_accessor_blob_t::init(const long len, grib_arguments* arg)
{ {
grib_accessor_gen_t::init(len, arg); grib_accessor_gen_t::init(len, arg);
grib_get_long_internal(grib_handle_of_accessor(this), grib_get_long_internal(grib_handle_of_accessor(this),
grib_arguments_get_name(parent_->h, arg, 0), &length_); arg->get_name(parent_->h, 0), &length_);
Assert(length_ >= 0); Assert(length_ >= 0);
} }

View File

@ -18,9 +18,9 @@ void grib_accessor_budgdate_t::init(const long l, grib_arguments* c)
grib_accessor_long_t::init(l, c); grib_accessor_long_t::init(l, c);
int n = 0; int n = 0;
year_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); year_ = c->get_name(grib_handle_of_accessor(this), n++);
month_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); month_ = c->get_name(grib_handle_of_accessor(this), n++);
day_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); day_ = c->get_name(grib_handle_of_accessor(this), n++);
} }
int grib_accessor_budgdate_t::unpack_long(long* val, size_t* len) int grib_accessor_budgdate_t::unpack_long(long* val, size_t* len)

View File

@ -195,13 +195,13 @@ void grib_accessor_bufr_data_array_t::init(const long v, grib_arguments* params)
tempStrings_ = NULL; tempStrings_ = NULL;
bufrDataEncodedName_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); bufrDataEncodedName_ = params->get_name(grib_handle_of_accessor(this), n++);
numberOfSubsetsName_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); numberOfSubsetsName_ = params->get_name(grib_handle_of_accessor(this), n++);
expandedDescriptorsName_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); expandedDescriptorsName_ = params->get_name(grib_handle_of_accessor(this), n++);
flagsName_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); flagsName_ = params->get_name(grib_handle_of_accessor(this), n++);
elementsDescriptorsIndexName_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); elementsDescriptorsIndexName_ = params->get_name(grib_handle_of_accessor(this), n++);
compressedDataName_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); compressedDataName_ = params->get_name(grib_handle_of_accessor(this), n++);
dataKeysName = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); dataKeysName = params->get_name(grib_handle_of_accessor(this), n++);
dataKeysAcc = grib_find_accessor(grib_handle_of_accessor(this), dataKeysName); dataKeysAcc = grib_find_accessor(grib_handle_of_accessor(this), dataKeysName);
dataKeys_ = dataKeysAcc->parent_; dataKeys_ = dataKeysAcc->parent_;

View File

@ -47,9 +47,9 @@ void grib_accessor_bufr_elements_table_t::init(const long len, grib_arguments* p
grib_accessor_gen_t::init(len, params); grib_accessor_gen_t::init(len, params);
int n = 0; int n = 0;
dictionary_ = grib_arguments_get_string(grib_handle_of_accessor(this), params, n++); dictionary_ = params->get_string(grib_handle_of_accessor(this), n++);
masterDir_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); masterDir_ = params->get_name(grib_handle_of_accessor(this), n++);
localDir_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); localDir_ = params->get_name(grib_handle_of_accessor(this), n++);
length_ = 0; length_ = 0;
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;

View File

@ -20,16 +20,16 @@ void grib_accessor_bufr_extract_area_subsets_t::init(const long len, grib_argume
int n = 0; int n = 0;
length_ = 0; length_ = 0;
doExtractSubsets_ = grib_arguments_get_name(h, arg, n++); doExtractSubsets_ = arg->get_name(h, n++);
numberOfSubsets_ = grib_arguments_get_name(h, arg, n++); numberOfSubsets_ = arg->get_name(h, n++);
extractSubsetList_ = grib_arguments_get_name(h, arg, n++); extractSubsetList_ = arg->get_name(h, n++);
extractAreaWestLongitude_ = grib_arguments_get_name(h, arg, n++); extractAreaWestLongitude_ = arg->get_name(h, n++);
extractAreaEastLongitude_ = grib_arguments_get_name(h, arg, n++); extractAreaEastLongitude_ = arg->get_name(h, n++);
extractAreaNorthLatitude_ = grib_arguments_get_name(h, arg, n++); extractAreaNorthLatitude_ = arg->get_name(h, n++);
extractAreaSouthLatitude_ = grib_arguments_get_name(h, arg, n++); extractAreaSouthLatitude_ = arg->get_name(h, n++);
extractAreaLongitudeRank_ = grib_arguments_get_name(h, arg, n++); extractAreaLongitudeRank_ = arg->get_name(h, n++);
extractAreaLatitudeRank_ = grib_arguments_get_name(h, arg, n++); extractAreaLatitudeRank_ = arg->get_name(h, n++);
extractedAreaNumberOfSubsets_ = grib_arguments_get_name(h, arg, n++); extractedAreaNumberOfSubsets_ = arg->get_name(h, n++);
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
} }

View File

@ -19,9 +19,9 @@ void grib_accessor_bufr_extract_datetime_subsets_t::init(const long len, grib_ar
int n = 0; int n = 0;
length_ = 0; length_ = 0;
doExtractSubsets_ = grib_arguments_get_name(grib_handle_of_accessor(this), arg, n++); doExtractSubsets_ = arg->get_name(grib_handle_of_accessor(this), n++);
numberOfSubsets_ = grib_arguments_get_name(grib_handle_of_accessor(this), arg, n++); numberOfSubsets_ = arg->get_name(grib_handle_of_accessor(this), n++);
extractSubsetList_ = grib_arguments_get_name(grib_handle_of_accessor(this), arg, n++); extractSubsetList_ = arg->get_name(grib_handle_of_accessor(this), n++);
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
} }

View File

@ -29,8 +29,8 @@ void grib_accessor_bufr_extract_subsets_t::init(const long len, grib_arguments*
int n = 0; int n = 0;
length_ = 0; length_ = 0;
numericValues_ = grib_arguments_get_name(grib_handle_of_accessor(this), arg, n++); numericValues_ = arg->get_name(grib_handle_of_accessor(this), n++);
pack_ = grib_arguments_get_name(grib_handle_of_accessor(this), arg, n++); pack_ = arg->get_name(grib_handle_of_accessor(this), n++);
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
numericValuesAccessor_ = NULL; numericValuesAccessor_ = NULL;

View File

@ -20,12 +20,12 @@ void grib_accessor_bufr_simple_thinning_t::init(const long len, grib_arguments*
int n = 0; int n = 0;
length_ = 0; length_ = 0;
doExtractSubsets_ = grib_arguments_get_name(h, arg, n++); doExtractSubsets_ = arg->get_name(h, n++);
numberOfSubsets_ = grib_arguments_get_name(h, arg, n++); numberOfSubsets_ = arg->get_name(h, n++);
extractSubsetList_ = grib_arguments_get_name(h, arg, n++); extractSubsetList_ = arg->get_name(h, n++);
simpleThinningStart_ = grib_arguments_get_name(h, arg, n++); simpleThinningStart_ = arg->get_name(h, n++);
simpleThinningMissingRadius_ = grib_arguments_get_name(h, arg, n++); simpleThinningMissingRadius_ = arg->get_name(h, n++);
simpleThinningSkip_ = grib_arguments_get_name(h, arg, n++); simpleThinningSkip_ = arg->get_name(h, n++);
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
} }

View File

@ -18,7 +18,7 @@ void grib_accessor_bufr_string_values_t::init(const long len, grib_arguments* ar
{ {
grib_accessor_ascii_t::init(len, args); grib_accessor_ascii_t::init(len, args);
int n = 0; int n = 0;
dataAccessorName_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); dataAccessorName_ = args->get_name(grib_handle_of_accessor(this), n++);
dataAccessor_ = NULL; dataAccessor_ = NULL;
length_ = 0; length_ = 0;
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;

View File

@ -17,7 +17,7 @@ void grib_accessor_bufrdc_expanded_descriptors_t::init(const long len, grib_argu
{ {
grib_accessor_long_t::init(len, args); grib_accessor_long_t::init(len, args);
int n = 0; int n = 0;
expandedDescriptors_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); expandedDescriptors_ = args->get_name(grib_handle_of_accessor(this), n++);
expandedDescriptorsAccessor_ = 0; expandedDescriptorsAccessor_ = 0;
length_ = 0; length_ = 0;
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;

View File

@ -17,7 +17,7 @@ void grib_accessor_cf_var_name_t::init(const long l, grib_arguments* arg)
{ {
grib_accessor_ascii_t::init(l, arg); grib_accessor_ascii_t::init(l, arg);
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
defaultKey_ = grib_arguments_get_name(h, arg, 0); defaultKey_ = arg->get_name(h, 0);
} }
int grib_accessor_cf_var_name_t::unpack_string(char* val, size_t* len) int grib_accessor_cf_var_name_t::unpack_string(char* val, size_t* len)

View File

@ -18,10 +18,10 @@ void grib_accessor_change_alternative_row_scanning_t::init(const long len, grib_
grib_accessor_gen_t::init(len, args); grib_accessor_gen_t::init(len, args);
int n = 0; int n = 0;
values_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); values_ = args->get_name(grib_handle_of_accessor(this), n++);
Ni_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); Ni_ = args->get_name(grib_handle_of_accessor(this), n++);
Nj_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); Nj_ = args->get_name(grib_handle_of_accessor(this), n++);
alternativeRowScanning_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); alternativeRowScanning_ = args->get_name(grib_handle_of_accessor(this), n++);
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
length_ = 0; length_ = 0;

View File

@ -19,14 +19,14 @@ void grib_accessor_change_scanning_direction_t::init(const long len, grib_argume
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
int n = 0; int n = 0;
values_ = grib_arguments_get_name(h, args, n++); values_ = args->get_name(h, n++);
Ni_ = grib_arguments_get_name(h, args, n++); Ni_ = args->get_name(h, n++);
Nj_ = grib_arguments_get_name(h, args, n++); Nj_ = args->get_name(h, n++);
i_scans_negatively_ = grib_arguments_get_name(h, args, n++); i_scans_negatively_ = args->get_name(h, n++);
j_scans_positively_ = grib_arguments_get_name(h, args, n++); j_scans_positively_ = args->get_name(h, n++);
first_ = grib_arguments_get_name(h, args, n++); first_ = args->get_name(h, n++);
last_ = grib_arguments_get_name(h, args, n++); last_ = args->get_name(h, n++);
axis_ = grib_arguments_get_name(h, args, n++); axis_ = args->get_name(h, n++);
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
length_ = 0; length_ = 0;

View File

@ -25,7 +25,7 @@ void grib_accessor_check_internal_version_t::init(const long l, grib_arguments*
int err = 0; int err = 0;
long defs_file_version = 0; long defs_file_version = 0;
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
const char* s_defn_version = grib_arguments_get_name(h, args, 0); const char* s_defn_version = args->get_name(h, 0);
Assert(s_defn_version); Assert(s_defn_version);
err = grib_get_long_internal(h, s_defn_version, &defs_file_version); err = grib_get_long_internal(h, s_defn_version, &defs_file_version);

View File

@ -20,15 +20,15 @@ void grib_accessor_closest_date_t::init(const long l, grib_arguments* c)
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
int n = 0; int n = 0;
dateLocal_ = grib_arguments_get_name(h, c, n++); dateLocal_ = c->get_name(h, n++);
timeLocal_ = grib_arguments_get_name(h, c, n++); timeLocal_ = c->get_name(h, n++);
numForecasts_ = grib_arguments_get_name(h, c, n++); numForecasts_ = c->get_name(h, n++);
year_ = grib_arguments_get_name(h, c, n++); year_ = c->get_name(h, n++);
month_ = grib_arguments_get_name(h, c, n++); month_ = c->get_name(h, n++);
day_ = grib_arguments_get_name(h, c, n++); day_ = c->get_name(h, n++);
hour_ = grib_arguments_get_name(h, c, n++); hour_ = c->get_name(h, n++);
minute_ = grib_arguments_get_name(h, c, n++); minute_ = c->get_name(h, n++);
second_ = grib_arguments_get_name(h, c, n++); second_ = c->get_name(h, n++);
length_ = 0; length_ = 0;
} }

View File

@ -17,7 +17,7 @@ void grib_accessor_codeflag_t::init(const long len, grib_arguments* param)
{ {
grib_accessor_unsigned_t::init(len, param); grib_accessor_unsigned_t::init(len, param);
length_ = len; length_ = len;
tablename_ = grib_arguments_get_string(grib_handle_of_accessor(this), param, 0); tablename_ = param->get_string(grib_handle_of_accessor(this), 0);
Assert(length_ >= 0); Assert(length_ >= 0);
} }

View File

@ -61,19 +61,19 @@ void grib_accessor_codetable_t::init(const long len, grib_arguments* params)
* its length as an identifier not an integer. This identifier is * its length as an identifier not an integer. This identifier is
* added to the argument list (at the beginning) * added to the argument list (at the beginning)
*/ */
new_len = grib_arguments_get_long(hand, params, n++); new_len = params->get_long(hand, n++);
if (new_len <= 0) { if (new_len <= 0) {
grib_context_log(context_, GRIB_LOG_FATAL, "%s: codetable length must be a positive integer", name_); grib_context_log(context_, GRIB_LOG_FATAL, "%s: codetable length must be a positive integer", name_);
} }
nbytes_ = new_len; nbytes_ = new_len;
} }
tablename_ = grib_arguments_get_string(hand, params, n++); tablename_ = params->get_string(hand, n++);
if (tablename_ == NULL) { if (tablename_ == NULL) {
grib_context_log(context_, GRIB_LOG_FATAL, "%s: codetable table is invalid", name_); grib_context_log(context_, GRIB_LOG_FATAL, "%s: codetable table is invalid", name_);
} }
masterDir_ = grib_arguments_get_name(hand, params, n++); /* can be NULL */ masterDir_ = params->get_name(hand, n++); /* can be NULL */
localDir_ = grib_arguments_get_name(hand, params, n++); /* can be NULL */ localDir_ = params->get_name(hand, n++); /* can be NULL */
/*if (flags_ & GRIB_ACCESSOR_FLAG_STRING_TYPE) /*if (flags_ & GRIB_ACCESSOR_FLAG_STRING_TYPE)
printf("-------- %s type string (%ld)\n",a->name,flags_ );*/ printf("-------- %s type string (%ld)\n",a->name,flags_ );*/
@ -97,22 +97,22 @@ void grib_accessor_codetable_t::init(const long len, grib_arguments* params)
int ret = 0; int ret = 0;
double d; double d;
char tmp[1024]; char tmp[1024];
grib_expression* expression = grib_arguments_get_expression(hand, act->default_value, 0); grib_expression* expression = act->default_value->get_expression(hand, 0);
int type = grib_expression_native_type(hand, expression); int type = expression->native_type(hand);
switch (type) { switch (type) {
case GRIB_TYPE_DOUBLE: case GRIB_TYPE_DOUBLE:
grib_expression_evaluate_double(hand, expression, &d); expression->evaluate_double(hand, &d);
pack_double(&d, &s_len); pack_double(&d, &s_len);
break; break;
case GRIB_TYPE_LONG: case GRIB_TYPE_LONG:
grib_expression_evaluate_long(grib_handle_of_accessor(this), expression, &l); expression->evaluate_long(grib_handle_of_accessor(this), &l);
pack_long(&l, &s_len); pack_long(&l, &s_len);
break; break;
default: default:
s_len = sizeof(tmp); s_len = sizeof(tmp);
p = grib_expression_evaluate_string(grib_handle_of_accessor(this), expression, tmp, &s_len, &ret); p = expression->evaluate_string(grib_handle_of_accessor(this), tmp, &s_len, &ret);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(context_, GRIB_LOG_FATAL, grib_context_log(context_, GRIB_LOG_FATAL,
"Unable to evaluate %s as string", name_); "Unable to evaluate %s as string", name_);
@ -683,22 +683,22 @@ int grib_accessor_codetable_t::pack_string(const char* buffer, size_t* len)
int ret = 0; int ret = 0;
double d = 0; double d = 0;
char tmp[1024] = {0,}; char tmp[1024] = {0,};
grib_expression* expression = grib_arguments_get_expression(grib_handle_of_accessor(this), act->default_value, 0); grib_expression* expression = act->default_value->get_expression(grib_handle_of_accessor(this), 0);
int type = grib_expression_native_type(grib_handle_of_accessor(this), expression); int type = expression->native_type(grib_handle_of_accessor(this));
switch (type) { switch (type) {
case GRIB_TYPE_DOUBLE: case GRIB_TYPE_DOUBLE:
grib_expression_evaluate_double(grib_handle_of_accessor(this), expression, &d); expression->evaluate_double(grib_handle_of_accessor(this), &d);
pack_double(&d, &s_len); pack_double(&d, &s_len);
break; break;
case GRIB_TYPE_LONG: case GRIB_TYPE_LONG:
grib_expression_evaluate_long(grib_handle_of_accessor(this), expression, &l); expression->evaluate_long(grib_handle_of_accessor(this), &l);
pack_long(&l, &s_len); pack_long(&l, &s_len);
break; break;
default: default:
s_len = sizeof(tmp); s_len = sizeof(tmp);
p = grib_expression_evaluate_string(grib_handle_of_accessor(this), expression, tmp, &s_len, &ret); p = expression->evaluate_string(grib_handle_of_accessor(this), tmp, &s_len, &ret);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(context_, GRIB_LOG_ERROR, grib_context_log(context_, GRIB_LOG_ERROR,
"%s: Unable to evaluate default value of %s as string expression", __func__, name_); "%s: Unable to evaluate default value of %s as string expression", __func__, name_);
@ -735,19 +735,19 @@ int grib_accessor_codetable_t::pack_expression(grib_expression* e)
size_t len = 1; size_t len = 1;
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
if (strcmp(e->cclass->name, "long") == 0) { if (strcmp(e->class_name(), "long") == 0) {
grib_expression_evaluate_long(hand, e, &lval); /* TODO: check return value */ e->evaluate_long(hand, &lval); /* TODO: check return value */
// if (hand->context->debug) printf("ECCODES DEBUG grib_accessor_codetable::pack_expression %s %ld\n", name_ ,lval); // if (hand->context->debug) printf("ECCODES DEBUG grib_accessor_codetable::pack_expression %s %ld\n", name_ ,lval);
ret = pack_long(&lval, &len); ret = pack_long(&lval, &len);
} }
else { else {
char tmp[1024]; char tmp[1024];
len = sizeof(tmp); len = sizeof(tmp);
cval = grib_expression_evaluate_string(hand, e, tmp, &len, &ret); cval = e->evaluate_string(hand, tmp, &len, &ret);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(context_, GRIB_LOG_ERROR, grib_context_log(context_, GRIB_LOG_ERROR,
"grib_accessor_codetable.%s: Unable to evaluate string %s to be set in %s", "grib_accessor_codetable.%s: Unable to evaluate string %s to be set in %s",
__func__, grib_expression_get_name(e), name_); __func__, e->get_name(), name_);
return ret; return ret;
} }
len = strlen(cval) + 1; len = strlen(cval) + 1;

View File

@ -18,7 +18,7 @@ void grib_accessor_codetable_title_t::init(const long len, grib_arguments* param
{ {
grib_accessor_gen_t::init(len, params); grib_accessor_gen_t::init(len, params);
int n = 0; int n = 0;
codetable_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); codetable_ = params->get_name(grib_handle_of_accessor(this), n++);
length_ = 0; length_ = 0;
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;
} }

View File

@ -19,7 +19,7 @@ void grib_accessor_codetable_units_t::init(const long len, grib_arguments* param
grib_accessor_gen_t::init(len, params); grib_accessor_gen_t::init(len, params);
int n = 0; int n = 0;
codetable_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); codetable_ = params->get_name(grib_handle_of_accessor(this), n++);
length_ = 0; length_ = 0;
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;
} }

View File

@ -72,11 +72,11 @@ static int concept_condition_expression_true(
long lres = 0; long lres = 0;
int ok = FALSE; // Boolean int ok = FALSE; // Boolean
int err = 0; int err = 0;
const int type = grib_expression_native_type(h, c->expression); const int type = c->expression->native_type(h);
switch (type) { switch (type) {
case GRIB_TYPE_LONG: case GRIB_TYPE_LONG:
grib_expression_evaluate_long(h, c->expression, &lres); c->expression->evaluate_long(h, &lres);
// Use memoization for the most common type (integer keys) // Use memoization for the most common type (integer keys)
ok = (grib_get_long_memoize(h, c->name, &lval, memo) == GRIB_SUCCESS) && ok = (grib_get_long_memoize(h, c->name, &lval, memo) == GRIB_SUCCESS) &&
(lval == lres); (lval == lres);
@ -86,7 +86,7 @@ static int concept_condition_expression_true(
case GRIB_TYPE_DOUBLE: { case GRIB_TYPE_DOUBLE: {
double dval; double dval;
double dres = 0.0; double dres = 0.0;
grib_expression_evaluate_double(h, c->expression, &dres); c->expression->evaluate_double(h, &dres);
ok = (grib_get_double(h, c->name, &dval) == GRIB_SUCCESS) && ok = (grib_get_double(h, c->name, &dval) == GRIB_SUCCESS) &&
(dval == dres); (dval == dres);
break; break;
@ -100,7 +100,7 @@ static int concept_condition_expression_true(
size_t size = sizeof(tmp); size_t size = sizeof(tmp);
ok = (grib_get_string(h, c->name, buf, &len) == GRIB_SUCCESS) && ok = (grib_get_string(h, c->name, buf, &len) == GRIB_SUCCESS) &&
((cval = grib_expression_evaluate_string(h, c->expression, tmp, &size, &err)) != NULL) && ((cval = c->expression->evaluate_string(h, tmp, &size, &err)) != NULL) &&
(err == 0) && (grib_inline_strcmp(buf, cval) == 0); (err == 0) && (grib_inline_strcmp(buf, cval) == 0);
break; break;
} }
@ -203,19 +203,19 @@ static int concept_conditions_expression_apply(grib_handle* h, grib_concept_cond
Assert(count < 1024); Assert(count < 1024);
values[count].name = e->name; values[count].name = e->name;
values[count].type = grib_expression_native_type(h, e->expression); values[count].type = e->expression->native_type(h);
switch (values[count].type) { switch (values[count].type) {
case GRIB_TYPE_LONG: case GRIB_TYPE_LONG:
grib_expression_evaluate_long(h, e->expression, &lres); e->expression->evaluate_long(h, &lres);
values[count].long_value = lres; values[count].long_value = lres;
break; break;
case GRIB_TYPE_DOUBLE: case GRIB_TYPE_DOUBLE:
grib_expression_evaluate_double(h, e->expression, &dres); e->expression->evaluate_double(h, &dres);
values[count].double_value = dres; values[count].double_value = dres;
break; break;
case GRIB_TYPE_STRING: case GRIB_TYPE_STRING:
size = sizeof(sa->v[count]); size = sizeof(sa->v[count]);
values[count].string_value = grib_expression_evaluate_string(h, e->expression, sa->v[count], &size, &err); values[count].string_value = e->expression->evaluate_string(h, sa->v[count], &size, &err);
break; break;
default: default:
return GRIB_NOT_IMPLEMENTED; return GRIB_NOT_IMPLEMENTED;

View File

@ -39,10 +39,10 @@ void grib_accessor_count_missing_t::init(const long len, grib_arguments* arg)
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
length_ = 0; length_ = 0;
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;
bitmap_ = grib_arguments_get_name(h, arg, n++); bitmap_ = arg->get_name(h, n++);
unusedBitsInBitmap_ = grib_arguments_get_name(h, arg, n++); unusedBitsInBitmap_ = arg->get_name(h, n++);
numberOfDataPoints_ = grib_arguments_get_name(h, arg, n++); numberOfDataPoints_ = arg->get_name(h, n++);
missingValueManagementUsed_ = grib_arguments_get_name(h, arg, n++); /* Can be NULL */ missingValueManagementUsed_ = arg->get_name(h, n++); /* Can be NULL */
} }
static const int used[] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 }; static const int used[] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 };

View File

@ -18,12 +18,12 @@ void grib_accessor_data_apply_bitmap_t::init(const long v, grib_arguments* args)
grib_accessor_gen_t::init(v, args); grib_accessor_gen_t::init(v, args);
int n = 0; int n = 0;
coded_values_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); coded_values_ = args->get_name(grib_handle_of_accessor(this), n++);
bitmap_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); bitmap_ = args->get_name(grib_handle_of_accessor(this), n++);
missing_value_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); missing_value_ = args->get_name(grib_handle_of_accessor(this), n++);
binary_scale_factor_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); binary_scale_factor_ = args->get_name(grib_handle_of_accessor(this), n++);
number_of_data_points_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); number_of_data_points_ = args->get_name(grib_handle_of_accessor(this), n++);
number_of_values_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); number_of_values_ = args->get_name(grib_handle_of_accessor(this), n++);
length_ = 0; length_ = 0;
} }

View File

@ -18,11 +18,11 @@ void grib_accessor_data_apply_boustrophedonic_t::init(const long v, grib_argumen
grib_accessor_gen_t::init(v, args); grib_accessor_gen_t::init(v, args);
int n = 0; int n = 0;
values_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); values_ = args->get_name(grib_handle_of_accessor(this), n++);
numberOfRows_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); numberOfRows_ = args->get_name(grib_handle_of_accessor(this), n++);
numberOfColumns_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); numberOfColumns_ = args->get_name(grib_handle_of_accessor(this), n++);
numberOfPoints_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); numberOfPoints_ = args->get_name(grib_handle_of_accessor(this), n++);
pl_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); pl_ = args->get_name(grib_handle_of_accessor(this), n++);
length_ = 0; length_ = 0;
} }

View File

@ -19,14 +19,14 @@ void grib_accessor_data_apply_boustrophedonic_bitmap_t::init(const long v, grib_
int n = 0; int n = 0;
grib_handle* gh = grib_handle_of_accessor(this); grib_handle* gh = grib_handle_of_accessor(this);
coded_values_ = grib_arguments_get_name(gh, args, n++); coded_values_ = args->get_name(gh, n++);
bitmap_ = grib_arguments_get_name(gh, args, n++); bitmap_ = args->get_name(gh, n++);
missing_value_ = grib_arguments_get_name(gh, args, n++); missing_value_ = args->get_name(gh, n++);
binary_scale_factor_ = grib_arguments_get_name(gh, args, n++); binary_scale_factor_ = args->get_name(gh, n++);
numberOfRows_ = grib_arguments_get_name(gh, args, n++); numberOfRows_ = args->get_name(gh, n++);
numberOfColumns_ = grib_arguments_get_name(gh, args, n++); numberOfColumns_ = args->get_name(gh, n++);
numberOfPoints_ = grib_arguments_get_name(gh, args, n++); numberOfPoints_ = args->get_name(gh, n++);
length_ = 0; length_ = 0;
} }

View File

@ -25,16 +25,16 @@ void grib_accessor_data_ccsds_packing_t::init(const long v, grib_arguments* args
grib_accessor_values_t::init(v, args); grib_accessor_values_t::init(v, args);
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
number_of_values_ = grib_arguments_get_name(h, args, carg_++); number_of_values_ = args->get_name(h, carg_++);
reference_value_ = grib_arguments_get_name(h, args, carg_++); reference_value_ = args->get_name(h, carg_++);
binary_scale_factor_ = grib_arguments_get_name(h, args, carg_++); binary_scale_factor_ = args->get_name(h, carg_++);
decimal_scale_factor_ = grib_arguments_get_name(h, args, carg_++); decimal_scale_factor_ = args->get_name(h, carg_++);
optimize_scaling_factor_ = grib_arguments_get_name(h, args, carg_++); optimize_scaling_factor_ = args->get_name(h, carg_++);
bits_per_value_ = grib_arguments_get_name(h, args, carg_++); bits_per_value_ = args->get_name(h, carg_++);
number_of_data_points_ = grib_arguments_get_name(h, args, carg_++); number_of_data_points_ = args->get_name(h, carg_++);
ccsds_flags_ = grib_arguments_get_name(h, args, carg_++); ccsds_flags_ = args->get_name(h, carg_++);
ccsds_block_size_ = grib_arguments_get_name(h, args, carg_++); ccsds_block_size_ = args->get_name(h, carg_++);
ccsds_rsi_ = grib_arguments_get_name(h, args, carg_++); ccsds_rsi_ = args->get_name(h, carg_++);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -18,16 +18,16 @@ void grib_accessor_data_complex_packing_t::init(const long v, grib_arguments* ar
grib_accessor_data_simple_packing_t::init(v, args); grib_accessor_data_simple_packing_t::init(v, args);
grib_handle* gh = grib_handle_of_accessor(this); grib_handle* gh = grib_handle_of_accessor(this);
GRIBEX_sh_bug_present_ = grib_arguments_get_name(gh, args, carg_++); GRIBEX_sh_bug_present_ = args->get_name(gh, carg_++);
ieee_floats_ = grib_arguments_get_name(gh, args, carg_++); ieee_floats_ = args->get_name(gh, carg_++);
laplacianOperatorIsSet_ = grib_arguments_get_name(gh, args, carg_++); laplacianOperatorIsSet_ = args->get_name(gh, carg_++);
laplacianOperator_ = grib_arguments_get_name(gh, args, carg_++); laplacianOperator_ = args->get_name(gh, carg_++);
sub_j_ = grib_arguments_get_name(gh, args, carg_++); sub_j_ = args->get_name(gh, carg_++);
sub_k_ = grib_arguments_get_name(gh, args, carg_++); sub_k_ = args->get_name(gh, carg_++);
sub_m_ = grib_arguments_get_name(gh, args, carg_++); sub_m_ = args->get_name(gh, carg_++);
pen_j_ = grib_arguments_get_name(gh, args, carg_++); pen_j_ = args->get_name(gh, carg_++);
pen_k_ = grib_arguments_get_name(gh, args, carg_++); pen_k_ = args->get_name(gh, carg_++);
pen_m_ = grib_arguments_get_name(gh, args, carg_++); pen_m_ = args->get_name(gh, carg_++);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -16,9 +16,9 @@ grib_accessor* grib_accessor_data_dummy_field = &_grib_accessor_data_dummy_field
void grib_accessor_data_dummy_field_t::init(const long v, grib_arguments* args) void grib_accessor_data_dummy_field_t::init(const long v, grib_arguments* args)
{ {
grib_accessor_data_g1simple_packing_t::init(v, args); grib_accessor_data_g1simple_packing_t::init(v, args);
missing_value_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); missing_value_ = args->get_name(grib_handle_of_accessor(this), carg_++);
numberOfPoints_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); numberOfPoints_ = args->get_name(grib_handle_of_accessor(this), carg_++);
bitmap_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); bitmap_ = args->get_name(grib_handle_of_accessor(this), carg_++);
} }
int grib_accessor_data_dummy_field_t::unpack_double(double* val, size_t* len) int grib_accessor_data_dummy_field_t::unpack_double(double* val, size_t* len)

View File

@ -16,11 +16,11 @@ grib_accessor* grib_accessor_data_g1complex_packing = &_grib_accessor_data_g1com
void grib_accessor_data_g1complex_packing_t::init(const long v, grib_arguments* args) void grib_accessor_data_g1complex_packing_t::init(const long v, grib_arguments* args)
{ {
grib_accessor_data_complex_packing_t::init(v, args); grib_accessor_data_complex_packing_t::init(v, args);
half_byte_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); half_byte_ = args->get_name(grib_handle_of_accessor(this), carg_++);
N_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); N_ = args->get_name(grib_handle_of_accessor(this), carg_++);
packingType_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); packingType_ = args->get_name(grib_handle_of_accessor(this), carg_++);
ieee_packing_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); ieee_packing_ = args->get_name(grib_handle_of_accessor(this), carg_++);
precision_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); precision_ = args->get_name(grib_handle_of_accessor(this), carg_++);
edition_ = 1; edition_ = 1;
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -19,22 +19,22 @@ void grib_accessor_data_g1second_order_constant_width_packing_t::init(const long
grib_accessor_data_simple_packing_t::init(v, args); grib_accessor_data_simple_packing_t::init(v, args);
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
half_byte_ = grib_arguments_get_name(hand, args, carg_++); half_byte_ = args->get_name(hand, carg_++);
packingType_ = grib_arguments_get_name(hand, args, carg_++); packingType_ = args->get_name(hand, carg_++);
ieee_packing_ = grib_arguments_get_name(hand, args, carg_++); ieee_packing_ = args->get_name(hand, carg_++);
precision_ = grib_arguments_get_name(hand, args, carg_++); precision_ = args->get_name(hand, carg_++);
widthOfFirstOrderValues_ = grib_arguments_get_name(hand, args, carg_++); widthOfFirstOrderValues_ = args->get_name(hand, carg_++);
N1_ = grib_arguments_get_name(hand, args, carg_++); N1_ = args->get_name(hand, carg_++);
N2_ = grib_arguments_get_name(hand, args, carg_++); N2_ = args->get_name(hand, carg_++);
numberOfGroups_ = grib_arguments_get_name(hand, args, carg_++); numberOfGroups_ = args->get_name(hand, carg_++);
numberOfSecondOrderPackedValues_ = grib_arguments_get_name(hand, args, carg_++); numberOfSecondOrderPackedValues_ = args->get_name(hand, carg_++);
extraValues_ = grib_arguments_get_name(hand, args, carg_++); extraValues_ = args->get_name(hand, carg_++);
Ni_ = grib_arguments_get_name(hand, args, carg_++); Ni_ = args->get_name(hand, carg_++);
Nj_ = grib_arguments_get_name(hand, args, carg_++); Nj_ = args->get_name(hand, carg_++);
pl_ = grib_arguments_get_name(hand, args, carg_++); pl_ = args->get_name(hand, carg_++);
jPointsAreConsecutive_ = grib_arguments_get_name(hand, args, carg_++); jPointsAreConsecutive_ = args->get_name(hand, carg_++);
bitmap_ = grib_arguments_get_name(hand, args, carg_++); bitmap_ = args->get_name(hand, carg_++);
groupWidth_ = grib_arguments_get_name(hand, args, carg_++); groupWidth_ = args->get_name(hand, carg_++);
edition_ = 1; edition_ = 1;
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -58,28 +58,28 @@ void grib_accessor_data_g1second_order_general_extended_packing_t::init(const lo
grib_accessor_data_simple_packing_t::init(v, args); grib_accessor_data_simple_packing_t::init(v, args);
grib_handle* handle = grib_handle_of_accessor(this); grib_handle* handle = grib_handle_of_accessor(this);
half_byte_ = grib_arguments_get_name(handle, args, carg_++); half_byte_ = args->get_name(handle, carg_++);
packingType_ = grib_arguments_get_name(handle, args, carg_++); packingType_ = args->get_name(handle, carg_++);
ieee_packing_ = grib_arguments_get_name(handle, args, carg_++); ieee_packing_ = args->get_name(handle, carg_++);
precision_ = grib_arguments_get_name(handle, args, carg_++); precision_ = args->get_name(handle, carg_++);
widthOfFirstOrderValues_ = grib_arguments_get_name(handle, args, carg_++); widthOfFirstOrderValues_ = args->get_name(handle, carg_++);
firstOrderValues_ = grib_arguments_get_name(handle, args, carg_++); firstOrderValues_ = args->get_name(handle, carg_++);
N1_ = grib_arguments_get_name(handle, args, carg_++); N1_ = args->get_name(handle, carg_++);
N2_ = grib_arguments_get_name(handle, args, carg_++); N2_ = args->get_name(handle, carg_++);
numberOfGroups_ = grib_arguments_get_name(handle, args, carg_++); numberOfGroups_ = args->get_name(handle, carg_++);
codedNumberOfGroups_ = grib_arguments_get_name(handle, args, carg_++); codedNumberOfGroups_ = args->get_name(handle, carg_++);
numberOfSecondOrderPackedValues_ = grib_arguments_get_name(handle, args, carg_++); numberOfSecondOrderPackedValues_ = args->get_name(handle, carg_++);
extraValues_ = grib_arguments_get_name(handle, args, carg_++); extraValues_ = args->get_name(handle, carg_++);
groupWidths_ = grib_arguments_get_name(handle, args, carg_++); groupWidths_ = args->get_name(handle, carg_++);
widthOfWidths_ = grib_arguments_get_name(handle, args, carg_++); widthOfWidths_ = args->get_name(handle, carg_++);
groupLengths_ = grib_arguments_get_name(handle, args, carg_++); groupLengths_ = args->get_name(handle, carg_++);
widthOfLengths_ = grib_arguments_get_name(handle, args, carg_++); widthOfLengths_ = args->get_name(handle, carg_++);
NL_ = grib_arguments_get_name(handle, args, carg_++); NL_ = args->get_name(handle, carg_++);
SPD_ = grib_arguments_get_name(handle, args, carg_++); SPD_ = args->get_name(handle, carg_++);
widthOfSPD_ = grib_arguments_get_name(handle, args, carg_++); widthOfSPD_ = args->get_name(handle, carg_++);
orderOfSPD_ = grib_arguments_get_name(handle, args, carg_++); orderOfSPD_ = args->get_name(handle, carg_++);
numberOfPoints_ = grib_arguments_get_name(handle, args, carg_++); numberOfPoints_ = args->get_name(handle, carg_++);
dataFlag_ = grib_arguments_get_name(handle, args, carg_++); dataFlag_ = args->get_name(handle, carg_++);
edition_ = 1; edition_ = 1;
dirty_ = 1; dirty_ = 1;
dvalues_ = NULL; dvalues_ = NULL;

View File

@ -18,22 +18,22 @@ void grib_accessor_data_g1second_order_general_packing_t::init(const long v, gri
grib_accessor_data_simple_packing_t::init(v, args); grib_accessor_data_simple_packing_t::init(v, args);
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
half_byte_ = grib_arguments_get_name(hand, args, carg_++); half_byte_ = args->get_name(hand, carg_++);
packingType_ = grib_arguments_get_name(hand, args, carg_++); packingType_ = args->get_name(hand, carg_++);
ieee_packing_ = grib_arguments_get_name(hand, args, carg_++); ieee_packing_ = args->get_name(hand, carg_++);
precision_ = grib_arguments_get_name(hand, args, carg_++); precision_ = args->get_name(hand, carg_++);
widthOfFirstOrderValues_ = grib_arguments_get_name(hand, args, carg_++); widthOfFirstOrderValues_ = args->get_name(hand, carg_++);
N1_ = grib_arguments_get_name(hand, args, carg_++); N1_ = args->get_name(hand, carg_++);
N2_ = grib_arguments_get_name(hand, args, carg_++); N2_ = args->get_name(hand, carg_++);
numberOfGroups_ = grib_arguments_get_name(hand, args, carg_++); numberOfGroups_ = args->get_name(hand, carg_++);
numberOfSecondOrderPackedValues_ = grib_arguments_get_name(hand, args, carg_++); numberOfSecondOrderPackedValues_ = args->get_name(hand, carg_++);
extraValues_ = grib_arguments_get_name(hand, args, carg_++); extraValues_ = args->get_name(hand, carg_++);
Ni_ = grib_arguments_get_name(hand, args, carg_++); Ni_ = args->get_name(hand, carg_++);
Nj_ = grib_arguments_get_name(hand, args, carg_++); Nj_ = args->get_name(hand, carg_++);
pl_ = grib_arguments_get_name(hand, args, carg_++); pl_ = args->get_name(hand, carg_++);
jPointsAreConsecutive_ = grib_arguments_get_name(hand, args, carg_++); jPointsAreConsecutive_ = args->get_name(hand, carg_++);
bitmap_ = grib_arguments_get_name(hand, args, carg_++); bitmap_ = args->get_name(hand, carg_++);
groupWidths_ = grib_arguments_get_name(hand, args, carg_++); groupWidths_ = args->get_name(hand, carg_++);
edition_ = 1; edition_ = 1;
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -18,22 +18,22 @@ void grib_accessor_data_g1second_order_row_by_row_packing_t::init(const long v,
grib_accessor_data_simple_packing_t::init(v, args); grib_accessor_data_simple_packing_t::init(v, args);
grib_handle* gh = grib_handle_of_accessor(this); grib_handle* gh = grib_handle_of_accessor(this);
half_byte_ = grib_arguments_get_name(gh, args, carg_++); half_byte_ = args->get_name(gh, carg_++);
packingType_ = grib_arguments_get_name(gh, args, carg_++); packingType_ = args->get_name(gh, carg_++);
ieee_packing_ = grib_arguments_get_name(gh, args, carg_++); ieee_packing_ = args->get_name(gh, carg_++);
precision_ = grib_arguments_get_name(gh, args, carg_++); precision_ = args->get_name(gh, carg_++);
widthOfFirstOrderValues_ = grib_arguments_get_name(gh, args, carg_++); widthOfFirstOrderValues_ = args->get_name(gh, carg_++);
N1_ = grib_arguments_get_name(gh, args, carg_++); N1_ = args->get_name(gh, carg_++);
N2_ = grib_arguments_get_name(gh, args, carg_++); N2_ = args->get_name(gh, carg_++);
numberOfGroups_ = grib_arguments_get_name(gh, args, carg_++); numberOfGroups_ = args->get_name(gh, carg_++);
numberOfSecondOrderPackedValues_ = grib_arguments_get_name(gh, args, carg_++); numberOfSecondOrderPackedValues_ = args->get_name(gh, carg_++);
extraValues_ = grib_arguments_get_name(gh, args, carg_++); extraValues_ = args->get_name(gh, carg_++);
Ni_ = grib_arguments_get_name(gh, args, carg_++); Ni_ = args->get_name(gh, carg_++);
Nj_ = grib_arguments_get_name(gh, args, carg_++); Nj_ = args->get_name(gh, carg_++);
pl_ = grib_arguments_get_name(gh, args, carg_++); pl_ = args->get_name(gh, carg_++);
jPointsAreConsecutive_ = grib_arguments_get_name(gh, args, carg_++); jPointsAreConsecutive_ = args->get_name(gh, carg_++);
groupWidths_ = grib_arguments_get_name(gh, args, carg_++); groupWidths_ = args->get_name(gh, carg_++);
bitmap_ = grib_arguments_get_name(gh, args, carg_++); bitmap_ = args->get_name(gh, carg_++);
edition_ = 1; edition_ = 1;
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -16,7 +16,7 @@ grib_accessor* grib_accessor_data_g1secondary_bitmap = &_grib_accessor_data_g1se
void grib_accessor_data_g1secondary_bitmap_t::init(const long v, grib_arguments* args) void grib_accessor_data_g1secondary_bitmap_t::init(const long v, grib_arguments* args)
{ {
grib_accessor_data_secondary_bitmap_t::init(v, args); grib_accessor_data_secondary_bitmap_t::init(v, args);
number_of_ones_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 4); number_of_ones_ = args->get_name(grib_handle_of_accessor(this), 4);
} }
int grib_accessor_data_g1secondary_bitmap_t::value_count(long* count) int grib_accessor_data_g1secondary_bitmap_t::value_count(long* count)

View File

@ -18,10 +18,10 @@ void grib_accessor_data_g1simple_packing_t::init(const long v, grib_arguments* a
{ {
grib_accessor_data_simple_packing_t::init(v, args); grib_accessor_data_simple_packing_t::init(v, args);
half_byte_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); half_byte_ = args->get_name(grib_handle_of_accessor(this), carg_++);
packingType_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); packingType_ = args->get_name(grib_handle_of_accessor(this), carg_++);
ieee_packing_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); ieee_packing_ = args->get_name(grib_handle_of_accessor(this), carg_++);
precision_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); precision_ = args->get_name(grib_handle_of_accessor(this), carg_++);
edition_ = 1; edition_ = 1;
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -18,28 +18,28 @@ void grib_accessor_data_g22order_packing_t::init(const long v, grib_arguments* a
grib_accessor_values_t::init(v, args); grib_accessor_values_t::init(v, args);
grib_handle* gh = grib_handle_of_accessor(this); grib_handle* gh = grib_handle_of_accessor(this);
numberOfValues_ = grib_arguments_get_name(gh, args, carg_++); numberOfValues_ = args->get_name(gh, carg_++);
bits_per_value_ = grib_arguments_get_name(gh, args, carg_++); bits_per_value_ = args->get_name(gh, carg_++);
reference_value_ = grib_arguments_get_name(gh, args, carg_++); reference_value_ = args->get_name(gh, carg_++);
binary_scale_factor_ = grib_arguments_get_name(gh, args, carg_++); binary_scale_factor_ = args->get_name(gh, carg_++);
decimal_scale_factor_ = grib_arguments_get_name(gh, args, carg_++); decimal_scale_factor_ = args->get_name(gh, carg_++);
optimize_scale_factor_ = grib_arguments_get_name(gh, args, carg_++); optimize_scale_factor_ = args->get_name(gh, carg_++);
typeOfOriginalFieldValues_ = grib_arguments_get_name(gh, args, carg_++); typeOfOriginalFieldValues_ = args->get_name(gh, carg_++);
groupSplittingMethodUsed_ = grib_arguments_get_name(gh, args, carg_++); groupSplittingMethodUsed_ = args->get_name(gh, carg_++);
missingValueManagementUsed_ = grib_arguments_get_name(gh, args, carg_++); missingValueManagementUsed_ = args->get_name(gh, carg_++);
primaryMissingValueSubstitute_ = grib_arguments_get_name(gh, args, carg_++); primaryMissingValueSubstitute_ = args->get_name(gh, carg_++);
secondaryMissingValueSubstitute_ = grib_arguments_get_name(gh, args, carg_++); secondaryMissingValueSubstitute_ = args->get_name(gh, carg_++);
numberOfGroupsOfDataValues_ = grib_arguments_get_name(gh, args, carg_++); numberOfGroupsOfDataValues_ = args->get_name(gh, carg_++);
referenceForGroupWidths_ = grib_arguments_get_name(gh, args, carg_++); referenceForGroupWidths_ = args->get_name(gh, carg_++);
numberOfBitsUsedForTheGroupWidths_ = grib_arguments_get_name(gh, args, carg_++); numberOfBitsUsedForTheGroupWidths_ = args->get_name(gh, carg_++);
referenceForGroupLengths_ = grib_arguments_get_name(gh, args, carg_++); referenceForGroupLengths_ = args->get_name(gh, carg_++);
lengthIncrementForTheGroupLengths_ = grib_arguments_get_name(gh, args, carg_++); lengthIncrementForTheGroupLengths_ = args->get_name(gh, carg_++);
trueLengthOfLastGroup_ = grib_arguments_get_name(gh, args, carg_++); trueLengthOfLastGroup_ = args->get_name(gh, carg_++);
numberOfBitsUsedForTheScaledGroupLengths_ = grib_arguments_get_name(gh, args, carg_++); numberOfBitsUsedForTheScaledGroupLengths_ = args->get_name(gh, carg_++);
orderOfSpatialDifferencing_ = grib_arguments_get_name(gh, args, carg_++); orderOfSpatialDifferencing_ = args->get_name(gh, carg_++);
numberOfOctetsExtraDescriptors_ = grib_arguments_get_name(gh, args, carg_++); numberOfOctetsExtraDescriptors_ = args->get_name(gh, carg_++);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -20,19 +20,19 @@ void grib_accessor_data_g2bifourier_packing_t::init(const long v, grib_arguments
grib_accessor_data_simple_packing_t::init(v, args); grib_accessor_data_simple_packing_t::init(v, args);
grib_handle* gh = grib_handle_of_accessor(this); grib_handle* gh = grib_handle_of_accessor(this);
ieee_floats_ = grib_arguments_get_name(gh, args, carg_++); ieee_floats_ = args->get_name(gh, carg_++);
laplacianOperatorIsSet_ = grib_arguments_get_name(gh, args, carg_++); laplacianOperatorIsSet_ = args->get_name(gh, carg_++);
laplacianOperator_ = grib_arguments_get_name(gh, args, carg_++); laplacianOperator_ = args->get_name(gh, carg_++);
biFourierTruncationType_ = grib_arguments_get_name(gh, args, carg_++); biFourierTruncationType_ = args->get_name(gh, carg_++);
sub_i_ = grib_arguments_get_name(gh, args, carg_++); sub_i_ = args->get_name(gh, carg_++);
sub_j_ = grib_arguments_get_name(gh, args, carg_++); sub_j_ = args->get_name(gh, carg_++);
bif_i_ = grib_arguments_get_name(gh, args, carg_++); bif_i_ = args->get_name(gh, carg_++);
bif_j_ = grib_arguments_get_name(gh, args, carg_++); bif_j_ = args->get_name(gh, carg_++);
biFourierSubTruncationType_ = grib_arguments_get_name(gh, args, carg_++); biFourierSubTruncationType_ = args->get_name(gh, carg_++);
biFourierDoNotPackAxes_ = grib_arguments_get_name(gh, args, carg_++); biFourierDoNotPackAxes_ = args->get_name(gh, carg_++);
biFourierMakeTemplate_ = grib_arguments_get_name(gh, args, carg_++); biFourierMakeTemplate_ = args->get_name(gh, carg_++);
totalNumberOfValuesInUnpackedSubset_ = grib_arguments_get_name(gh, args, carg_++); totalNumberOfValuesInUnpackedSubset_ = args->get_name(gh, carg_++);
/*numberOfValues = grib_arguments_get_name(gh,args,carg_ ++);*/ /*numberOfValues = args->get_name(gh, carg_++);*/
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
dirty_ = 1; dirty_ = 1;

View File

@ -16,7 +16,7 @@ grib_accessor* grib_accessor_data_g2complex_packing = &_grib_accessor_data_g2com
void grib_accessor_data_g2complex_packing_t::init(const long v, grib_arguments* args) void grib_accessor_data_g2complex_packing_t::init(const long v, grib_arguments* args)
{ {
grib_accessor_data_complex_packing_t::init(v, args); grib_accessor_data_complex_packing_t::init(v, args);
numberOfValues_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); numberOfValues_ = args->get_name(grib_handle_of_accessor(this), carg_++);
edition_ = 2; edition_ = 2;
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;

View File

@ -16,7 +16,7 @@ grib_accessor* grib_accessor_data_g2secondary_bitmap = &_grib_accessor_data_g2se
void grib_accessor_data_g2secondary_bitmap_t::init(const long v, grib_arguments* args) void grib_accessor_data_g2secondary_bitmap_t::init(const long v, grib_arguments* args)
{ {
grib_accessor_data_secondary_bitmap_t::init(v, args); grib_accessor_data_secondary_bitmap_t::init(v, args);
number_of_values_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 4); number_of_values_ = args->get_name(grib_handle_of_accessor(this), 4);
} }
int grib_accessor_data_g2secondary_bitmap_t::value_count(long* len) int grib_accessor_data_g2secondary_bitmap_t::value_count(long* len)

View File

@ -17,8 +17,8 @@ void grib_accessor_data_g2shsimple_packing_t::init(const long v, grib_arguments*
{ {
grib_accessor_data_shsimple_packing_t::init(v, args); grib_accessor_data_shsimple_packing_t::init(v, args);
numberOfValues_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 2); numberOfValues_ = args->get_name(grib_handle_of_accessor(this), 2);
numberOfDataPoints_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 3); numberOfDataPoints_ = args->get_name(grib_handle_of_accessor(this), 3);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -18,8 +18,8 @@ grib_accessor* grib_accessor_data_g2simple_packing_with_preprocessing = &_grib_a
void grib_accessor_data_g2simple_packing_with_preprocessing_t::init(const long v, grib_arguments* args) void grib_accessor_data_g2simple_packing_with_preprocessing_t::init(const long v, grib_arguments* args)
{ {
grib_accessor_data_g2simple_packing_t::init(v, args); grib_accessor_data_g2simple_packing_t::init(v, args);
pre_processing_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); pre_processing_ = args->get_name(grib_handle_of_accessor(this), carg_++);
pre_processing_parameter_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); pre_processing_parameter_ = args->get_name(grib_handle_of_accessor(this), carg_++);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -25,13 +25,13 @@ void grib_accessor_data_jpeg2000_packing_t::init(const long v, grib_arguments* a
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
jpeg_lib_ = 0; jpeg_lib_ = 0;
type_of_compression_used_ = grib_arguments_get_name(hand, args, carg_++); type_of_compression_used_ = args->get_name(hand, carg_++);
target_compression_ratio_ = grib_arguments_get_name(hand, args, carg_++); target_compression_ratio_ = args->get_name(hand, carg_++);
ni_ = grib_arguments_get_name(hand, args, carg_++); ni_ = args->get_name(hand, carg_++);
nj_ = grib_arguments_get_name(hand, args, carg_++); nj_ = args->get_name(hand, carg_++);
list_defining_points_ = grib_arguments_get_name(hand, args, carg_++); list_defining_points_ = args->get_name(hand, carg_++);
number_of_data_points_ = grib_arguments_get_name(hand, args, carg_++); number_of_data_points_ = args->get_name(hand, carg_++);
scanning_mode_ = grib_arguments_get_name(hand, args, carg_++); scanning_mode_ = args->get_name(hand, carg_++);
edition_ = 2; edition_ = 2;
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;

View File

@ -21,16 +21,16 @@ void grib_accessor_data_png_packing_t::init(const long v, grib_arguments* args)
grib_accessor_values_t::init(v, args); grib_accessor_values_t::init(v, args);
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
number_of_values_ = grib_arguments_get_name(h, args, carg_++); number_of_values_ = args->get_name(h, carg_++);
reference_value_ = grib_arguments_get_name(h, args, carg_++); reference_value_ = args->get_name(h, carg_++);
binary_scale_factor_ = grib_arguments_get_name(h, args, carg_++); binary_scale_factor_ = args->get_name(h, carg_++);
decimal_scale_factor_ = grib_arguments_get_name(h, args, carg_++); decimal_scale_factor_ = args->get_name(h, carg_++);
bits_per_value_ = grib_arguments_get_name(h, args, carg_++); bits_per_value_ = args->get_name(h, carg_++);
ni_ = grib_arguments_get_name(h, args, carg_++); ni_ = args->get_name(h, carg_++);
nj_ = grib_arguments_get_name(h, args, carg_++); nj_ = args->get_name(h, carg_++);
list_defining_points_ = grib_arguments_get_name(h, args, carg_++); list_defining_points_ = args->get_name(h, carg_++);
number_of_data_points_ = grib_arguments_get_name(h, args, carg_++); number_of_data_points_ = args->get_name(h, carg_++);
scanning_mode_ = grib_arguments_get_name(h, args, carg_++); scanning_mode_ = args->get_name(h, carg_++);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -18,8 +18,8 @@ void grib_accessor_data_raw_packing_t::init(const long v, grib_arguments* args)
{ {
grib_accessor_values_t::init(v, args); grib_accessor_values_t::init(v, args);
number_of_values_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); number_of_values_ = args->get_name(grib_handle_of_accessor(this), carg_++);
precision_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, carg_++); precision_ = args->get_name(grib_handle_of_accessor(this), carg_++);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -18,12 +18,12 @@ void grib_accessor_data_run_length_packing_t::init(const long v, grib_arguments*
{ {
grib_accessor_values_t::init(v, args); grib_accessor_values_t::init(v, args);
grib_handle* gh = grib_handle_of_accessor(this); grib_handle* gh = grib_handle_of_accessor(this);
number_of_values_ = grib_arguments_get_name(gh, args, carg_++); number_of_values_ = args->get_name(gh, carg_++);
bits_per_value_ = grib_arguments_get_name(gh, args, carg_++); bits_per_value_ = args->get_name(gh, carg_++);
max_level_value_ = grib_arguments_get_name(gh, args, carg_++); max_level_value_ = args->get_name(gh, carg_++);
number_of_level_values_ = grib_arguments_get_name(gh, args, carg_++); number_of_level_values_ = args->get_name(gh, carg_++);
decimal_scale_factor_ = grib_arguments_get_name(gh, args, carg_++); decimal_scale_factor_ = args->get_name(gh, carg_++);
level_values_ = grib_arguments_get_name(gh, args, carg_++); level_values_ = args->get_name(gh, carg_++);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
} }

View File

@ -16,10 +16,10 @@ grib_accessor* grib_accessor_data_secondary_bitmap = &_grib_accessor_data_second
void grib_accessor_data_secondary_bitmap_t::init(const long v, grib_arguments* args) void grib_accessor_data_secondary_bitmap_t::init(const long v, grib_arguments* args)
{ {
grib_accessor_gen_t::init(v, args); grib_accessor_gen_t::init(v, args);
primary_bitmap_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 0); primary_bitmap_ = args->get_name(grib_handle_of_accessor(this), 0);
secondary_bitmap_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 1); secondary_bitmap_ = args->get_name(grib_handle_of_accessor(this), 1);
missing_value_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 2); missing_value_ = args->get_name(grib_handle_of_accessor(this), 2);
expand_by_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 3); expand_by_ = args->get_name(grib_handle_of_accessor(this), 3);
length_ = 0; length_ = 0;
} }

View File

@ -22,16 +22,16 @@ void grib_accessor_data_sh_packed_t::init(const long v, grib_arguments* args)
grib_accessor_data_simple_packing_t::init(v, args); grib_accessor_data_simple_packing_t::init(v, args);
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
GRIBEX_sh_bug_present_ = grib_arguments_get_name(hand, args, carg_++); GRIBEX_sh_bug_present_ = args->get_name(hand, carg_++);
ieee_floats_ = grib_arguments_get_name(hand, args, carg_++); ieee_floats_ = args->get_name(hand, carg_++);
laplacianOperatorIsSet_ = grib_arguments_get_name(hand, args, carg_++); laplacianOperatorIsSet_ = args->get_name(hand, carg_++);
laplacianOperator_ = grib_arguments_get_name(hand, args, carg_++); laplacianOperator_ = args->get_name(hand, carg_++);
sub_j_ = grib_arguments_get_name(hand, args, carg_++); sub_j_ = args->get_name(hand, carg_++);
sub_k_ = grib_arguments_get_name(hand, args, carg_++); sub_k_ = args->get_name(hand, carg_++);
sub_m_ = grib_arguments_get_name(hand, args, carg_++); sub_m_ = args->get_name(hand, carg_++);
pen_j_ = grib_arguments_get_name(hand, args, carg_++); pen_j_ = args->get_name(hand, carg_++);
pen_k_ = grib_arguments_get_name(hand, args, carg_++); pen_k_ = args->get_name(hand, carg_++);
pen_m_ = grib_arguments_get_name(hand, args, carg_++); pen_m_ = args->get_name(hand, carg_++);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
length_ = 0; length_ = 0;

View File

@ -22,16 +22,16 @@ void grib_accessor_data_sh_unpacked_t::init(const long v, grib_arguments* args)
grib_accessor_data_simple_packing_t::init(v, args); grib_accessor_data_simple_packing_t::init(v, args);
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
GRIBEX_sh_bug_present_ = grib_arguments_get_name(hand, args, carg_++); GRIBEX_sh_bug_present_ = args->get_name(hand, carg_++);
ieee_floats_ = grib_arguments_get_name(hand, args, carg_++); ieee_floats_ = args->get_name(hand, carg_++);
laplacianOperatorIsSet_ = grib_arguments_get_name(hand, args, carg_++); laplacianOperatorIsSet_ = args->get_name(hand, carg_++);
laplacianOperator_ = grib_arguments_get_name(hand, args, carg_++); laplacianOperator_ = args->get_name(hand, carg_++);
sub_j_ = grib_arguments_get_name(hand, args, carg_++); sub_j_ = args->get_name(hand, carg_++);
sub_k_ = grib_arguments_get_name(hand, args, carg_++); sub_k_ = args->get_name(hand, carg_++);
sub_m_ = grib_arguments_get_name(hand, args, carg_++); sub_m_ = args->get_name(hand, carg_++);
pen_j_ = grib_arguments_get_name(hand, args, carg_++); pen_j_ = args->get_name(hand, carg_++);
pen_k_ = grib_arguments_get_name(hand, args, carg_++); pen_k_ = args->get_name(hand, carg_++);
pen_m_ = grib_arguments_get_name(hand, args, carg_++); pen_m_ = args->get_name(hand, carg_++);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
length_ = 0; length_ = 0;

View File

@ -17,8 +17,8 @@ void grib_accessor_data_shsimple_packing_t::init(const long v, grib_arguments* a
{ {
grib_accessor_gen_t::init(v, args); grib_accessor_gen_t::init(v, args);
coded_values_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 0); coded_values_ = args->get_name(grib_handle_of_accessor(this), 0);
real_part_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 1); real_part_ = args->get_name(grib_handle_of_accessor(this), 1);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
length_ = 0; length_ = 0;

View File

@ -21,15 +21,15 @@ void grib_accessor_data_simple_packing_t::init(const long v, grib_arguments* arg
{ {
grib_accessor_values_t::init(v, args); grib_accessor_values_t::init(v, args);
grib_handle* gh = grib_handle_of_accessor(this); grib_handle* gh = grib_handle_of_accessor(this);
units_factor_ = grib_arguments_get_name(gh, args, carg_++); units_factor_ = args->get_name(gh, carg_++);
units_bias_ = grib_arguments_get_name(gh, args, carg_++); units_bias_ = args->get_name(gh, carg_++);
changing_precision_ = grib_arguments_get_name(gh, args, carg_++); changing_precision_ = args->get_name(gh, carg_++);
number_of_values_ = grib_arguments_get_name(gh, args, carg_++); number_of_values_ = args->get_name(gh, carg_++);
bits_per_value_ = grib_arguments_get_name(gh, args, carg_++); bits_per_value_ = args->get_name(gh, carg_++);
reference_value_ = grib_arguments_get_name(gh, args, carg_++); reference_value_ = args->get_name(gh, carg_++);
binary_scale_factor_ = grib_arguments_get_name(gh, args, carg_++); binary_scale_factor_ = args->get_name(gh, carg_++);
decimal_scale_factor_ = grib_arguments_get_name(gh, args, carg_++); decimal_scale_factor_ = args->get_name(gh, carg_++);
optimize_scaling_factor_ = grib_arguments_get_name(gh, args, carg_++); optimize_scaling_factor_ = args->get_name(gh, carg_++);
flags_ |= GRIB_ACCESSOR_FLAG_DATA; flags_ |= GRIB_ACCESSOR_FLAG_DATA;
dirty_ = 1; dirty_ = 1;
} }

View File

@ -18,10 +18,10 @@ void grib_accessor_decimal_precision_t::init(const long l, grib_arguments* args)
grib_accessor_long_t::init(l, args); grib_accessor_long_t::init(l, args);
int n = 0; int n = 0;
bits_per_value_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); bits_per_value_ = args->get_name(grib_handle_of_accessor(this), n++);
decimal_scale_factor_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); decimal_scale_factor_ = args->get_name(grib_handle_of_accessor(this), n++);
changing_precision_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); changing_precision_ = args->get_name(grib_handle_of_accessor(this), n++);
values_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, n++); values_ = args->get_name(grib_handle_of_accessor(this), n++);
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
length_ = 0; length_ = 0;

View File

@ -18,11 +18,11 @@ void grib_accessor_dictionary_t::init(const long len, grib_arguments* params)
grib_accessor_gen_t::init(len, params); grib_accessor_gen_t::init(len, params);
int n = 0; int n = 0;
dictionary_ = grib_arguments_get_string(grib_handle_of_accessor(this), params, n++); dictionary_ = params->get_string(grib_handle_of_accessor(this), n++);
key_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); key_ = params->get_name(grib_handle_of_accessor(this), n++);
column_ = grib_arguments_get_long(grib_handle_of_accessor(this), params, n++); column_ = params->get_long(grib_handle_of_accessor(this), n++);
masterDir_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); masterDir_ = params->get_name(grib_handle_of_accessor(this), n++);
localDir_ = grib_arguments_get_name(grib_handle_of_accessor(this), params, n++); localDir_ = params->get_name(grib_handle_of_accessor(this), n++);
length_ = 0; length_ = 0;
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;

View File

@ -16,7 +16,7 @@ grib_accessor* grib_accessor_dirty = &_grib_accessor_dirty;
void grib_accessor_dirty_t::init(const long l, grib_arguments* c) void grib_accessor_dirty_t::init(const long l, grib_arguments* c)
{ {
grib_accessor_long_t::init(l, c); grib_accessor_long_t::init(l, c);
accessor_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, 0); accessor_ = c->get_name(grib_handle_of_accessor(this), 0);
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
flags_ |= GRIB_ACCESSOR_FLAG_HIDDEN; flags_ |= GRIB_ACCESSOR_FLAG_HIDDEN;
length_ = 0; length_ = 0;

View File

@ -18,8 +18,8 @@ void grib_accessor_divdouble_t::init(const long l, grib_arguments* c)
grib_accessor_double_t::init(l, c); grib_accessor_double_t::init(l, c);
int n = 0; int n = 0;
val_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); val_ = c->get_name(grib_handle_of_accessor(this), n++);
divisor_ = grib_arguments_get_double(grib_handle_of_accessor(this), c, n++); divisor_ = c->get_double(grib_handle_of_accessor(this), n++);
} }
int grib_accessor_divdouble_t::unpack_double(double* val, size_t* len) int grib_accessor_divdouble_t::unpack_double(double* val, size_t* len)

View File

@ -19,8 +19,8 @@ void grib_accessor_element_t::init(const long l, grib_arguments* c)
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
int n = 0; int n = 0;
array_ = grib_arguments_get_name(hand, c, n++); array_ = c->get_name(hand, n++);
element_ = grib_arguments_get_long(hand, c, n++); element_ = c->get_long(hand, n++);
} }
static int check_element_index(const char* func, const char* array_name, long index, size_t size) static int check_element_index(const char* func, const char* array_name, long index, size_t size)

View File

@ -23,9 +23,9 @@ void grib_accessor_evaluate_t::init(const long l, grib_arguments* c)
int grib_accessor_evaluate_t::unpack_long(long* val, size_t* len) int grib_accessor_evaluate_t::unpack_long(long* val, size_t* len)
{ {
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
grib_expression* e = grib_arguments_get_expression(h, arg_, 0); grib_expression* e = arg_->get_expression(h, 0);
int ret = grib_expression_evaluate_long(h, e, val); int ret = e->evaluate_long(h, val);
*len = 1; *len = 1;
return ret; return ret;

View File

@ -34,17 +34,17 @@ void grib_accessor_expanded_descriptors_t::init(const long len, grib_arguments*
grib_accessor_long_t::init(len, args); grib_accessor_long_t::init(len, args);
int n = 0; int n = 0;
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
tablesAccessorName_ = grib_arguments_get_name(hand, args, n++); tablesAccessorName_ = args->get_name(hand, n++);
expandedName_ = grib_arguments_get_name(hand, args, n++); expandedName_ = args->get_name(hand, n++);
rank_ = grib_arguments_get_long(hand, args, n++); rank_ = args->get_long(hand, n++);
if (rank_ != 0) { if (rank_ != 0) {
expandedAccessor_ = dynamic_cast<grib_accessor_expanded_descriptors_t*>(grib_find_accessor(hand, expandedName_)); expandedAccessor_ = dynamic_cast<grib_accessor_expanded_descriptors_t*>(grib_find_accessor(hand, expandedName_));
} }
else { else {
expandedAccessor_ = 0; expandedAccessor_ = 0;
} }
unexpandedDescriptors_ = grib_arguments_get_name(hand, args, n++); unexpandedDescriptors_ = args->get_name(hand, n++);
sequence_ = grib_arguments_get_name(hand, args, n++); sequence_ = args->get_name(hand, n++);
do_expand_ = 1; do_expand_ = 1;
expanded_ = 0; expanded_ = 0;
length_ = 0; length_ = 0;

View File

@ -20,8 +20,8 @@ void grib_accessor_from_scale_factor_scaled_value_t::init(const long l, grib_arg
int n = 0; int n = 0;
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
scaleFactor_ = grib_arguments_get_name(hand, c, n++); scaleFactor_ = c->get_name(hand, n++);
scaledValue_ = grib_arguments_get_name(hand, c, n++); // Can be scalar or array scaledValue_ = c->get_name(hand, n++); // Can be scalar or array
// ECC-979: Allow user to encode // ECC-979: Allow user to encode
// flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; // flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;

View File

@ -16,7 +16,7 @@ grib_accessor* grib_accessor_g1_message_length = &_grib_accessor_g1_message_leng
void grib_accessor_g1_message_length_t::init(const long len, grib_arguments* args) void grib_accessor_g1_message_length_t::init(const long len, grib_arguments* args)
{ {
grib_accessor_section_length_t::init(len, args); grib_accessor_section_length_t::init(len, args);
sec4_length_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 0); sec4_length_ = args->get_name(grib_handle_of_accessor(this), 0);
} }
int grib_get_g1_message_size(grib_handle* h, grib_accessor* tl, grib_accessor* s4, int grib_get_g1_message_size(grib_handle* h, grib_accessor* tl, grib_accessor* s4,

View File

@ -16,7 +16,7 @@ grib_accessor* grib_accessor_g1_section4_length = &_grib_accessor_g1_section4_le
void grib_accessor_g1_section4_length_t::init(const long len, grib_arguments* args) void grib_accessor_g1_section4_length_t::init(const long len, grib_arguments* args)
{ {
grib_accessor_section_length_t::init(len, args); grib_accessor_section_length_t::init(len, args);
total_length_ = grib_arguments_get_name(grib_handle_of_accessor(this), args, 0); total_length_ = args->get_name(grib_handle_of_accessor(this), 0);
} }
int grib_accessor_g1_section4_length_t::pack_long(const long* val, size_t* len) int grib_accessor_g1_section4_length_t::pack_long(const long* val, size_t* len)

View File

@ -16,7 +16,7 @@ grib_accessor* grib_accessor_g1bitmap = &_grib_accessor_g1bitmap;
void grib_accessor_g1bitmap_t::init(const long len, grib_arguments* arg) void grib_accessor_g1bitmap_t::init(const long len, grib_arguments* arg)
{ {
grib_accessor_bitmap_t::init(len, arg); grib_accessor_bitmap_t::init(len, arg);
unusedBits_ = grib_arguments_get_name(grib_handle_of_accessor(this), arg, 4); unusedBits_ = arg->get_name(grib_handle_of_accessor(this), 4);
} }
int grib_accessor_g1bitmap_t::pack_double(const double* val, size_t* len) int grib_accessor_g1bitmap_t::pack_double(const double* val, size_t* len)

View File

@ -19,10 +19,10 @@ void grib_accessor_g1date_t::init(const long l, grib_arguments* c)
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
int n = 0; int n = 0;
century_ = grib_arguments_get_name(hand, c, n++); century_ = c->get_name(hand, n++);
year_ = grib_arguments_get_name(hand, c, n++); year_ = c->get_name(hand, n++);
month_ = grib_arguments_get_name(hand, c, n++); month_ = c->get_name(hand, n++);
day_ = grib_arguments_get_name(hand, c, n++); day_ = c->get_name(hand, n++);
} }
int grib_accessor_g1date_t::unpack_long(long* val, size_t* len) int grib_accessor_g1date_t::unpack_long(long* val, size_t* len)

View File

@ -18,7 +18,7 @@ void grib_accessor_g1end_of_interval_monthly_t::init(const long l, grib_argument
grib_accessor_abstract_vector_t::init(l, c); grib_accessor_abstract_vector_t::init(l, c);
int n = 0; int n = 0;
verifyingMonth_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); verifyingMonth_ = c->get_name(grib_handle_of_accessor(this), n++);
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
flags_ |= GRIB_ACCESSOR_FLAG_HIDDEN; flags_ |= GRIB_ACCESSOR_FLAG_HIDDEN;

View File

@ -18,14 +18,14 @@ void grib_accessor_g1forecastmonth_t::init(const long l, grib_arguments* c)
grib_accessor_long_t::init(l, c); grib_accessor_long_t::init(l, c);
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
int n = 0; int n = 0;
const int count = grib_arguments_get_count(c); const int count = c->get_count();
if (count == 6) { /* GRIB1 case -- this needs to be refactored */ if (count == 6) { /* GRIB1 case -- this needs to be refactored */
verification_yearmonth_ = grib_arguments_get_name(h, c, n++); verification_yearmonth_ = c->get_name(h, n++);
base_date_ = grib_arguments_get_name(h, c, n++); base_date_ = c->get_name(h, n++);
day_ = grib_arguments_get_name(h, c, n++); day_ = c->get_name(h, n++);
hour_ = grib_arguments_get_name(h, c, n++); hour_ = c->get_name(h, n++);
fcmonth_ = grib_arguments_get_name(h, c, n++); fcmonth_ = c->get_name(h, n++);
check_ = grib_arguments_get_name(h, c, n++); check_ = c->get_name(h, n++);
} }
} }

View File

@ -18,7 +18,7 @@ void grib_accessor_g1monthlydate_t::init(const long l, grib_arguments* c)
grib_accessor_long_t::init(l, c); grib_accessor_long_t::init(l, c);
int n = 0; int n = 0;
date_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); date_ = c->get_name(grib_handle_of_accessor(this), n++);
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;
} }

View File

@ -17,14 +17,14 @@ void grib_accessor_g1number_of_coded_values_sh_complex_t::init(const long l, gri
{ {
grib_accessor_long_t::init(l, c); grib_accessor_long_t::init(l, c);
int n = 0; int n = 0;
bitsPerValue_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); bitsPerValue_ = c->get_name(grib_handle_of_accessor(this), n++);
offsetBeforeData_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); offsetBeforeData_ = c->get_name(grib_handle_of_accessor(this), n++);
offsetAfterData_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); offsetAfterData_ = c->get_name(grib_handle_of_accessor(this), n++);
unusedBits_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); unusedBits_ = c->get_name(grib_handle_of_accessor(this), n++);
numberOfValues_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); numberOfValues_ = c->get_name(grib_handle_of_accessor(this), n++);
JS_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); JS_ = c->get_name(grib_handle_of_accessor(this), n++);
KS_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); KS_ = c->get_name(grib_handle_of_accessor(this), n++);
MS_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); MS_ = c->get_name(grib_handle_of_accessor(this), n++);
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
length_ = 0; length_ = 0;

View File

@ -17,11 +17,11 @@ void grib_accessor_g1number_of_coded_values_sh_simple_t::init(const long l, grib
{ {
grib_accessor_long_t::init(l, c); grib_accessor_long_t::init(l, c);
int n = 0; int n = 0;
bitsPerValue_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); bitsPerValue_ = c->get_name(grib_handle_of_accessor(this), n++);
offsetBeforeData_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); offsetBeforeData_ = c->get_name(grib_handle_of_accessor(this), n++);
offsetAfterData_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); offsetAfterData_ = c->get_name(grib_handle_of_accessor(this), n++);
unusedBits_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); unusedBits_ = c->get_name(grib_handle_of_accessor(this), n++);
numberOfValues_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); numberOfValues_ = c->get_name(grib_handle_of_accessor(this), n++);
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
length_ = 0; length_ = 0;

View File

@ -18,13 +18,13 @@ void grib_accessor_g1step_range_t::init(const long l, grib_arguments* c)
grib_accessor_abstract_long_vector_t::init(l, c); grib_accessor_abstract_long_vector_t::init(l, c);
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
int n = 0; int n = 0;
p1_ = grib_arguments_get_name(h, c, n++); p1_ = c->get_name(h, n++);
p2_ = grib_arguments_get_name(h, c, n++); p2_ = c->get_name(h, n++);
timeRangeIndicator_ = grib_arguments_get_name(h, c, n++); timeRangeIndicator_ = c->get_name(h, n++);
unit_ = grib_arguments_get_name(h, c, n++); unit_ = c->get_name(h, n++);
step_unit_ = grib_arguments_get_name(h, c, n++); step_unit_ = c->get_name(h, n++);
stepType_ = grib_arguments_get_name(h, c, n++); stepType_ = c->get_name(h, n++);
patch_fp_precip_ = grib_arguments_get_name(h, c, n++); patch_fp_precip_ = c->get_name(h, n++);
error_on_units_ = 1; error_on_units_ = 1;
number_of_elements_ = 2; number_of_elements_ = 2;

View File

@ -18,9 +18,9 @@ void grib_accessor_g1verificationdate_t::init(const long l, grib_arguments* c)
grib_accessor_long_t::init(l, c); grib_accessor_long_t::init(l, c);
int n = 0; int n = 0;
date_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); date_ = c->get_name(grib_handle_of_accessor(this), n++);
time_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); time_ = c->get_name(grib_handle_of_accessor(this), n++);
step_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); step_ = c->get_name(grib_handle_of_accessor(this), n++);
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;
} }

View File

@ -19,9 +19,9 @@ void grib_accessor_g2_aerosol_t::init(const long l, grib_arguments* c)
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
int n = 0; int n = 0;
productDefinitionTemplateNumber_ = grib_arguments_get_name(hand, c, n++); productDefinitionTemplateNumber_ = c->get_name(hand, n++);
stepType_ = grib_arguments_get_name(hand, c, n++); stepType_ = c->get_name(hand, n++);
optical_ = grib_arguments_get_long(hand, c, n++); optical_ = c->get_long(hand, n++);
} }
int grib_accessor_g2_aerosol_t::unpack_long(long* val, size_t* len) int grib_accessor_g2_aerosol_t::unpack_long(long* val, size_t* len)

View File

@ -28,9 +28,9 @@ void grib_accessor_g2_chemical_t::init(const long l, grib_arguments* c)
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
int n = 0; int n = 0;
productDefinitionTemplateNumber_ = grib_arguments_get_name(hand, c, n++); productDefinitionTemplateNumber_ = c->get_name(hand, n++);
stepType_ = grib_arguments_get_name(hand, c, n++); stepType_ = c->get_name(hand, n++);
chemical_type_ = grib_arguments_get_long(hand, c, n++); chemical_type_ = c->get_long(hand, n++);
} }
int grib_accessor_g2_chemical_t::unpack_long(long* val, size_t* len) int grib_accessor_g2_chemical_t::unpack_long(long* val, size_t* len)

View File

@ -18,11 +18,11 @@ void grib_accessor_g2_eps_t::init(const long l, grib_arguments* c)
grib_accessor_unsigned_t::init(l, c); grib_accessor_unsigned_t::init(l, c);
int n = 0; int n = 0;
productDefinitionTemplateNumber_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); productDefinitionTemplateNumber_ = c->get_name(grib_handle_of_accessor(this), n++);
type_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); type_ = c->get_name(grib_handle_of_accessor(this), n++);
stream_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); stream_ = c->get_name(grib_handle_of_accessor(this), n++);
stepType_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); stepType_ = c->get_name(grib_handle_of_accessor(this), n++);
derivedForecast_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); derivedForecast_ = c->get_name(grib_handle_of_accessor(this), n++);
} }
int grib_accessor_g2_eps_t::unpack_long(long* val, size_t* len) int grib_accessor_g2_eps_t::unpack_long(long* val, size_t* len)

View File

@ -19,16 +19,16 @@ void grib_accessor_g2_mars_labeling_t::init(const long l, grib_arguments* c)
int n = 0; int n = 0;
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
index_ = grib_arguments_get_long(hand, c, n++); index_ = c->get_long(hand, n++);
the_class_ = grib_arguments_get_name(hand, c, n++); the_class_ = c->get_name(hand, n++);
type_ = grib_arguments_get_name(hand, c, n++); type_ = c->get_name(hand, n++);
stream_ = grib_arguments_get_name(hand, c, n++); stream_ = c->get_name(hand, n++);
expver_ = grib_arguments_get_name(hand, c, n++); expver_ = c->get_name(hand, n++);
typeOfProcessedData_ = grib_arguments_get_name(hand, c, n++); typeOfProcessedData_ = c->get_name(hand, n++);
productDefinitionTemplateNumber_ = grib_arguments_get_name(hand, c, n++); productDefinitionTemplateNumber_ = c->get_name(hand, n++);
stepType_ = grib_arguments_get_name(hand, c, n++); stepType_ = c->get_name(hand, n++);
derivedForecast_ = grib_arguments_get_name(hand, c, n++); derivedForecast_ = c->get_name(hand, n++);
typeOfGeneratingProcess_ = grib_arguments_get_name(hand, c, n++); typeOfGeneratingProcess_ = c->get_name(hand, n++);
} }
int grib_accessor_g2_mars_labeling_t::unpack_long(long* val, size_t* len) int grib_accessor_g2_mars_labeling_t::unpack_long(long* val, size_t* len)

View File

@ -17,7 +17,7 @@ void grib_accessor_g2bitmap_t::init(const long len, grib_arguments* arg)
{ {
grib_accessor_bitmap_t::init(len, arg); grib_accessor_bitmap_t::init(len, arg);
numberOfValues_ = grib_arguments_get_name(grib_handle_of_accessor(this), arg, 4); numberOfValues_ = arg->get_name(grib_handle_of_accessor(this), 4);
} }
// For speed use a local static function // For speed use a local static function

View File

@ -17,7 +17,7 @@ void grib_accessor_g2bitmap_present_t::init(const long l, grib_arguments* c)
{ {
grib_accessor_long_t::init(l, c); grib_accessor_long_t::init(l, c);
int n = 0; int n = 0;
bitmapIndicator_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); bitmapIndicator_ = c->get_name(grib_handle_of_accessor(this), n++);
length_ = 0; length_ = 0;
} }

View File

@ -18,9 +18,9 @@ void grib_accessor_g2date_t::init(const long l, grib_arguments* c)
grib_accessor_long_t::init(l, c); grib_accessor_long_t::init(l, c);
int n = 0; int n = 0;
year_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); year_ = c->get_name(grib_handle_of_accessor(this), n++);
month_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); month_ = c->get_name(grib_handle_of_accessor(this), n++);
day_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); day_ = c->get_name(grib_handle_of_accessor(this), n++);
} }
int grib_accessor_g2date_t::unpack_long(long* val, size_t* len) int grib_accessor_g2date_t::unpack_long(long* val, size_t* len)

View File

@ -22,27 +22,27 @@ void grib_accessor_g2end_step_t::init(const long l, grib_arguments* c)
int n = 0; int n = 0;
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
start_step_value_ = grib_arguments_get_name(h, c, n++); start_step_value_ = c->get_name(h, n++);
step_units_ = grib_arguments_get_name(h, c, n++); step_units_ = c->get_name(h, n++);
year_ = grib_arguments_get_name(h, c, n++); year_ = c->get_name(h, n++);
month_ = grib_arguments_get_name(h, c, n++); month_ = c->get_name(h, n++);
day_ = grib_arguments_get_name(h, c, n++); day_ = c->get_name(h, n++);
hour_ = grib_arguments_get_name(h, c, n++); hour_ = c->get_name(h, n++);
minute_ = grib_arguments_get_name(h, c, n++); minute_ = c->get_name(h, n++);
second_ = grib_arguments_get_name(h, c, n++); second_ = c->get_name(h, n++);
year_of_end_of_interval_ = grib_arguments_get_name(h, c, n++); year_of_end_of_interval_ = c->get_name(h, n++);
month_of_end_of_interval_ = grib_arguments_get_name(h, c, n++); month_of_end_of_interval_ = c->get_name(h, n++);
day_of_end_of_interval_ = grib_arguments_get_name(h, c, n++); day_of_end_of_interval_ = c->get_name(h, n++);
hour_of_end_of_interval_ = grib_arguments_get_name(h, c, n++); hour_of_end_of_interval_ = c->get_name(h, n++);
minute_of_end_of_interval_ = grib_arguments_get_name(h, c, n++); minute_of_end_of_interval_ = c->get_name(h, n++);
second_of_end_of_interval_ = grib_arguments_get_name(h, c, n++); second_of_end_of_interval_ = c->get_name(h, n++);
time_range_unit_ = grib_arguments_get_name(h, c, n++); time_range_unit_ = c->get_name(h, n++);
time_range_value_ = grib_arguments_get_name(h, c, n++); time_range_value_ = c->get_name(h, n++);
typeOfTimeIncrement_ = grib_arguments_get_name(h, c, n++); typeOfTimeIncrement_ = c->get_name(h, n++);
numberOfTimeRanges_ = grib_arguments_get_name(h, c, n++); numberOfTimeRanges_ = c->get_name(h, n++);
} }
void grib_accessor_g2end_step_t::dump(grib_dumper* dumper) void grib_accessor_g2end_step_t::dump(grib_dumper* dumper)

View File

@ -19,14 +19,14 @@ void grib_accessor_g2grid_t::init(const long l, grib_arguments* c)
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
int n = 0; int n = 0;
latitude_first_ = grib_arguments_get_name(hand, c, n++); latitude_first_ = c->get_name(hand, n++);
longitude_first_ = grib_arguments_get_name(hand, c, n++); longitude_first_ = c->get_name(hand, n++);
latitude_last_ = grib_arguments_get_name(hand, c, n++); latitude_last_ = c->get_name(hand, n++);
longitude_last_ = grib_arguments_get_name(hand, c, n++); longitude_last_ = c->get_name(hand, n++);
i_increment_ = grib_arguments_get_name(hand, c, n++); i_increment_ = c->get_name(hand, n++);
j_increment_ = grib_arguments_get_name(hand, c, n++); j_increment_ = c->get_name(hand, n++);
basic_angle_ = grib_arguments_get_name(hand, c, n++); basic_angle_ = c->get_name(hand, n++);
sub_division_ = grib_arguments_get_name(hand, c, n++); sub_division_ = c->get_name(hand, n++);
flags_ |= GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC | GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC | GRIB_ACCESSOR_FLAG_READ_ONLY;
} }

View File

@ -19,9 +19,9 @@ void grib_accessor_g2latlon_t::init(const long l, grib_arguments* c)
grib_accessor_double_t::init(l, c); grib_accessor_double_t::init(l, c);
int n = 0; int n = 0;
grid_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); grid_ = c->get_name(grib_handle_of_accessor(this), n++);
index_ = grib_arguments_get_long(grib_handle_of_accessor(this), c, n++); index_ = c->get_long(grib_handle_of_accessor(this), n++);
given_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); given_ = c->get_name(grib_handle_of_accessor(this), n++);
} }
int grib_accessor_g2latlon_t::unpack_double(double* val, size_t* len) int grib_accessor_g2latlon_t::unpack_double(double* val, size_t* len)

View File

@ -19,10 +19,10 @@ void grib_accessor_g2level_t::init(const long l, grib_arguments* c)
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
int n = 0; int n = 0;
type_first_ = grib_arguments_get_name(hand, c, n++); type_first_ = c->get_name(hand, n++);
scale_first_ = grib_arguments_get_name(hand, c, n++); scale_first_ = c->get_name(hand, n++);
value_first_ = grib_arguments_get_name(hand, c, n++); value_first_ = c->get_name(hand, n++);
pressure_units_ = grib_arguments_get_name(hand, c, n++); pressure_units_ = c->get_name(hand, n++);
// See ECC-1644 // See ECC-1644
flags_ |= GRIB_ACCESSOR_FLAG_COPY_IF_CHANGING_EDITION; flags_ |= GRIB_ACCESSOR_FLAG_COPY_IF_CHANGING_EDITION;

View File

@ -19,7 +19,7 @@ void grib_accessor_g2lon_t::init(const long l, grib_arguments* c)
grib_accessor_double_t::init(l, c); grib_accessor_double_t::init(l, c);
int n = 0; int n = 0;
longitude_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); longitude_ = c->get_name(grib_handle_of_accessor(this), n++);
} }
int grib_accessor_g2lon_t::unpack_double(double* val, size_t* len) int grib_accessor_g2lon_t::unpack_double(double* val, size_t* len)

View File

@ -22,8 +22,8 @@ void grib_accessor_g2step_range_t::init(const long l, grib_arguments* c)
int n = 0; int n = 0;
start_step_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); start_step_ = c->get_name(grib_handle_of_accessor(this), n++);
end_step_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); end_step_ = c->get_name(grib_handle_of_accessor(this), n++);
length_ = 0; length_ = 0;
} }

View File

@ -18,9 +18,9 @@ void grib_accessor_gaussian_grid_name_t::init(const long len, grib_arguments* ar
grib_accessor_gen_t::init(len, arg); grib_accessor_gen_t::init(len, arg);
int n = 0; int n = 0;
N_ = grib_arguments_get_name(parent_->h, arg, n++); N_ = arg->get_name(parent_->h, n++);
Ni_ = grib_arguments_get_name(parent_->h, arg, n++); Ni_ = arg->get_name(parent_->h, n++);
isOctahedral_ = grib_arguments_get_name(parent_->h, arg, n++); isOctahedral_ = arg->get_name(parent_->h, n++);
length_ = 0; length_ = 0;
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;
flags_ |= GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC; flags_ |= GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC;

View File

@ -18,10 +18,10 @@ void grib_accessor_gds_is_present_t::init(const long l, grib_arguments* c)
grib_accessor_long_t::init(l, c); grib_accessor_long_t::init(l, c);
int n = 0; int n = 0;
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
gds_present_ = grib_arguments_get_name(h, c, n++); gds_present_ = c->get_name(h, n++);
grid_definition_ = grib_arguments_get_name(h, c, n++); grid_definition_ = c->get_name(h, n++);
bitmap_present_ = grib_arguments_get_name(h, c, n++); bitmap_present_ = c->get_name(h, n++);
values_ = grib_arguments_get_name(h, c, n++); values_ = c->get_name(h, n++);
flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION; flags_ |= GRIB_ACCESSOR_FLAG_FUNCTION;
flags_ |= GRIB_ACCESSOR_FLAG_HIDDEN; flags_ |= GRIB_ACCESSOR_FLAG_HIDDEN;

View File

@ -19,11 +19,11 @@ void grib_accessor_gds_not_present_bitmap_t::init(const long v, grib_arguments*
int n = 0; int n = 0;
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
missing_value_ = grib_arguments_get_name(hand, args, n++); missing_value_ = args->get_name(hand, n++);
number_of_values_ = grib_arguments_get_name(hand, args, n++); number_of_values_ = args->get_name(hand, n++);
number_of_points_ = grib_arguments_get_name(hand, args, n++); number_of_points_ = args->get_name(hand, n++);
latitude_of_first_point_ = grib_arguments_get_name(hand, args, n++); latitude_of_first_point_ = args->get_name(hand, n++);
ni_ = grib_arguments_get_name(hand, args, n++); ni_ = args->get_name(hand, n++);
length_ = 0; length_ = 0;
} }

View File

@ -37,24 +37,24 @@ void grib_accessor_gen_t::init(const long len, grib_arguments* param)
int ret = 0; int ret = 0;
double d; double d;
char tmp[1024]; char tmp[1024];
grib_expression* expression = grib_arguments_get_expression(grib_handle_of_accessor(this), act->default_value, 0); grib_expression* expression = act->default_value->get_expression(grib_handle_of_accessor(this), 0);
int type = grib_expression_native_type(grib_handle_of_accessor(this), expression); int type = expression->native_type(grib_handle_of_accessor(this));
switch (type) { switch (type) {
// TODO(maee): add single-precision case // TODO(maee): add single-precision case
case GRIB_TYPE_DOUBLE: case GRIB_TYPE_DOUBLE:
grib_expression_evaluate_double(grib_handle_of_accessor(this), expression, &d); expression->evaluate_double(grib_handle_of_accessor(this), &d);
pack_double(&d, &s_len); pack_double(&d, &s_len);
break; break;
case GRIB_TYPE_LONG: case GRIB_TYPE_LONG:
grib_expression_evaluate_long(grib_handle_of_accessor(this), expression, &l); expression->evaluate_long(grib_handle_of_accessor(this), &l);
pack_long(&l, &s_len); pack_long(&l, &s_len);
break; break;
default: default:
s_len = sizeof(tmp); s_len = sizeof(tmp);
p = grib_expression_evaluate_string(grib_handle_of_accessor(this), expression, tmp, &s_len, &ret); p = expression->evaluate_string(grib_handle_of_accessor(this), tmp, &s_len, &ret);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(context_, GRIB_LOG_ERROR, "Unable to evaluate %s as string", name_); grib_context_log(context_, GRIB_LOG_ERROR, "Unable to evaluate %s as string", name_);
Assert(0); Assert(0);
@ -259,13 +259,13 @@ int grib_accessor_gen_t::pack_expression(grib_expression* e)
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
// Use the native type of the expression not the accessor // Use the native type of the expression not the accessor
switch (grib_expression_native_type(hand, e)) { switch (e->native_type(hand)) {
case GRIB_TYPE_LONG: { case GRIB_TYPE_LONG: {
len = 1; len = 1;
ret = grib_expression_evaluate_long(hand, e, &lval); ret = e->evaluate_long(hand, &lval);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(context_, GRIB_LOG_ERROR, "Unable to set %s as long (from %s)", grib_context_log(context_, GRIB_LOG_ERROR, "Unable to set %s as long (from %s)",
name_, e->cclass->name); name_, e->class_name());
return ret; return ret;
} }
/*if (hand->context->debug) /*if (hand->context->debug)
@ -275,10 +275,10 @@ int grib_accessor_gen_t::pack_expression(grib_expression* e)
case GRIB_TYPE_DOUBLE: { case GRIB_TYPE_DOUBLE: {
len = 1; len = 1;
ret = grib_expression_evaluate_double(hand, e, &dval); ret = e->evaluate_double(hand, &dval);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(context_, GRIB_LOG_ERROR, "Unable to set %s as double (from %s)", grib_context_log(context_, GRIB_LOG_ERROR, "Unable to set %s as double (from %s)",
name_, e->cclass->name); name_, e->class_name());
return ret; return ret;
} }
/*if (hand->context->debug) /*if (hand->context->debug)
@ -289,10 +289,10 @@ int grib_accessor_gen_t::pack_expression(grib_expression* e)
case GRIB_TYPE_STRING: { case GRIB_TYPE_STRING: {
char tmp[1024]; char tmp[1024];
len = sizeof(tmp); len = sizeof(tmp);
cval = grib_expression_evaluate_string(hand, e, tmp, &len, &ret); cval = e->evaluate_string(hand, tmp, &len, &ret);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(context_, GRIB_LOG_ERROR, "Unable to set %s as string (from %s)", grib_context_log(context_, GRIB_LOG_ERROR, "Unable to set %s as string (from %s)",
name_, e->cclass->name); name_, e->class_name());
return ret; return ret;
} }
len = strlen(cval); len = strlen(cval);

View File

@ -18,8 +18,8 @@ void grib_accessor_getenv_t::init(const long l, grib_arguments* args)
grib_accessor_ascii_t::init(l, args); grib_accessor_ascii_t::init(l, args);
static char undefined[] = "undefined"; static char undefined[] = "undefined";
envvar_ = grib_arguments_get_string(grib_handle_of_accessor(this), args, 0); envvar_ = args->get_string(grib_handle_of_accessor(this), 0);
default_value_ = grib_arguments_get_string(grib_handle_of_accessor(this), args, 1); default_value_ = args->get_string(grib_handle_of_accessor(this), 1);
if (!default_value_) if (!default_value_)
default_value_ = undefined; default_value_ = undefined;
value_ = 0; value_ = 0;

View File

@ -19,17 +19,17 @@ void grib_accessor_global_gaussian_t::init(const long l, grib_arguments* c)
int n = 0; int n = 0;
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
N_ = grib_arguments_get_name(h, c, n++); N_ = c->get_name(h, n++);
Ni_ = grib_arguments_get_name(h, c, n++); Ni_ = c->get_name(h, n++);
di_ = grib_arguments_get_name(h, c, n++); di_ = c->get_name(h, n++);
latfirst_ = grib_arguments_get_name(h, c, n++); latfirst_ = c->get_name(h, n++);
lonfirst_ = grib_arguments_get_name(h, c, n++); lonfirst_ = c->get_name(h, n++);
latlast_ = grib_arguments_get_name(h, c, n++); latlast_ = c->get_name(h, n++);
lonlast_ = grib_arguments_get_name(h, c, n++); lonlast_ = c->get_name(h, n++);
plpresent_ = grib_arguments_get_name(h, c, n++); plpresent_ = c->get_name(h, n++);
pl_ = grib_arguments_get_name(h, c, n++); pl_ = c->get_name(h, n++);
basic_angle_ = grib_arguments_get_name(h, c, n++); basic_angle_ = c->get_name(h, n++);
subdivision_ = grib_arguments_get_name(h, c, n++); subdivision_ = c->get_name(h, n++);
} }
int grib_accessor_global_gaussian_t::unpack_long(long* val, size_t* len) int grib_accessor_global_gaussian_t::unpack_long(long* val, size_t* len)

View File

@ -20,7 +20,7 @@ void grib_accessor_group_t::init(const long len, grib_arguments* arg)
size_t i = 0; size_t i = 0;
unsigned char* v; unsigned char* v;
const char* s = grib_arguments_get_string(grib_handle_of_accessor(this), arg, 0); const char* s = arg ? arg->get_string(grib_handle_of_accessor(this), 0) : nullptr;
if (s && strlen(s) > 1) { if (s && strlen(s) > 1) {
grib_context_log(context_, GRIB_LOG_WARNING, grib_context_log(context_, GRIB_LOG_WARNING,

View File

@ -16,10 +16,8 @@ grib_accessor* grib_accessor_gts_header = &_grib_accessor_gts_header;
void grib_accessor_gts_header_t::init(const long l, grib_arguments* c) void grib_accessor_gts_header_t::init(const long l, grib_arguments* c)
{ {
grib_accessor_ascii_t::init(l, c); grib_accessor_ascii_t::init(l, c);
gts_offset_ = -1; gts_offset_ = c ? c->get_long(grib_handle_of_accessor(this), 0) : 0;
gts_length_ = -1; gts_length_ = c ? c->get_long(grib_handle_of_accessor(this), 1) : 0;
gts_offset_ = grib_arguments_get_long(grib_handle_of_accessor(this), c, 0);
gts_length_ = grib_arguments_get_long(grib_handle_of_accessor(this), c, 1);
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;
} }

View File

@ -102,7 +102,7 @@ int grib_accessor_ibmfloat_t::pack_double(const double* val, size_t* len)
for (i = 0; i < rlen; i++) { for (i = 0; i < rlen; i++) {
grib_encode_unsigned_longb(buf, grib_ibm_to_long(val[i]), &off, 32); grib_encode_unsigned_longb(buf, grib_ibm_to_long(val[i]), &off, 32);
} }
ret = grib_set_long_internal(grib_handle_of_accessor(this), grib_arguments_get_name(parent_->h, arg_, 0), rlen); ret = grib_set_long_internal(grib_handle_of_accessor(this), arg_->get_name(parent_->h, 0), rlen);
if (ret == GRIB_SUCCESS) if (ret == GRIB_SUCCESS)
grib_buffer_replace(this, buf, buflen, 1, 1); grib_buffer_replace(this, buf, buflen, 1, 1);
@ -128,7 +128,7 @@ int grib_accessor_ibmfloat_t::value_count(long* len)
*len = 1; *len = 1;
return 0; return 0;
} }
return grib_get_long_internal(grib_handle_of_accessor(this), grib_arguments_get_name(parent_->h, arg_, 0), len); return grib_get_long_internal(grib_handle_of_accessor(this), arg_->get_name(parent_->h, 0), len);
} }
long grib_accessor_ibmfloat_t::byte_offset() long grib_accessor_ibmfloat_t::byte_offset()

View File

@ -32,7 +32,7 @@ int grib_accessor_ieeefloat_t::value_count(long* len)
*len = 1; *len = 1;
return 0; return 0;
} }
return grib_get_long_internal(grib_handle_of_accessor(this), grib_arguments_get_name(parent_->h, arg_, 0), len); return grib_get_long_internal(grib_handle_of_accessor(this), arg_->get_name(parent_->h, 0), len);
} }
int grib_accessor_ieeefloat_t::pack_double(const double* val, size_t* len) int grib_accessor_ieeefloat_t::pack_double(const double* val, size_t* len)
@ -68,7 +68,7 @@ int grib_accessor_ieeefloat_t::pack_double(const double* val, size_t* len)
for (i = 0; i < rlen; i++) { for (i = 0; i < rlen; i++) {
grib_encode_unsigned_longb(buf, grib_ieee_to_long(val[i]), &off, 32); grib_encode_unsigned_longb(buf, grib_ieee_to_long(val[i]), &off, 32);
} }
ret = grib_set_long_internal(grib_handle_of_accessor(this), grib_arguments_get_name(parent_->h, arg_, 0), rlen); ret = grib_set_long_internal(grib_handle_of_accessor(this), arg_->get_name(parent_->h, 0), rlen);
if (ret == GRIB_SUCCESS) if (ret == GRIB_SUCCESS)
grib_buffer_replace(this, buf, buflen, 1, 1); grib_buffer_replace(this, buf, buflen, 1, 1);

View File

@ -18,8 +18,8 @@ void grib_accessor_ifs_param_t::init(const long l, grib_arguments* c)
grib_accessor_gen_t::init(l, c); grib_accessor_gen_t::init(l, c);
int n = 0; int n = 0;
paramId_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); paramId_ = c->get_name(grib_handle_of_accessor(this), n++);
type_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); type_ = c->get_name(grib_handle_of_accessor(this), n++);
} }
int grib_accessor_ifs_param_t::unpack_long(long* val, size_t* len) int grib_accessor_ifs_param_t::unpack_long(long* val, size_t* len)

View File

@ -19,10 +19,10 @@ void grib_accessor_julian_date_t::init(const long l, grib_arguments* c)
int n = 0; int n = 0;
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
year_ = grib_arguments_get_name(h, c, n++); year_ = c->get_name(h, n++);
month_ = grib_arguments_get_name(h, c, n++); month_ = c->get_name(h, n++);
day_ = grib_arguments_get_name(h, c, n++); day_ = c->get_name(h, n++);
if (day_ == NULL) { if (day_ == NULL) {
hour_ = 0; hour_ = 0;
minute_ = 0; minute_ = 0;
@ -35,9 +35,9 @@ void grib_accessor_julian_date_t::init(const long l, grib_arguments* c)
else { else {
ymd_ = 0; ymd_ = 0;
hms_ = 0; hms_ = 0;
hour_ = grib_arguments_get_name(h, c, n++); hour_ = c->get_name(h, n++);
minute_ = grib_arguments_get_name(h, c, n++); minute_ = c->get_name(h, n++);
second_ = grib_arguments_get_name(h, c, n++); second_ = c->get_name(h, n++);
} }
sep_[0] = ' '; sep_[0] = ' ';
sep_[1] = 0; sep_[1] = 0;
@ -312,10 +312,10 @@ int grib_accessor_julian_date_t::pack_expression(grib_expression* e)
int ret = 0; int ret = 0;
grib_handle* hand = grib_handle_of_accessor(this); grib_handle* hand = grib_handle_of_accessor(this);
switch (grib_expression_native_type(hand, e)) { switch (e->native_type(hand)) {
case GRIB_TYPE_LONG: { case GRIB_TYPE_LONG: {
len = 1; len = 1;
ret = grib_expression_evaluate_long(hand, e, &lval); ret = e->evaluate_long(hand, &lval);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(context_, GRIB_LOG_ERROR, "Unable to set %s as long", name_); grib_context_log(context_, GRIB_LOG_ERROR, "Unable to set %s as long", name_);
return ret; return ret;
@ -327,7 +327,7 @@ int grib_accessor_julian_date_t::pack_expression(grib_expression* e)
case GRIB_TYPE_DOUBLE: { case GRIB_TYPE_DOUBLE: {
len = 1; len = 1;
ret = grib_expression_evaluate_double(hand, e, &dval); ret = e->evaluate_double(hand, &dval);
/*if (hand->context->debug) /*if (hand->context->debug)
printf("ECCODES DEBUG grib_accessor_gen::pack_expression %s %g\n", name_ , dval);*/ printf("ECCODES DEBUG grib_accessor_gen::pack_expression %s %g\n", name_ , dval);*/
return pack_double(&dval, &len); return pack_double(&dval, &len);
@ -336,7 +336,7 @@ int grib_accessor_julian_date_t::pack_expression(grib_expression* e)
case GRIB_TYPE_STRING: { case GRIB_TYPE_STRING: {
char tmp[1024]; char tmp[1024];
len = sizeof(tmp); len = sizeof(tmp);
cval = grib_expression_evaluate_string(hand, e, tmp, &len, &ret); cval = e->evaluate_string(hand, tmp, &len, &ret);
if (ret != GRIB_SUCCESS) { if (ret != GRIB_SUCCESS) {
grib_context_log(context_, GRIB_LOG_ERROR, "Unable to set %s as string", name_); grib_context_log(context_, GRIB_LOG_ERROR, "Unable to set %s as string", name_);
return ret; return ret;

View File

@ -19,10 +19,10 @@ void grib_accessor_julian_day_t::init(const long l, grib_arguments* c)
int n = 0; int n = 0;
grib_handle* h = grib_handle_of_accessor(this); grib_handle* h = grib_handle_of_accessor(this);
date_ = grib_arguments_get_name(h, c, n++); date_ = c->get_name(h, n++);
hour_ = grib_arguments_get_name(h, c, n++); hour_ = c->get_name(h, n++);
minute_ = grib_arguments_get_name(h, c, n++); minute_ = c->get_name(h, n++);
second_ = grib_arguments_get_name(h, c, n++); second_ = c->get_name(h, n++);
length_ = 0; length_ = 0;
} }

View File

@ -48,8 +48,8 @@ void grib_accessor_latitudes_t::init(const long l, grib_arguments* c)
grib_accessor_double_t::init(l, c); grib_accessor_double_t::init(l, c);
int n = 0; int n = 0;
values_ = grib_arguments_get_name(grib_handle_of_accessor(this), c, n++); values_ = c->get_name(grib_handle_of_accessor(this), n++);
distinct_ = grib_arguments_get_long(grib_handle_of_accessor(this), c, n++); distinct_ = c->get_long(grib_handle_of_accessor(this), n++);
save_ = 0; save_ = 0;
flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY; flags_ |= GRIB_ACCESSOR_FLAG_READ_ONLY;

Some files were not shown because too many files have changed in this diff Show More