Modernisation: Nearest: Move extern variabls to header file

This commit is contained in:
Eugen Betke 2024-11-05 13:34:38 +01:00
parent e9dc113064
commit b88ac2cf6b
4 changed files with 23 additions and 22 deletions

View File

@ -45,18 +45,6 @@ struct table_entry
eccodes::geo_iterator::Iterator** iterator;
};
extern eccodes::geo_iterator::Iterator* grib_iterator_gaussian;
extern eccodes::geo_iterator::Iterator* grib_iterator_gaussian_reduced;
extern eccodes::geo_iterator::Iterator* grib_iterator_healpix;
extern eccodes::geo_iterator::Iterator* grib_iterator_lambert_azimuthal_equal_area;
extern eccodes::geo_iterator::Iterator* grib_iterator_lambert_conformal;
extern eccodes::geo_iterator::Iterator* grib_iterator_latlon;
extern eccodes::geo_iterator::Iterator* grib_iterator_latlon_reduced;
extern eccodes::geo_iterator::Iterator* grib_iterator_mercator;
extern eccodes::geo_iterator::Iterator* grib_iterator_polar_stereographic;
extern eccodes::geo_iterator::Iterator* grib_iterator_regular;
extern eccodes::geo_iterator::Iterator* grib_iterator_space_view;
static const struct table_entry table[] = {
{ "gaussian", &grib_iterator_gaussian, },
{ "gaussian_reduced", &grib_iterator_gaussian_reduced, },

View File

@ -13,4 +13,17 @@
#include "grib_api_internal.h"
#include "geo_iterator/grib_iterator.h"
extern eccodes::geo_iterator::Iterator* grib_iterator_gaussian;
extern eccodes::geo_iterator::Iterator* grib_iterator_gaussian_reduced;
extern eccodes::geo_iterator::Iterator* grib_iterator_healpix;
extern eccodes::geo_iterator::Iterator* grib_iterator_lambert_azimuthal_equal_area;
extern eccodes::geo_iterator::Iterator* grib_iterator_lambert_conformal;
extern eccodes::geo_iterator::Iterator* grib_iterator_latlon;
extern eccodes::geo_iterator::Iterator* grib_iterator_latlon_reduced;
extern eccodes::geo_iterator::Iterator* grib_iterator_mercator;
extern eccodes::geo_iterator::Iterator* grib_iterator_polar_stereographic;
extern eccodes::geo_iterator::Iterator* grib_iterator_regular;
extern eccodes::geo_iterator::Iterator* grib_iterator_space_view;
eccodes::geo_iterator::Iterator* grib_iterator_factory(grib_handle* h, grib_arguments* args, unsigned long flags, int* error);

View File

@ -11,16 +11,6 @@
#include "grib_nearest_factory.h"
#include "accessor/grib_accessor_class_nearest.h"
extern eccodes::geo_nearest::Nearest* grib_nearest_healpix;
extern eccodes::geo_nearest::Nearest* grib_nearest_lambert_azimuthal_equal_area;
extern eccodes::geo_nearest::Nearest* grib_nearest_lambert_conformal;
extern eccodes::geo_nearest::Nearest* grib_nearest_latlon_reduced;
extern eccodes::geo_nearest::Nearest* grib_nearest_mercator;
extern eccodes::geo_nearest::Nearest* grib_nearest_polar_stereographic;
extern eccodes::geo_nearest::Nearest* grib_nearest_reduced;
extern eccodes::geo_nearest::Nearest* grib_nearest_regular;
extern eccodes::geo_nearest::Nearest* grib_nearest_space_view;
struct table_entry
{
const char* type;

View File

@ -13,4 +13,14 @@
#include "grib_api_internal.h"
#include "geo_nearest/grib_nearest.h"
extern eccodes::geo_nearest::Nearest* grib_nearest_healpix;
extern eccodes::geo_nearest::Nearest* grib_nearest_lambert_azimuthal_equal_area;
extern eccodes::geo_nearest::Nearest* grib_nearest_lambert_conformal;
extern eccodes::geo_nearest::Nearest* grib_nearest_latlon_reduced;
extern eccodes::geo_nearest::Nearest* grib_nearest_mercator;
extern eccodes::geo_nearest::Nearest* grib_nearest_polar_stereographic;
extern eccodes::geo_nearest::Nearest* grib_nearest_reduced;
extern eccodes::geo_nearest::Nearest* grib_nearest_regular;
extern eccodes::geo_nearest::Nearest* grib_nearest_space_view;
eccodes::geo_nearest::Nearest* grib_nearest_factory(grib_handle* h, grib_arguments* args, int* error);