mirror of https://github.com/ecmwf/eccodes.git
Enable disabled BUFR function calls
This commit is contained in:
parent
f1d68aa7f6
commit
8529fc3a1f
|
@ -9,16 +9,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "grib_scaling.h"
|
|
||||||
#include "grib_api_internal.h"
|
#include "grib_api_internal.h"
|
||||||
|
#include "accessor/grib_accessor_class_bufr_data_array.h"
|
||||||
|
#include "grib_scaling.h"
|
||||||
|
|
||||||
bufr_descriptor* grib_bufr_descriptor_new(grib_accessor* tables_accessor, int code, int silent, int* err)
|
bufr_descriptor* grib_bufr_descriptor_new(grib_accessor* tables_accessor, int code, int silent, int* err)
|
||||||
{
|
{
|
||||||
// ===== TODO(maee): Enable this when grib_accessor_class_bufr_elements_table.cc is moved to C++ =====
|
bufr_descriptor* ret = accessor_bufr_elements_table_get_descriptor(tables_accessor, code, err);
|
||||||
throw std::runtime_error("grib_bufr_descriptor_new not implemented");
|
|
||||||
bufr_descriptor* ret = NULL;
|
|
||||||
//bufr_descriptor* ret = accessor_bufr_elements_table_get_descriptor(tables_accessor, code, err);
|
|
||||||
// ===== END TODO =====
|
|
||||||
if (!silent && *err)
|
if (!silent && *err)
|
||||||
grib_context_log(tables_accessor->context, GRIB_LOG_ERROR,
|
grib_context_log(tables_accessor->context, GRIB_LOG_ERROR,
|
||||||
"unable to get descriptor %06d from table", code);
|
"unable to get descriptor %06d from table", code);
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "grib_api_internal.h"
|
#include "grib_api_internal.h"
|
||||||
|
#include "accessor/grib_accessor_class_bufr_data_array.h"
|
||||||
|
|
||||||
/* Note: A fast cut-down version of strcmp which does NOT return -1 */
|
/* Note: A fast cut-down version of strcmp which does NOT return -1 */
|
||||||
/* 0 means input strings are equal and 1 means not equal */
|
/* 0 means input strings are equal and 1 means not equal */
|
||||||
|
@ -213,11 +214,7 @@ static char* get_condition(const char* name, codes_condition* condition)
|
||||||
|
|
||||||
static grib_accessor* _search_by_rank(grib_accessor* a, const char* name, int rank)
|
static grib_accessor* _search_by_rank(grib_accessor* a, const char* name, int rank)
|
||||||
{
|
{
|
||||||
// ===== TODO(maee): Enable when grib_accessor_class_bufr_data_array.cc is moved to C++ =====
|
grib_trie_with_rank* t = accessor_bufr_data_array_get_dataAccessorsTrie(a);
|
||||||
throw "grib_accessor_class_bufr_data_array.cc is not yet moved to C++";
|
|
||||||
grib_trie_with_rank* t = NULL;
|
|
||||||
//grib_trie_with_rank* t = accessor_bufr_data_array_get_dataAccessorsTrie(a);
|
|
||||||
// ===== END TODO =====
|
|
||||||
grib_accessor* ret = (grib_accessor*)grib_trie_with_rank_get(t, name, rank);
|
grib_accessor* ret = (grib_accessor*)grib_trie_with_rank_get(t, name, rank);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -438,10 +435,7 @@ static grib_accessors_list* search_by_condition(grib_handle* h, const char* name
|
||||||
grib_accessors_list* result = NULL;
|
grib_accessors_list* result = NULL;
|
||||||
grib_accessor* data = search_and_cache(h, "dataAccessors", 0);
|
grib_accessor* data = search_and_cache(h, "dataAccessors", 0);
|
||||||
if (data && condition->left) {
|
if (data && condition->left) {
|
||||||
// ===== TODO(maee): Enable when grib_accessor_class_bufr_data_array.cc is moved to C++ =====
|
al = accessor_bufr_data_array_get_dataAccessors(data);
|
||||||
//al = accessor_bufr_data_array_get_dataAccessors(data);
|
|
||||||
throw "grib_accessor_class_bufr_data_array.cc is not yet moved to C++";
|
|
||||||
// ===== END TODO =====
|
|
||||||
if (!al)
|
if (!al)
|
||||||
return NULL;
|
return NULL;
|
||||||
result = (grib_accessors_list*)grib_context_malloc_clear(al->accessor->context, sizeof(grib_accessors_list));
|
result = (grib_accessors_list*)grib_context_malloc_clear(al->accessor->context, sizeof(grib_accessors_list));
|
||||||
|
|
Loading…
Reference in New Issue