Interim: New Accessor design with proj_string example. All tests pass

This commit is contained in:
kevstone 2023-07-14 16:00:46 +01:00
parent 2d82dadd90
commit b8aeecafa2
481 changed files with 31961 additions and 91 deletions

View File

@ -17,8 +17,8 @@
#include "grib_accessor.h"
// C++ support
#include "grib_accessor_impl/grib_accessor_impl_factory.h"
#include "grib_accessor_impl/grib_accessor_impl_helper.h"
#include "grib_accessor_impl/AccessorFactory.h"
#include "grib_accessor_impl/Accessor.h"
/* Note: A fast cut-down version of strcmp which does NOT return -1 */
/* 0 means input strings are equal and 1 means not equal */
@ -35,9 +35,9 @@ GRIB_INLINE static int grib_inline_strcmp(const char* a, const char* b)
void grib_accessor_dump(grib_accessor* a, grib_dumper* f)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->dump(f);
return accessorDump(*accessorPtr, f);
}
grib_accessor_class* c = a->cclass;
@ -53,9 +53,9 @@ void grib_accessor_dump(grib_accessor* a, grib_dumper* f)
int grib_pack_missing(grib_accessor* a)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->pack_missing();
return accessorPackMissing(*accessorPtr);
}
grib_accessor_class* c = a->cclass;
@ -72,9 +72,9 @@ int grib_pack_missing(grib_accessor* a)
int grib_pack_zero(grib_accessor* a)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->clear();
return accessorClear(*accessorPtr);
}
grib_accessor_class* c = a->cclass;
@ -91,9 +91,9 @@ int grib_pack_zero(grib_accessor* a)
int grib_is_missing_internal(grib_accessor* a)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->is_missing();
return accessorIsMissing(*accessorPtr);
}
grib_accessor_class* c = a->cclass;
@ -110,9 +110,9 @@ int grib_is_missing_internal(grib_accessor* a)
int grib_pack_double(grib_accessor* a, const double* v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->pack_double(v, len);
return accessorPackDouble(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -129,9 +129,9 @@ int grib_pack_double(grib_accessor* a, const double* v, size_t* len)
int grib_pack_float(grib_accessor* a, const float* v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->pack_float(v, len);
return accessorPackFloat(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -147,9 +147,9 @@ int grib_pack_float(grib_accessor* a, const float* v, size_t* len)
int grib_pack_expression(grib_accessor* a, grib_expression* e)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->pack_expression(e);
return accessorPackExpression(*accessorPtr, e);
}
grib_accessor_class* c = a->cclass;
@ -166,9 +166,9 @@ int grib_pack_expression(grib_accessor* a, grib_expression* e)
int grib_pack_string(grib_accessor* a, const char* v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->pack_string(v, len);
return accessorPackString(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -185,9 +185,9 @@ int grib_pack_string(grib_accessor* a, const char* v, size_t* len)
int grib_pack_string_array(grib_accessor* a, const char** v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->pack_string_array(v, len);
return accessorPackStringArray(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -204,9 +204,9 @@ int grib_pack_string_array(grib_accessor* a, const char** v, size_t* len)
int grib_pack_long(grib_accessor* a, const long* v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->pack_long(v, len);
return accessorPackLong(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -223,9 +223,9 @@ int grib_pack_long(grib_accessor* a, const long* v, size_t* len)
int grib_pack_bytes(grib_accessor* a, const unsigned char* v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->pack_bytes(v, len);
return accessorPackBytes(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -242,9 +242,9 @@ int grib_pack_bytes(grib_accessor* a, const unsigned char* v, size_t* len)
int grib_unpack_bytes(grib_accessor* a, unsigned char* v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_bytes(v, len);
return accessorUnpackBytes(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -261,9 +261,9 @@ int grib_unpack_bytes(grib_accessor* a, unsigned char* v, size_t* len)
int grib_unpack_double_subarray(grib_accessor* a, double* v, size_t start, size_t len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_double_subarray(v, start, len);
return accessorUnpackDoubleSubarray(*accessorPtr, v, start, len);
}
grib_accessor_class* c = a->cclass;
@ -279,9 +279,9 @@ int grib_unpack_double_subarray(grib_accessor* a, double* v, size_t start, size_
int grib_unpack_double(grib_accessor* a, double* v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_double(v, len);
return accessorUnpackDouble(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -298,9 +298,9 @@ int grib_unpack_double(grib_accessor* a, double* v, size_t* len)
int grib_unpack_float(grib_accessor* a, float* v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_float(v, len);
return accessorUnpackFloat(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -329,9 +329,9 @@ int grib_unpack<float>(grib_accessor* a, float* v, size_t* len)
int grib_unpack_double_element(grib_accessor* a, size_t i, double* v)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_double_element(i, v);
return accessorUnpackDoubleElement(*accessorPtr, i, v);
}
grib_accessor_class* c = a->cclass;
@ -345,9 +345,9 @@ int grib_unpack_double_element(grib_accessor* a, size_t i, double* v)
}
int grib_unpack_float_element(grib_accessor* a, size_t i, float* v)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_float_element(i, v);
return accessorUnpackFloatElement(*accessorPtr, i, v);
}
/* grib_accessor_class* c = a->cclass;
@ -366,9 +366,9 @@ int grib_unpack_float_element(grib_accessor* a, size_t i, float* v)
*/
int grib_unpack_double_element_set(grib_accessor* a, const size_t* index_array, size_t len, double* val_array)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_double_element_set(index_array, len, val_array);
return accessorUnpackDoubleElementSet(*accessorPtr, index_array, len, val_array);
}
grib_accessor_class* c = a->cclass;
@ -383,9 +383,9 @@ int grib_unpack_double_element_set(grib_accessor* a, const size_t* index_array,
}
int grib_unpack_float_element_set(grib_accessor* a, const size_t* index_array, size_t len, float* val_array)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_float_element_set(index_array, len, val_array);
return accessorUnpackFloatElementSet(*accessorPtr, index_array, len, val_array);
}
/*
@ -403,9 +403,9 @@ int grib_unpack_float_element_set(grib_accessor* a, const size_t* index_array, s
int grib_unpack_string(grib_accessor* a, char* v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_string(v, len);
return accessorUnpackString(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -422,9 +422,9 @@ int grib_unpack_string(grib_accessor* a, char* v, size_t* len)
int grib_unpack_string_array(grib_accessor* a, char** v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_string_array(v, len);
return accessorUnpackStringArray(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -508,9 +508,9 @@ int grib_accessors_list_unpack_string(grib_accessors_list* al, char** val, size_
int grib_unpack_long(grib_accessor* a, long* v, size_t* len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->unpack_long(v, len);
return accessorUnpackLong(*accessorPtr, v, len);
}
grib_accessor_class* c = a->cclass;
@ -527,9 +527,9 @@ int grib_unpack_long(grib_accessor* a, long* v, size_t* len)
long grib_accessor_get_native_type(grib_accessor* a)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->native_type();
return accessorNativeType(*accessorPtr);
}
grib_accessor_class* c = NULL;
@ -547,9 +547,9 @@ long grib_accessor_get_native_type(grib_accessor* a)
long grib_get_next_position_offset(grib_accessor* a)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->next_offset();
return accessorNextOffset(*accessorPtr);
}
grib_accessor_class* c = NULL;
@ -568,9 +568,9 @@ long grib_get_next_position_offset(grib_accessor* a)
long grib_string_length(grib_accessor* a)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->string_length();
return accessorStringLength(*accessorPtr);
}
grib_accessor_class* c = NULL;
@ -588,9 +588,9 @@ long grib_string_length(grib_accessor* a)
long grib_byte_offset(grib_accessor* a)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->byte_offset();
return accessorByteOffset(*accessorPtr);
}
grib_accessor_class* c = NULL;
@ -608,9 +608,9 @@ long grib_byte_offset(grib_accessor* a)
long grib_byte_count(grib_accessor* a)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->byte_count();
return accessorByteCount(*accessorPtr);
}
grib_accessor_class* c = NULL;
@ -628,9 +628,9 @@ long grib_byte_count(grib_accessor* a)
int grib_value_count(grib_accessor* a, long* count)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->value_count(count);
return accessorValueCount(*accessorPtr, count);
}
grib_accessor_class* c = NULL;
@ -663,9 +663,9 @@ int grib_accessors_list_value_count(grib_accessors_list* al, size_t* count)
int grib_accessor_notify_change(grib_accessor* a, grib_accessor* changed)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->notify_change(changed);
return accessorNotifyChange(*accessorPtr, changed);
}
grib_accessor_class* c = NULL;
@ -697,9 +697,9 @@ static void init_accessor(grib_accessor_class* c, grib_accessor* a, const long l
void grib_init_accessor(grib_accessor* a, const long len, grib_arguments* args)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->init(len, args);
return; // Part of constructor
}
init_accessor(a->cclass, a, len, args);
@ -720,7 +720,7 @@ static void post_init_accessor(grib_accessor_class* c,grib_accessor* a)
void grib_accessor_delete(grib_context* ct, grib_accessor* a)
{
if(eccodes::destroy_grib_accessor_impl(a) == GRIB_SUCCESS)
if(eccodes::destroyAccessor(a) == GRIB_SUCCESS)
{
return;
}
@ -740,9 +740,9 @@ void grib_accessor_delete(grib_context* ct, grib_accessor* a)
grib_accessor* grib_accessor_clone(grib_accessor* a, grib_section* s, int* err)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return (grib_accessor*)ga_impl->make_clone(s, err);
return accessorMakeClone(*accessorPtr, s, err);
}
grib_accessor_class* c = a->cclass;
@ -760,9 +760,9 @@ grib_accessor* grib_accessor_clone(grib_accessor* a, grib_section* s, int* err)
void grib_update_size(grib_accessor* a, size_t len)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->update_size(len);
return accessorUpdateSize(*accessorPtr, len);
}
grib_accessor_class* c = a->cclass;
@ -779,9 +779,9 @@ void grib_update_size(grib_accessor* a, size_t len)
int grib_nearest_smaller_value(grib_accessor* a, double val, double* nearest)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->nearest_smaller_value(val, nearest);
return accessorNearestSmallerValue(*accessorPtr, val, nearest);
}
grib_accessor_class* c = a->cclass;
@ -798,9 +798,9 @@ int grib_nearest_smaller_value(grib_accessor* a, double val, double* nearest)
size_t grib_preferred_size(grib_accessor* a, int from_handle)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->preferred_size(from_handle);
return accessorPreferredSize(*accessorPtr, from_handle);
}
grib_accessor_class* c = a->cclass;
@ -817,9 +817,9 @@ size_t grib_preferred_size(grib_accessor* a, int from_handle)
grib_accessor* grib_next_accessor(grib_accessor* a)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->next_accessor(1);
return accessorNext(*accessorPtr, 1);
}
grib_accessor_class* c = a->cclass;
@ -835,9 +835,9 @@ grib_accessor* grib_next_accessor(grib_accessor* a)
void grib_resize(grib_accessor* a, size_t new_size)
{
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::get_grib_accessor_impl(a); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::getAccessor(a); accessorPtr)
{
return ga_impl->resize(new_size);
return accessorResize(*accessorPtr, new_size);
}
grib_accessor_class* c = a->cclass;
@ -855,13 +855,14 @@ void grib_resize(grib_accessor* a, size_t new_size)
int grib_compare_accessors(grib_accessor* a1, grib_accessor* a2, int compare_flags)
{
#if 0
eccodes::grib_accessor_impl_gen* ga_impl1 = eccodes::get_grib_accessor_impl(a1);
eccodes::grib_accessor_impl_gen* ga_impl2 = eccodes::get_grib_accessor_impl(a2);
if(ga_impl1 && ga_impl2)
{
return eccodes::compare_accessors(ga_impl1, ga_impl2, compare_flags);
}
#endif
int ret = 0;
long type1 = 0;
long type2 = 0;

View File

@ -19,7 +19,8 @@
// C++ support
#include "grib_accessor_impl/grib_accessor_impl_factory.h"
#include "grib_accessor_impl/AccessorFactory.h"
#include "grib_accessor_impl/Accessor.h"
#if GRIB_PTHREADS
static pthread_once_t once = PTHREAD_ONCE_INIT;
@ -139,9 +140,9 @@ grib_accessor* grib_accessor_factory(grib_section* p, grib_action* creator,
size_t size = 0;
// See if we have a cpp implementation
if(eccodes::grib_accessor_impl_gen* ga_impl = eccodes::create_grib_accessor_impl(p, creator); ga_impl)
if(eccodes::AccessorPtr accessorPtr = eccodes::makeAccessor(p, creator, len, params); accessorPtr)
{
a = (grib_accessor*)ga_impl;
a = asGribAccessor(*accessorPtr);
}
else
{
@ -187,13 +188,13 @@ grib_accessor* grib_accessor_factory(grib_section* p, grib_action* creator,
else
a->offset = 0;
}
grib_init_accessor(a, len, params);
}
// Verify that we created either a valid object
// Verify that we created a valid object
Assert(a);
grib_init_accessor(a, len, params);
size = grib_get_next_position_offset(a);
if (size > p->h->buffer->ulength) {

View File

@ -0,0 +1,196 @@
#include "Accessor.h"
namespace eccodes {
grib_accessor* asGribAccessor(Accessor const& accessor)
{
return accessor.pimpl->operator grib_accessor*();
}
void accessorDump(Accessor const& accessor, grib_dumper* dumper)
{
return accessor.pimpl->accessorDump(dumper);
}
long accessorNextOffset(Accessor const& accessor)
{
return accessor.pimpl->accessorNextOffset();
}
size_t accessorStringLength(Accessor const& accessor)
{
return accessor.pimpl->accessorStringLength();
}
int accessorValueCount(Accessor const& accessor, long* count)
{
return accessor.pimpl->accessorValueCount(count);
}
long accessorByteCount(Accessor const& accessor)
{
return accessor.pimpl->accessorByteCount();
}
long accessorByteOffset(Accessor const& accessor)
{
return accessor.pimpl->accessorByteOffset();
}
int accessorNativeType(Accessor const& accessor)
{
return accessor.pimpl->accessorNativeType();
}
grib_section* accessorSubSection(Accessor const& accessor)
{
return accessor.pimpl->accessorSubSection();
}
int accessorPackMissing(Accessor const& accessor)
{
return accessor.pimpl->accessorPackMissing();
}
int accessorIsMissing(Accessor const& accessor)
{
return accessor.pimpl->accessorIsMissing();
}
int accessorPackLong(Accessor const& accessor, const long* val, size_t* len)
{
return accessor.pimpl->accessorPackLong(val, len);
}
int accessorUnpackLong(Accessor const& accessor, long* val, size_t* len)
{
return accessor.pimpl->accessorUnpackLong(val, len);
}
int accessorPackDouble(Accessor const& accessor, const double* val, size_t* len)
{
return accessor.pimpl->accessorPackDouble(val, len);
}
int accessorPackFloat(Accessor const& accessor, const float* val, size_t* len)
{
return accessor.pimpl->accessorPackFloat(val, len);
}
int accessorUnpackDouble(Accessor const& accessor, double* val, size_t* len)
{
return accessor.pimpl->accessorUnpackDouble(val, len);
}
int accessorUnpackFloat(Accessor const& accessor, float* val, size_t* len)
{
return accessor.pimpl->accessorUnpackFloat(val, len);
}
int accessorPackString(Accessor const& accessor, const char* v, size_t* len)
{
return accessor.pimpl->accessorPackString(v, len);
}
int accessorUnpackString(Accessor const& accessor, char* v, size_t* len)
{
return accessor.pimpl->accessorUnpackString(v, len);
}
int accessorPackStringArray(Accessor const& accessor, const char** v, size_t* len)
{
return accessor.pimpl->accessorPackStringArray(v, len);
}
int accessorUnpackStringArray(Accessor const& accessor, char** v, size_t* len)
{
return accessor.pimpl->accessorUnpackStringArray(v, len);
}
int accessorPackBytes(Accessor const& accessor, const unsigned char* val, size_t* len)
{
return accessor.pimpl->accessorPackBytes(val, len);
}
int accessorUnpackBytes(Accessor const& accessor, unsigned char* val, size_t* len)
{
return accessor.pimpl->accessorUnpackBytes(val, len);
}
int accessorPackExpression(Accessor const& accessor, grib_expression* e)
{
return accessor.pimpl->accessorPackExpression(e);
}
int accessorNotifyChange(Accessor const& accessor, grib_accessor* observed)
{
return accessor.pimpl->accessorNotifyChange(observed);
}
void accessorUpdateSize(Accessor const& accessor, size_t s)
{
return accessor.pimpl->accessorUpdateSize(s);
}
size_t accessorPreferredSize(Accessor const& accessor, int from_handle)
{
return accessor.pimpl->accessorPreferredSize(from_handle);
}
void accessorResize(Accessor const& accessor, size_t new_size)
{
return accessor.pimpl->accessorResize(new_size);
}
int accessorNearestSmallerValue(Accessor const& accessor, double val, double* nearest)
{
return accessor.pimpl->accessorNearestSmallerValue(val, nearest);
}
grib_accessor* accessorNext(Accessor const& accessor, int mod)
{
return accessor.pimpl->accessorNext(mod);
}
int accessorCompare(Accessor const& accessor, grib_accessor* b)
{
return accessor.pimpl->accessorCompare(b);
}
int accessorUnpackDoubleElement(Accessor const& accessor, size_t i, double* val)
{
return accessor.pimpl->accessorUnpackDoubleElement(i, val);
}
int accessorUnpackFloatElement(Accessor const& accessor, size_t i, float* val)
{
return accessor.pimpl->accessorUnpackFloatElement(i, val);
}
int accessorUnpackDoubleElementSet(Accessor const& accessor, const size_t* index_array, size_t len, double* val_array)
{
return accessor.pimpl->accessorUnpackDoubleElementSet(index_array, len, val_array);
}
int accessorUnpackFloatElementSet(Accessor const& accessor, const size_t* index_array, size_t len, float* val_array)
{
return accessor.pimpl->accessorUnpackFloatElementSet(index_array, len, val_array);
}
int accessorUnpackDoubleSubarray(Accessor const& accessor, double* val, size_t start, size_t len)
{
return accessor.pimpl->accessorUnpackDoubleSubarray(val, start, len);
}
int accessorClear(Accessor const& accessor)
{
return accessor.pimpl->accessorClear();
}
grib_accessor* accessorMakeClone(Accessor const& accessor, grib_section* s, int* err)
{
return accessor.pimpl->accessorMakeClone(s, err);
}
}

View File

@ -0,0 +1,140 @@
#ifndef _ACCESSOR_H_20230630_
#define _ACCESSOR_H_20230630_
#include <memory>
struct grib_accessor;
#include "AccessorConcept.h"
#include "ProjString.h"
namespace eccodes {
// Helper for template type deduction
template<typename ACCESSOR_TYPE>
struct AccessorType{};
class Accessor
{
private:
template<typename ACCESSOR_TYPE>
struct AccessorModel : AccessorConcept
{
AccessorModel(ACCESSOR_TYPE const& accessor) : accessor_{accessor} {}
AccessorModel(ACCESSOR_TYPE && accessor) : accessor_{std::move(accessor)} {}
AccessorModel(grib_section* p, grib_action* creator, const long len, grib_arguments* arg) :
accessor_{p, creator, len, arg} {}
operator grib_accessor*() override { return accessor_; }
void accessorDump(grib_dumper* dumper) final { return dump(accessor_, dumper); }
long accessorNextOffset() final { return nextOffset(accessor_); }
size_t accessorStringLength() final { return stringLength(accessor_); }
int accessorValueCount(long* count) final { return valueCount(accessor_, count); }
long accessorByteCount() final { return byteCount(accessor_); }
long accessorByteOffset() final { return byteOffset(accessor_); }
int accessorNativeType() final { return nativeType(accessor_); }
grib_section* accessorSubSection() final { return subSection(accessor_); }
int accessorPackMissing() final { return packMissing(accessor_); }
int accessorIsMissing() final { return isMissing(accessor_); }
int accessorPackLong(const long* val, size_t* len) final { return packLong(accessor_, val, len); }
int accessorPackDouble(const double* val, size_t* len) final { return packDouble(accessor_, val, len); }
int accessorPackFloat(const float* val, size_t* len) final { return packFloat(accessor_, val, len); }
int accessorPackString(const char* v, size_t* len) final { return packString(accessor_, v, len); }
int accessorPackStringArray(const char** v, size_t* len) final { return packStringArray(accessor_, v, len); }
int accessorPackBytes(const unsigned char* val, size_t* len) final { return packBytes(accessor_, val, len); }
int accessorPackExpression(grib_expression* e) final { return packExpression(accessor_, e); }
int accessorUnpackLong(long* val, size_t* len) final { return unpackLong(accessor_, val, len); }
int accessorUnpackDouble(double* val, size_t* len) final { return unpackDouble(accessor_, val, len); }
int accessorUnpackFloat(float* val, size_t* len) final { return unpackFloat(accessor_, val, len); }
int accessorUnpackString(char* v, size_t* len) final { return unpackString(accessor_, v, len); }
int accessorUnpackStringArray(char** v, size_t* len) final { return unpackStringArray(accessor_, v, len); }
int accessorUnpackBytes(unsigned char* val, size_t* len) final { return unpackBytes(accessor_, val, len); }
int accessorUnpackDoubleElement(size_t i, double* val) final { return unpackDoubleElement(accessor_, i, val); }
int accessorUnpackFloatElement(size_t i, float* val) final { return unpackFloatElement(accessor_, i, val); }
int accessorUnpackDoubleElementSet(const size_t* index_array, size_t len, double* val_array) final { return unpackDoubleElementSet(accessor_, index_array, len, val_array); }
int accessorUnpackFloatElementSet(const size_t* index_array, size_t len, float* val_array) final { return unpackFloatElementSet(accessor_, index_array, len, val_array); }
int accessorUnpackDoubleSubarray(double* val, size_t start, size_t len) final { return unpackDoubleSubarray(accessor_, val, start, len); }
int accessorNotifyChange(grib_accessor* observed) final { return notifyChange(accessor_, observed); }
void accessorUpdateSize(size_t s) final { return updateSize(accessor_, s); }
size_t accessorPreferredSize(int from_handle) final { return preferredSize(accessor_, from_handle); }
void accessorResize(size_t new_size) final { return resize(accessor_, new_size); }
int accessorNearestSmallerValue(double val, double* nearest) final { return nearestSmallerValue(accessor_, val, nearest); }
grib_accessor* accessorNext(int mod) final { return next(accessor_, mod); }
int accessorCompare(grib_accessor* b) final { return compare(accessor_, b); }
int accessorClear() final { return clear(accessor_); }
grib_accessor* accessorMakeClone(grib_section* s, int* err) final { return makeClone(accessor_, s, err); }
ACCESSOR_TYPE accessor_;
};
friend grib_accessor* asGribAccessor(Accessor const& accessor);
friend void accessorDump(Accessor const& accessor, grib_dumper* dumper);
friend long accessorNextOffset(Accessor const& accessor);
friend size_t accessorStringLength(Accessor const& accessor);
friend int accessorValueCount(Accessor const& accessor, long* count);
friend long accessorByteCount(Accessor const& accessor);
friend long accessorByteOffset(Accessor const& accessor);
friend int accessorNativeType(Accessor const& accessor);
friend grib_section* accessorSubSection(Accessor const& accessor);
friend int accessorPackMissing(Accessor const& accessor);
friend int accessorIsMissing(Accessor const& accessor);
friend int accessorPackLong(Accessor const& accessor, const long* val, size_t* len);
friend int accessorPackDouble(Accessor const& accessor, const double* val, size_t* len);
friend int accessorPackFloat(Accessor const& accessor, const float* val, size_t* len);
friend int accessorPackString(Accessor const& accessor, const char* v, size_t* len);
friend int accessorPackStringArray(Accessor const& accessor, const char** v, size_t* len);
friend int accessorPackBytes(Accessor const& accessor, const unsigned char* val, size_t* len);
friend int accessorPackExpression(Accessor const& accessor, grib_expression* e);
friend int accessorUnpackLong(Accessor const& accessor, long* val, size_t* len);
friend int accessorUnpackDouble(Accessor const& accessor, double* val, size_t* len);
friend int accessorUnpackFloat(Accessor const& accessor, float* val, size_t* len);
friend int accessorUnpackString(Accessor const& accessor, char* v, size_t* len);
friend int accessorUnpackStringArray(Accessor const& accessor, char** v, size_t* len);
friend int accessorUnpackBytes(Accessor const& accessor, unsigned char* val, size_t* len);
friend int accessorUnpackDoubleElement(Accessor const& accessor, size_t i, double* val);
friend int accessorUnpackFloatElement(Accessor const& accessor, size_t i, float* val);
friend int accessorUnpackDoubleElementSet(Accessor const& accessor, const size_t* index_array, size_t len, double* val_array);
friend int accessorUnpackFloatElementSet(Accessor const& accessor, const size_t* index_array, size_t len, float* val_array);
friend int accessorUnpackDoubleSubarray(Accessor const& accessor, double* val, size_t start, size_t len);
friend int accessorNotifyChange(Accessor const& accessor, grib_accessor* observed);
friend void accessorUpdateSize(Accessor const& accessor, size_t s);
friend size_t accessorPreferredSize(Accessor const& accessor, int from_handle);
friend void accessorResize(Accessor const& accessor, size_t new_size);
friend int accessorNearestSmallerValue(Accessor const& accessor, double val, double* nearest);
friend grib_accessor* accessorNext(Accessor const& accessor, int mod);
friend int accessorCompare(Accessor const& accessor, grib_accessor* b);
friend int accessorClear(Accessor const& accessor);
friend grib_accessor* accessorMakeClone(Accessor const& accessor, grib_section* s, int* err);
std::unique_ptr<AccessorConcept> pimpl;
public:
template<typename ACCESSOR_TYPE>
Accessor(ACCESSOR_TYPE const& accessor) : pimpl{ std::make_unique<AccessorModel<ACCESSOR_TYPE>>(accessor)} {}
template<typename ACCESSOR_TYPE>
Accessor(ACCESSOR_TYPE&& accessor) : pimpl{ std::make_unique<AccessorModel<ACCESSOR_TYPE>>(std::move(accessor))} {}
// AccessorType<ACCESSOR_TYPE> is required to allow us to deduce the template type, as constructors only support
// the <T> format when it is part of the class definition, i.e. Accessor<ProjString>(...) is invalid here...
template<typename ACCESSOR_TYPE>
Accessor(AccessorType<ACCESSOR_TYPE>, grib_section* p, grib_action* creator, const long len, grib_arguments* arg) :
pimpl{ std::make_unique<AccessorModel<ACCESSOR_TYPE>>(p, creator, len, arg)} {}
Accessor(Accessor const&) = delete;
Accessor& operator=(Accessor const&) = delete;
Accessor(Accessor&&) = default;
Accessor& operator=(Accessor&&) = default;
};
}
#endif // _ACCESSOR_H_20230630_

View File

@ -0,0 +1,64 @@
#ifndef _ACCESSOR_CONCEPT_H_20230711_
#define _ACCESSOR_CONCEPT_H_20230711_
#include <stddef.h> // size_t
struct grib_accessor;
struct grib_dumper;
struct grib_section;
struct grib_expression;
namespace eccodes {
// Define all APIs available to an accessor
struct AccessorConcept
{
virtual ~AccessorConcept() = default;
virtual operator grib_accessor*() = 0;
virtual void accessorDump(grib_dumper* dumper) = 0;
virtual long accessorNextOffset() = 0;
virtual size_t accessorStringLength() = 0;
virtual int accessorValueCount(long* count) = 0;
virtual long accessorByteCount() = 0;
virtual long accessorByteOffset() = 0;
virtual int accessorNativeType() = 0;
virtual grib_section* accessorSubSection() = 0;
virtual int accessorPackMissing() = 0;
virtual int accessorIsMissing() = 0;
virtual int accessorPackLong(const long* val, size_t* len) = 0;
virtual int accessorPackDouble(const double* val, size_t* len) = 0;
virtual int accessorPackFloat(const float* val, size_t* len) = 0;
virtual int accessorPackString(const char* v, size_t* len) = 0;
virtual int accessorPackStringArray(const char** v, size_t* len) = 0;
virtual int accessorPackBytes(const unsigned char* val, size_t* len) = 0;
virtual int accessorPackExpression(grib_expression* e) = 0;
virtual int accessorUnpackLong(long* val, size_t* len) = 0;
virtual int accessorUnpackDouble(double* val, size_t* len) = 0;
virtual int accessorUnpackFloat(float* val, size_t* len) = 0;
virtual int accessorUnpackString(char* v, size_t* len) = 0;
virtual int accessorUnpackStringArray(char** v, size_t* len) = 0;
virtual int accessorUnpackBytes(unsigned char* val, size_t* len) = 0;
virtual int accessorUnpackDoubleElement(size_t i, double* val) = 0;
virtual int accessorUnpackFloatElement(size_t i, float* val) = 0;
virtual int accessorUnpackDoubleElementSet(const size_t* index_array, size_t len, double* val_array) = 0;
virtual int accessorUnpackFloatElementSet(const size_t* index_array, size_t len, float* val_array) = 0;
virtual int accessorUnpackDoubleSubarray(double* val, size_t start, size_t len) = 0;
virtual int accessorNotifyChange(grib_accessor* observed) = 0;
virtual void accessorUpdateSize(size_t s) = 0;
virtual size_t accessorPreferredSize(int from_handle) = 0;
virtual void accessorResize(size_t new_size) = 0;
virtual int accessorNearestSmallerValue(double val, double* nearest) = 0;
virtual grib_accessor* accessorNext(int mod) = 0;
virtual int accessorCompare(grib_accessor* b) = 0;
virtual int accessorClear() = 0;
virtual grib_accessor* accessorMakeClone(grib_section* s, int* err) = 0;
};
}
#endif // _ACCESSOR_CONCEPT_H_20230711_

View File

@ -0,0 +1,105 @@
#include "AccessorFactory.h"
#include "Accessor.h"
#include "Accessor_Utils.h"
#include "AccessorMaker.h"
#include "grib_api_internal.h"
#include "ProjString.h"
#include <vector>
#include <algorithm>
namespace eccodes {
static std::vector<Accessor> accessorStore{};
AccessorPtr makeAccessor(grib_section* p, grib_action* creator, const long len, grib_arguments* arg)
{
if(cppMode() != CppMode::enabled) { return {}; }
if(!creator->op) { return {}; }
if(auto maker = getMaker(creator->op))
{
accessorStore.emplace_back(maker->pimpl->makeAccessor(p, creator, len, arg));
return AccessorPtr(&accessorStore.back());
}
return {};
}
// Check if the grib_accessor* actually points to a valid class, and return
// a pointer to the class if so, or nullptr
AccessorPtr getAccessor(grib_accessor* a)
{
if(!a || a->cclass) { return {}; }
if(auto it = std::find_if(std::begin(accessorStore), std::end(accessorStore),
[&a](Accessor const& accessor){ return a==asGribAccessor(accessor);});
it != accessorStore.end())
{
return AccessorPtr(&*it);
}
return {};
}
int destroyAccessor(grib_accessor* a)
{
if(auto it = std::find_if(std::begin(accessorStore), std::end(accessorStore),
[&a](Accessor const& accessor){ return a==asGribAccessor(accessor);});
it != accessorStore.end())
{
accessorStore.erase(it);
return GRIB_SUCCESS;
}
return GRIB_NOT_FOUND;
}
#if 0
std::unordered_set<grib_accessor_impl_gen*> ga_store{};
grib_accessor_impl_gen* create_grib_accessor_impl(grib_section* p, grib_action* creator)
{
if(get_cpp_mode() != cpp_mode::enabled) { return nullptr; }
if(!creator->op) { return nullptr; }
grib_accessor_impl_gen* ga_impl{};
if(auto impl_creator = get_ga_impl_creator(creator->op))
{
ga_impl = impl_creator(p, creator);
if(ga_impl) { ga_store.insert(ga_impl); }
}
return ga_impl;
}
int destroy_grib_accessor_impl(grib_accessor* a)
{
grib_accessor_impl_gen* ga_impl = (grib_accessor_impl_gen*)a;
if(ga_store.count(ga_impl) > 0) {
ga_store.erase(ga_impl);
delete ga_impl;
return GRIB_SUCCESS;
}
return GRIB_NOT_FOUND;
}
// Check if the grib_accessor* actually points to a valid class, and returns
// a pointer to the class if so, or nullptr
grib_accessor_impl_gen* get_grib_accessor_impl(grib_accessor* a)
{
if(!a || a->cclass) { return nullptr; }
if(ga_store.count((grib_accessor_impl_gen*)a) > 0) {
return (grib_accessor_impl_gen*)a;
}
return nullptr;
}
#endif
}

View File

@ -0,0 +1,21 @@
#ifndef _ACCESSOR_FACTORY_H_20230706_
#define _ACCESSOR_FACTORY_H_20230706_
#include "AccessorPtr.h"
#include <memory>
#include <string_view>
struct grib_section;
struct grib_action;
struct grib_arguments;
struct grib_accessor;
namespace eccodes {
AccessorPtr makeAccessor(grib_section* p, grib_action* creator, const long len, grib_arguments* arg);
AccessorPtr getAccessor(grib_accessor* a);
int destroyAccessor(grib_accessor* a);
}
#endif // _ACCESSOR_FACTORY_H_20230706_

View File

@ -0,0 +1,37 @@
#include "AccessorMaker.h"
#include <mutex>
#include <unordered_map>
#include "grib_api_internal.h"
namespace eccodes {
std::mutex makers_mutex;
static std::unordered_map<std::string, AccessorMaker const*> makers;
void registerMaker(std::string const& name, AccessorMaker const* maker)
{
std::lock_guard<std::mutex> guard(makers_mutex);
if(auto it = makers.find(name); it != makers.end())
{
Assert(false);
}
makers[name] = maker;
}
AccessorMaker const* getMaker(std::string const& name)
{
std::lock_guard<std::mutex> guard(makers_mutex);
if(auto it = makers.find(name); it != makers.end())
{
return it->second;
}
return nullptr;
}
}

View File

@ -0,0 +1,48 @@
#ifndef _ACCESSOR_MAKER_H_20230714_
#define _ACCESSOR_MAKER_H_20230714_
#include "Accessor.h"
#include "AccessorPtr.h"
#include <memory>
#include <string>
#include <memory>
struct grib_section;
struct grib_action;
struct grib_arguments;
struct grib_accessor;
namespace eccodes {
class AccessorMaker;
void registerMaker(std::string const& name, AccessorMaker const* maker);
AccessorMaker const* getMaker(std::string const& name);
class AccessorMaker {
struct MakerConcept {
virtual ~MakerConcept() = default;
virtual Accessor makeAccessor(grib_section* p, grib_action* creator, const long len, grib_arguments* arg) const = 0;
};
template<typename ACCESSOR_TYPE>
struct MakerModel : public MakerConcept {
Accessor makeAccessor(grib_section* p, grib_action* creator, const long len, grib_arguments* arg) const final {
return Accessor(AccessorType<ACCESSOR_TYPE>{}, p, creator, len, arg);
}
};
friend AccessorPtr makeAccessor(grib_section* p, grib_action* creator, const long len, grib_arguments* arg);
std::unique_ptr<MakerConcept> pimpl;
public:
template<typename ACCESSOR_TYPE>
AccessorMaker(std::string const& name, AccessorType<ACCESSOR_TYPE>) :
pimpl{ std::make_unique<MakerModel<ACCESSOR_TYPE>>()} {
registerMaker(name, this);
}
};
}
#endif // _ACCESSOR_MAKER_H_20230714_

View File

@ -0,0 +1,21 @@
#include "AccessorPtr.h"
#include "Accessor.h"
#include <algorithm>
namespace eccodes {
constexpr Accessor* AccessorPtr::release() noexcept {
Accessor* tmp = get();
reset();
return tmp;
}
constexpr void AccessorPtr::reset(Accessor* accessor /* = nullptr */) noexcept {
ptr_ = accessor;
}
void AccessorPtr::swap(AccessorPtr& other) noexcept {
std::swap(ptr_, other.ptr_);
}
}

View File

@ -0,0 +1,31 @@
#ifndef _ACCESSOR_PTR_H_20230712_
#define _ACCESSOR_PTR_H_20230712_
namespace eccodes {
// A non-owning pointer to an accessor
// Based on https://en.cppreference.com/w/cpp/experimental/observer_ptr
class Accessor;
class AccessorPtr{
Accessor* ptr_{};
public:
constexpr AccessorPtr() noexcept : ptr_{nullptr} {};
constexpr explicit AccessorPtr(Accessor* accessor) noexcept : ptr_{accessor} {};
constexpr Accessor* get() const noexcept { return ptr_; }
constexpr Accessor& operator*() const { return *get(); }
constexpr Accessor* operator->() const noexcept { return get(); }
constexpr explicit operator bool() const noexcept { return get() != nullptr; }
constexpr explicit operator Accessor*() const noexcept { return get(); }
constexpr Accessor* release() noexcept;
constexpr void reset(Accessor* accessor = nullptr) noexcept;
void swap(AccessorPtr& other) noexcept;
};
}
#endif // _ACCESSOR_PTR_H_20230712_

View File

@ -0,0 +1,62 @@
#ifndef _ACCESSOR_H_20230630_
#define _ACCESSOR_H_20230630_
#include "AccessorImpl.h"
namespace eccodes {
template<typename ACCESSOR_TYPE>
class Accessor : public AccessorImpl {
ACCESSOR_TYPE accessor_;
public:
operator grib_accessor*();
operator ACCESSOR_TYPE*();
private:
void dump(grib_dumper* dumper) override;
long next_offset() override;
size_t string_length() override;
int value_count(long* count) override;
long byte_count() override;
long byte_offset() override;
int get_native_type() override;
grib_section* sub_section() override;
int pack_missing() override;
int is_missing() override;
int pack_long(const long* val, size_t* len) override;
int unpack_long(long* val, size_t* len) override;
int pack_double(const double* val, size_t* len) override;
int pack_float(const float* val, size_t* len) override;
int unpack_double(double* val, size_t* len) override;
int unpack_float(float* val, size_t* len) override;
int pack_string(const char* v, size_t* len) override;
int unpack_string(char* v, size_t* len) override;
int pack_string_array(const char** v, size_t* len) override;
int unpack_string_array(char** v, size_t* len) override;
int pack_bytes(const unsigned char* val, size_t* len) override;
int unpack_bytes(unsigned char* val, size_t* len) override;
int pack_expression(grib_expression* e) override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value(double val, double* nearest) override;
grib_accessor* next(int mod) override;
int compare(grib_accessor* b) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor* make_clone(grib_section* s, int* err) override;
public:
virtual ~AccessorImpl();
};
}
#endif // _ACCESSOR_H_20230630_

View File

@ -0,0 +1,26 @@
#include "Accessor_Utils.h"
#include <cstdlib>
#include <string_view>
namespace eccodes {
using namespace std::string_view_literals;
constexpr std::string_view cpp_mode_env = "cpp_mode"sv;
constexpr std::string_view cpp_mode_env_enabled = "1"sv;
CppMode cppMode()
{
static CppMode cppMode_ = [](){
if(const char* envStr = std::getenv(cpp_mode_env.data());
envStr && envStr == cpp_mode_env_enabled) {
return CppMode::enabled;
}
return CppMode::disabled;
}();
return cppMode_;
}
}

View File

@ -0,0 +1,13 @@
#ifndef _GRIB_CPP_UTILS_H_20230624_
#define _GRIB_CPP_UTILS_H_20230624_
namespace eccodes {
// Set env var grib_cpp to 1 to enable C++ mode:
// $ export cpp_mode=1
enum class CppMode { notSet, enabled, disabled};
CppMode cppMode();
}
#endif // _GRIB_CPP_UTILS_H_20230624_

View File

@ -13,15 +13,21 @@
# Note the PARENT_SCOPE option sets the variable in the calling CMakeLists.txt
# file - it remains undefined in this file: https://cmake.org/cmake/help/latest/command/set.html
set(eccodes_grib_accessor_impl_src_files
${CMAKE_CURRENT_LIST_DIR}/ga_impl_creators.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl.h
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_abstract_long_vector.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_factory.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_g1step_range.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_gen.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_helper.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_proj_string.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_cpp_utils.cpp
${CMAKE_CURRENT_LIST_DIR}/Accessor_Utils.h
${CMAKE_CURRENT_LIST_DIR}/Accessor.h
${CMAKE_CURRENT_LIST_DIR}/AccessorConcept.h
${CMAKE_CURRENT_LIST_DIR}/AccessorFactory.h
${CMAKE_CURRENT_LIST_DIR}/AccessorMaker.h
${CMAKE_CURRENT_LIST_DIR}/AccessorPtr.h
${CMAKE_CURRENT_LIST_DIR}/Generic.h
${CMAKE_CURRENT_LIST_DIR}/ProjString.h
${CMAKE_CURRENT_LIST_DIR}/Accessor_Utils.cpp
${CMAKE_CURRENT_LIST_DIR}/Accessor.cpp
${CMAKE_CURRENT_LIST_DIR}/AccessorFactory.cpp
${CMAKE_CURRENT_LIST_DIR}/AccessorMaker.cpp
${CMAKE_CURRENT_LIST_DIR}/AccessorPtr.cpp
${CMAKE_CURRENT_LIST_DIR}/Generic.cpp
${CMAKE_CURRENT_LIST_DIR}/ProjString.cpp
${CMAKE_CURRENT_LIST_DIR}/pack_buffer.cpp
${CMAKE_CURRENT_LIST_DIR}/proj_string_helper.cpp
PARENT_SCOPE

View File

@ -0,0 +1,87 @@
#include "Generic.h"
//#include <iostream>
namespace eccodes {
Generic::Generic(grib_section* p, grib_action* creator, const long len, grib_arguments* arg)
{
// std::cout << "Generic() addr=0x" << std::hex << this << '\n';
// att is default initialised at this point...
att.name = creator->name;
att.name_space = creator->name_space;
att.context = p->h->context;
att.creator = creator;
if (p->block->last) { att.offset = grib_get_next_position_offset(p->block->last); }
else {
if (p->owner) { att.offset = p->owner->offset; }
else { att.offset = 0; }
}
att.parent = p;
att.flags = creator->flags;
att.all_names[0] = creator->name;
att.all_name_spaces[0] = creator->name_space;
att.set = creator->set;
// init() functionality
grib_action* act = (grib_action*)(att.creator);
if (att.flags & GRIB_ACCESSOR_FLAG_TRANSIENT) {
att.length = 0;
if (!att.vvalue)
att.vvalue = (grib_virtual_value*)grib_context_malloc_clear(att.context, sizeof(grib_virtual_value));
att.vvalue->type = grib_accessor_get_native_type(*this);
att.vvalue->length = len;
if (act->default_value != NULL) {
const char* p = 0;
size_t s_len = 1;
long l;
int ret = 0;
double d;
char tmp[1024];
grib_expression* expression = grib_arguments_get_expression(grib_handle_of_accessor(*this), act->default_value, 0);
int type = grib_expression_native_type(grib_handle_of_accessor(*this), expression);
switch (type) {
case GRIB_TYPE_DOUBLE:
grib_expression_evaluate_double(grib_handle_of_accessor(*this), expression, &d);
grib_pack_double(*this, &d, &s_len);
break;
case GRIB_TYPE_LONG:
grib_expression_evaluate_long(grib_handle_of_accessor(*this), expression, &l);
grib_pack_long(*this, &l, &s_len);
break;
default:
s_len = sizeof(tmp);
p = grib_expression_evaluate_string(grib_handle_of_accessor(*this), expression, tmp, &s_len, &ret);
if (ret != GRIB_SUCCESS) {
grib_context_log(att.context, GRIB_LOG_ERROR, "Unable to evaluate %s as string", att.name);
Assert(0);
}
s_len = strlen(p) + 1;
grib_pack_string(*this, p, &s_len);
break;
}
}
}
else {
att.length = len;
}
}
Generic::~Generic()
{
// std::cout << "~Generic() addr=0x" << std::hex << this << '\n';
grib_dependency_remove_observed(*this);
grib_dependency_remove_observer(*this);
if (att.vvalue != NULL) {
free(att.vvalue);
att.vvalue = NULL;
}
}
}

View File

@ -0,0 +1,311 @@
#ifndef _GENERIC_H_20230705_
#define _GENERIC_H_20230705_
#include "grib_api_internal.h"
namespace eccodes {
struct Generic
{
grib_accessor att{};
Generic(grib_section* p, grib_action* creator, const long len, grib_arguments* arg);
virtual ~Generic();
operator grib_accessor*() { return &att; }
// Prevent copies and moves
Generic(Generic const&) = delete;
Generic& operator=(Generic const&) = delete;
Generic(Generic&&) = delete;
Generic& operator=(Generic&&) = delete;
};
// Templated versions of the Accessor functions that provide a "fallback" version if not specialised
template<typename ACCESSOR_TYPE>
void dump(ACCESSOR_TYPE& accessor, grib_dumper* dumper)
{
int type = grib_accessor_get_native_type(accessor);
switch (type) {
case GRIB_TYPE_STRING:
grib_dump_string(dumper, accessor, NULL);
break;
case GRIB_TYPE_DOUBLE:
grib_dump_double(dumper, accessor, NULL);
break;
case GRIB_TYPE_LONG:
grib_dump_long(dumper, accessor, NULL);
break;
default:
grib_dump_bytes(dumper, accessor, NULL);
}
}
template<typename ACCESSOR_TYPE>
long nextOffset(ACCESSOR_TYPE& accessor)
{
return accessor.att.offset + accessor.att.length;
}
template<typename ACCESSOR_TYPE>
size_t stringLength(ACCESSOR_TYPE& accessor)
{
return 1024;
}
template<typename ACCESSOR_TYPE>
int valueCount(ACCESSOR_TYPE& accessor, long* count)
{
*count = 1;
return 0;
}
template<typename ACCESSOR_TYPE>
long byteCount(ACCESSOR_TYPE& accessor)
{
return accessor.att.length;
}
template<typename ACCESSOR_TYPE>
long byteOffset(ACCESSOR_TYPE& accessor)
{
return accessor.att.offset;
}
template<typename ACCESSOR_TYPE>
int nativeType(ACCESSOR_TYPE& accessor)
{
grib_context_log(accessor.att.context, GRIB_LOG_ERROR,
"Accessor %s must implement 'get_native_type'", accessor.att.name);
return GRIB_TYPE_UNDEFINED;
}
template<typename ACCESSOR_TYPE>
grib_section* subSection(ACCESSOR_TYPE& accessor)
{
return NULL;
}
template<typename ACCESSOR_TYPE>
int packMissing(ACCESSOR_TYPE& accessor)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int isMissing(ACCESSOR_TYPE& accessor)
{
int i = 0;
int is_missing = 1;
unsigned char ones = 0xff;
unsigned char* v = NULL;
if (accessor.att.flags & GRIB_ACCESSOR_FLAG_TRANSIENT) {
if (accessor.att.vvalue == NULL) {
grib_context_log(accessor.att.context, GRIB_LOG_ERROR, "%s internal error (flags=0x%lX)", accessor.att.name, accessor.att.flags);
Assert(!"grib_accessor_class_gen::is_missing(): accessor.att.vvalue == NULL");
return 0;
}
return accessor.att.vvalue->missing;
}
Assert(accessor.att.length >= 0);
v = grib_handle_of_accessor(accessor)->buffer->data + accessor.att.offset;
for (i = 0; i < accessor.att.length; i++) {
if (*v != ones) {
is_missing = 0;
break;
}
v++;
}
return is_missing;
}
template<typename ACCESSOR_TYPE>
int packLong(ACCESSOR_TYPE& accessor, const long* val, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackLong(ACCESSOR_TYPE& accessor, long* val, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int packDouble(ACCESSOR_TYPE& accessor, const double* val, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int packFloat(ACCESSOR_TYPE& accessor, const float* val, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackDouble(ACCESSOR_TYPE& accessor, double* val, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackFloat(ACCESSOR_TYPE& accessor, float* val, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int packString(ACCESSOR_TYPE& accessor, const char* v, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackString(ACCESSOR_TYPE& accessor, char* v, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int packStringArray(ACCESSOR_TYPE& accessor, const char** v, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackStringArray(ACCESSOR_TYPE& accessor, char** v, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int packBytes(ACCESSOR_TYPE& accessor, const unsigned char* val, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackBytes(ACCESSOR_TYPE& accessor, unsigned char* val, size_t* len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int packExpression(ACCESSOR_TYPE& accessor, grib_expression* e)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int notifyChange(ACCESSOR_TYPE& accessor, grib_accessor* observed)
{
/* Default behaviour is to notify creator */
return grib_action_notify_change(accessor.att.creator, accessor, observed);
}
template<typename ACCESSOR_TYPE>
void updateSize(ACCESSOR_TYPE& accessor, size_t s)
{
grib_context_log(accessor.att.context, GRIB_LOG_ERROR,
"Accessor %s must implement 'update_size'", accessor.att.name);
Assert(0 == 1);
}
template<typename ACCESSOR_TYPE>
size_t preferredSize(ACCESSOR_TYPE& accessor, int from_handle)
{
return accessor.att.length;
}
template<typename ACCESSOR_TYPE>
void resize(ACCESSOR_TYPE& accessor, size_t new_size)
{
return;
}
template<typename ACCESSOR_TYPE>
int nearestSmallerValue(ACCESSOR_TYPE& accessor, double val, double* nearest)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
grib_accessor* next(ACCESSOR_TYPE& accessor, int mod)
{
grib_accessor* next = NULL;
if (accessor.att.next) {
next = accessor.att.next;
}
else {
// TODO - Need to convert parent->owner to Accessor)
if (accessor.att.parent->owner)
next = accessor.att.parent->owner->cclass->next(accessor.att.parent->owner, 0);
}
return next;
}
template<typename ACCESSOR_TYPE>
int compare(ACCESSOR_TYPE& accessor, grib_accessor* b)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackDoubleElement(ACCESSOR_TYPE& accessor, size_t i, double* val)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackFloatElement(ACCESSOR_TYPE& accessor, size_t i, float* val)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackDoubleElementSet(ACCESSOR_TYPE& accessor, const size_t* index_array, size_t len, double* val_array)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackFloatElementSet(ACCESSOR_TYPE& accessor, const size_t* index_array, size_t len, float* val_array)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int unpackDoubleSubarray(ACCESSOR_TYPE& accessor, double* val, size_t start, size_t len)
{
return GRIB_NOT_IMPLEMENTED;
}
template<typename ACCESSOR_TYPE>
int clear(ACCESSOR_TYPE& accessor)
{
unsigned char* buf = grib_handle_of_accessor(accessor)->buffer->data;
long length = grib_byte_count(accessor);
long offset = grib_byte_offset(accessor);
memset(buf + offset, 0, length);
return GRIB_SUCCESS;
}
template<typename ACCESSOR_TYPE>
grib_accessor* makeClone(ACCESSOR_TYPE& accessor, grib_section* s, int* err)
{
*err = GRIB_NOT_IMPLEMENTED;
return NULL;
}
}
#endif // _GENERIC_H_20230705_

View File

@ -0,0 +1,75 @@
#include "ProjString.h"
#include "proj_string_helper.h"
#include "AccessorMaker.h"
//#include <iostream>
namespace eccodes {
ProjString::ProjString(grib_section* p, grib_action* creator, const long len, grib_arguments* arg) :
Generic(p, creator, len, arg)
{
// std::cout << "ProjString() addr=0x" << std::hex << this << '\n';
grib_handle* h = grib_handle_of_accessor(*this);
this->grid_type = grib_arguments_get_name(h, arg, 0);
this->endpoint = grib_arguments_get_long(h, arg, 1);
att.length = 0;
att.flags |= GRIB_ACCESSOR_FLAG_READ_ONLY;
att.flags |= GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC;
}
ProjString::~ProjString()
{
// std::cout << "~ProjString() addr=0x" << std::hex << this << '\n';
}
int nativeType(ProjString& projString)
{
return GRIB_TYPE_STRING;
}
#define ENDPOINT_SOURCE 0
#define ENDPOINT_TARGET 1
int unpackString(ProjString& projString, char* v, size_t* len)
{
int err = 0, found = 0;
size_t i = 0;
char grid_type[64] = {0,};
grib_handle* h = grib_handle_of_accessor(projString);
size_t size = sizeof(grid_type) / sizeof(*grid_type);
Assert(projString.endpoint == ENDPOINT_SOURCE || projString.endpoint == ENDPOINT_TARGET);
err = grib_get_string(h, projString.grid_type, grid_type, &size);
if (err) return err;
proj_func func{};
err = get_proj_func(grid_type, func);
if(err == GRIB_SUCCESS)
{
if (projString.endpoint == ENDPOINT_SOURCE) {
snprintf(v, 64, "EPSG:4326");
}
else {
// Invoke the appropriate function to get the target proj string
if ((err = func(h, v)) != GRIB_SUCCESS) return err;
}
}
else if(err == GRIB_NOT_FOUND)
{
*len = 0;
return GRIB_NOT_FOUND;
}
else return err;
size = strlen(v);
Assert(size > 0);
*len = size + 1;
return err;
}
static AccessorMaker projStringMaker("proj_string", AccessorType<ProjString>{});
}

View File

@ -0,0 +1,21 @@
#ifndef _PROJ_STRING_H_20230705_
#define _PROJ_STRING_H_20230705_
#include "Generic.h"
namespace eccodes {
struct ProjString : public Generic
{
const char* grid_type{};
int endpoint{};
ProjString(grib_section* p, grib_action* creator, const long len, grib_arguments* arg);
virtual ~ProjString();
};
int nativeType(ProjString& projString);
int unpackString(ProjString& projString, char* v, size_t* len);
}
#endif // _PROJ_STRING_H_20230705_

View File

@ -0,0 +1,28 @@
#
# (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
#
# Define all the source files to build for the C++ accessors
# Note the PARENT_SCOPE option sets the variable in the calling CMakeLists.txt
# file - it remains undefined in this file: https://cmake.org/cmake/help/latest/command/set.html
set(eccodes_grib_accessor_impl_src_files
${CMAKE_CURRENT_LIST_DIR}/ga_impl_creators.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl.h
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_abstract_long_vector.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_factory.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_g1step_range.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_gen.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_helper.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_accessor_impl_proj_string.cpp
${CMAKE_CURRENT_LIST_DIR}/grib_cpp_utils.cpp
${CMAKE_CURRENT_LIST_DIR}/pack_buffer.cpp
${CMAKE_CURRENT_LIST_DIR}/proj_string_helper.cpp
PARENT_SCOPE
)

View File

@ -0,0 +1,264 @@
#include "pack_buffer.h"
#include <type_traits>
#include "grib_api_internal.h"
namespace eccodes {
// is_variant_member
//
// This template allows us to check if the type of IN_PTR and OUT_PTR
// used below are valid. This is done by checking if the type has been
// defined as part of the appropriate std::variant
template <class T, class... Us>
struct is_one_of : std::false_type {};
template <class T, class U>
struct is_one_of<T, U> : std::is_same<T, U> {};
template <class T, class U, class... Us>
struct is_one_of<T, U, Us...> : std::bool_constant<std::is_same<T, U>::value || is_one_of<T, Us...>::value> {};
template <class T, class Variant>
struct is_variant_member;
template <class T, class... Us>
struct is_variant_member<T, std::variant<Us...>> : is_one_of<T, Us...> {};
template<typename OUT_VIEW>
int init_view(OUT_VIEW& out_view, std::size_t out_buffer_size_bytes, grib_context *c)
{
static_assert(is_variant_member<OUT_VIEW, view_type>::value,
"OUT_VIEW must be one of the types defined in const_view_type");
Assert(!out_view.ptr);
using out_type = typename OUT_VIEW::type;
if(out_view.ptr = (out_type*)grib_context_malloc(c, out_buffer_size_bytes); !out_view.ptr)
{
grib_context_log(c, GRIB_LOG_ERROR, "Unable to allocate %ld bytes\n", out_buffer_size_bytes);
return GRIB_OUT_OF_MEMORY;
}
std::size_t len_buffer_size_bytes = sizeof(std::size_t);
if(out_view.len = (std::size_t*)grib_context_malloc(c, len_buffer_size_bytes); !out_view.len)
{
grib_context_log(c, GRIB_LOG_ERROR, "Unable to allocate %ld bytes\n", len_buffer_size_bytes);
grib_context_free(c, out_view.ptr);
return GRIB_OUT_OF_MEMORY;
}
return GRIB_SUCCESS;
}
// Helper function to take the input pointer and transform it to a buffer of the desired type
//
// IN_VIEW is the active type_view held by pack_buffer::in_view, as passed into std::visit()
// OUT_VIEW is the type_view to write the results to, e.g. double_buffer_view for the doubles member
//
// Returns a GRIB status code
template<typename IN_VIEW, typename OUT_VIEW>
int transform(IN_VIEW const& in_view, OUT_VIEW& out_view, grib_context *c)
{
static_assert(is_variant_member<IN_VIEW, const_view_type>::value,
"IN_VIEW must be one of the types defined in const_view_type");
static_assert(is_variant_member<OUT_VIEW, view_type>::value,
"OUT_VIEW must be one of the types defined in const_view_type");
Assert(in_view.ptr && !out_view.ptr);
using out_type = typename OUT_VIEW::type;
std::size_t out_buffer_size_bytes = *in_view.len * sizeof(out_type);
if(int ret = init_view(out_view, out_buffer_size_bytes, c); ret != GRIB_SUCCESS) { return ret;}
for(std::size_t index = 0; index < *in_view.len; ++index)
{
out_view.ptr[index] = static_cast<out_type>(in_view.ptr[index]);
}
*out_view.len = *in_view.len;
return GRIB_SUCCESS;
}
// transform() overload for string to double
// Note: we don't specialise the template: https://www.modernescpp.com/index.php/full-specialization-of-function-templates
int transform(const_char_view const& in_view, double_view& out_view, grib_context *c)
{
Assert(in_view.ptr && !out_view.ptr);
std::size_t dlen = 1;
std::size_t out_buffer_size_bytes = dlen*sizeof(double);
if(int ret = init_view(out_view, out_buffer_size_bytes, c); ret != GRIB_SUCCESS) { return ret;}
char* endPtr = NULL; /* for error handling */
*out_view.ptr = strtod(in_view.ptr, &endPtr);
if (*endPtr) {
// TODO - We don't have the accessor's name here
// grib_context_log(c, GRIB_LOG_ERROR,
// "pack_string: Invalid value (%s) for %s. String cannot be converted to a double",
// v, a->name);
grib_context_log(c, GRIB_LOG_ERROR,
"pack_string: Invalid value (%s). String cannot be converted to a double",
*in_view.ptr);
return GRIB_WRONG_TYPE;
}
*out_view.len = dlen;
return GRIB_SUCCESS;
}
// transform() overload for string to long
// Note: we don't specialise the template: https://www.modernescpp.com/index.php/full-specialization-of-function-templates
int transform(const_char_view const& in_view, long_view& out_view, grib_context *c)
{
Assert(in_view.ptr && !out_view.ptr);
std::size_t llen = 1;
std::size_t out_buffer_size_bytes = llen*sizeof(long);
if(int ret = init_view(out_view, out_buffer_size_bytes, c); ret != GRIB_SUCCESS) { return ret;}
*out_view.ptr = atol(in_view.ptr);
*out_view.len = llen;
return GRIB_SUCCESS;
}
// std::visit helper (with deduction guide as we're compiling as C++17)
template<class... Ts> struct overload : Ts... { using Ts::operator()...; };
template<class... Ts> overload(Ts...) -> overload<Ts...>;
pack_buffer::pack_buffer(grib_context *context_ptr, const_view_type input_view) :
context{context_ptr}, in_view{input_view}
{
// Check that in_value_type is not a nullptr
bool valid_input_values_ptr = std::visit(
overload{
[](const_byte_view cbv) { return cbv.ptr!=nullptr; },
[](const_double_view cdv) { return cdv.ptr!=nullptr; },
[](const_float_view cfv) { return cfv.ptr!=nullptr; },
[](const_long_view clv) { return clv.ptr!=nullptr; },
[](const_char_view ccv) { return ccv.ptr!=nullptr; },
},
in_view
);
Assert(valid_input_values_ptr);
}
pack_buffer::~pack_buffer()
{
if(bytes.ptr) { grib_context_free(context, bytes.ptr); }
if(bytes.len) { grib_context_free(context, bytes.len); }
if(doubles.ptr) { grib_context_free(context, doubles.ptr); }
if(doubles.len) { grib_context_free(context, doubles.len); }
if(floats.ptr) { grib_context_free(context, floats.ptr); }
if(floats.len) { grib_context_free(context, floats.len); }
if(longs.ptr) { grib_context_free(context, longs.ptr); }
if(longs.len) { grib_context_free(context, longs.len); }
if(chars.ptr) { grib_context_free(context, chars.ptr); }
if(chars.len) { grib_context_free(context, chars.len); }
}
const_byte_view pack_buffer::to_bytes()
{
if(!bytes.ptr) {
status = std::visit(
overload{
[](const_byte_view cbv) { return GRIB_NOT_IMPLEMENTED; },
[](const_double_view cdv) { return GRIB_NOT_IMPLEMENTED; },
[](const_float_view cfv) { return GRIB_NOT_IMPLEMENTED; },
[](const_long_view clv) { return GRIB_NOT_IMPLEMENTED; },
[](const_char_view ccv) { return GRIB_NOT_IMPLEMENTED; },
},
in_view
);
}
return const_byte_view{bytes.ptr, bytes.len};
}
const_double_view pack_buffer::to_doubles()
{
if(std::holds_alternative<const_double_view>(in_view)) { return std::get<const_double_view>(in_view); }
if(!doubles.ptr) {
status = std::visit(
overload{
[](const_byte_view cbv) { return GRIB_NOT_IMPLEMENTED; },
[](const_double_view cdv) { Assert(false); return GRIB_INTERNAL_ERROR; },
[](const_float_view cfv) { return GRIB_NOT_IMPLEMENTED; },
[this](const_long_view clv) { return transform(clv, doubles, context); },
[this](const_char_view ccv) { return transform(ccv, doubles, context); },
},
in_view
);
}
return const_double_view{doubles.ptr, doubles.len};
}
const_float_view pack_buffer::to_floats()
{
if(std::holds_alternative<const_float_view>(in_view)) { return std::get<const_float_view>(in_view); }
if(!floats.ptr) {
status = std::visit(
overload{
[](const_byte_view cbv) { return GRIB_NOT_IMPLEMENTED; },
[](const_double_view cdv) { return GRIB_NOT_IMPLEMENTED; },
[](const_float_view cfv) { Assert(false); return GRIB_INTERNAL_ERROR; },
[this](const_long_view clv) { return transform(clv, floats, context); },
[](const_char_view ccv) { return GRIB_NOT_IMPLEMENTED; },
},
in_view
);
}
return const_float_view{floats.ptr, floats.len};
}
const_long_view pack_buffer::to_longs()
{
if(std::holds_alternative<const_long_view>(in_view)) { return std::get<const_long_view>(in_view); }
if(!longs.ptr) {
status = std::visit(
overload{
[](const_byte_view cbv) { return GRIB_NOT_IMPLEMENTED; },
[this](const_double_view cdv) { return transform(cdv, longs, context); },
[](const_float_view cfv) { return GRIB_NOT_IMPLEMENTED; },
[](const_long_view clv) { Assert(false); return GRIB_INTERNAL_ERROR; },
[this](const_char_view ccv) { return transform(ccv, longs, context); },
},
in_view
);
}
return const_long_view{longs.ptr, longs.len};
}
const_char_view pack_buffer::to_string()
{
if(std::holds_alternative<const_char_view>(in_view)) { return std::get<const_char_view>(in_view); }
if(!chars.ptr) {
status = std::visit(
overload{
[](const_byte_view cbv) { return GRIB_NOT_IMPLEMENTED; },
[this](const_double_view cdv) { return GRIB_NOT_IMPLEMENTED; },
[](const_float_view cfv) { return GRIB_NOT_IMPLEMENTED; },
[this](const_long_view clv) { return GRIB_NOT_IMPLEMENTED; },
[](const_char_view ccv) { Assert(false); return GRIB_INTERNAL_ERROR; },
},
in_view
);
}
return const_char_view{chars.ptr, chars.len};
}
}

View File

@ -0,0 +1,41 @@
#ifndef _PACK_BUFFER_H_20230613_
#define _PACK_BUFFER_H_20230613_
#include "type_view.h"
#include <variant>
#include <type_traits>
struct grib_context;
namespace eccodes {
using const_view_type = std::variant<const_byte_view, const_double_view, const_float_view, const_long_view, const_char_view>;
using view_type = std::variant<byte_view, double_view, float_view, long_view, char_view>;
class pack_buffer{
grib_context *context; // To give us access to the Grib memory functions
const_view_type in_view;
int status{}; // Default value 0 = GRIB_SUCCESS;
byte_view bytes{};
double_view doubles{};
float_view floats{};
long_view longs{};
char_view chars{};
public:
pack_buffer(grib_context *context_ptr, const_view_type input_view);
~pack_buffer();
const_view_type input_view() const { return in_view; }
int current_status() const { return status; }
const_byte_view to_bytes();
const_double_view to_doubles();
const_float_view to_floats();
const_long_view to_longs();
const_char_view to_string();
};
}
#endif // _PACK_BUFFER_H_20230613_

View File

@ -0,0 +1,198 @@
#include "proj_string_helper.h"
#include "grib_api_internal.h"
#include <array>
#include <algorithm>
#include <cstring>
namespace eccodes {
// This should only be called for GRID POINT data (not spherical harmonics etc)
static int get_major_minor_axes(grib_handle* h, double* pMajor, double* pMinor)
{
int err = 0;
if (grib_is_earth_oblate(h)) {
if ((err = grib_get_double_internal(h, "earthMinorAxisInMetres", pMinor)) != GRIB_SUCCESS) return err;
if ((err = grib_get_double_internal(h, "earthMajorAxisInMetres", pMajor)) != GRIB_SUCCESS) return err;
}
else {
double radius = 0;
if ((err = grib_get_double_internal(h, "radius", &radius)) != GRIB_SUCCESS) return err;
*pMajor = *pMinor = radius;
}
return err;
}
// Caller must have allocated enough space in the 'result' argument
static int get_earth_shape(grib_handle* h, char* result)
{
int err = 0;
double major = 0, minor = 0;
if ((err = get_major_minor_axes(h, &major, &minor)) != GRIB_SUCCESS)
return err;
if (major == minor)
snprintf(result, 128, "+R=%lf", major); // spherical
else
snprintf(result, 128, "+a=%lf +b=%lf", major, minor); // oblate
return err;
}
static int proj_space_view(grib_handle* h, char* result)
{
return GRIB_NOT_IMPLEMENTED;
#if 0
int err = 0;
char shape[64] = {0,};
double latOfSubSatellitePointInDegrees, lonOfSubSatellitePointInDegrees;
if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS)
return err;
if ((err = grib_get_double_internal(h, "longitudeOfSubSatellitePointInDegrees", &lonOfSubSatellitePointInDegrees)) != GRIB_SUCCESS)
return err;
snprintf(result, 526, "+proj=geos +lon_0=%lf +h=35785831 +x_0=0 +y_0=0 %s", lonOfSubSatellitePointInDegrees, shape);
return err;
/* Experimental: For now do the same as gdalsrsinfo - hard coded values! */
snprintf(result, 526, "+proj=geos +lon_0=0 +h=35785831 +x_0=0 +y_0=0 %s", shape);
return err;
#endif
}
static int proj_albers(grib_handle* h, char* result)
{
return GRIB_NOT_IMPLEMENTED;
}
static int proj_transverse_mercator(grib_handle* h, char* result)
{
return GRIB_NOT_IMPLEMENTED;
}
static int proj_equatorial_azimuthal_equidistant(grib_handle* h, char* result)
{
return GRIB_NOT_IMPLEMENTED;
}
static int proj_lambert_conformal(grib_handle* h, char* result)
{
int err = 0;
char shape[64] = {0,};
double LoVInDegrees = 0, LaDInDegrees = 0, Latin1InDegrees = 0, Latin2InDegrees = 0;
if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS)
return err;
if ((err = grib_get_double_internal(h, "Latin1InDegrees", &Latin1InDegrees)) != GRIB_SUCCESS)
return err;
if ((err = grib_get_double_internal(h, "Latin2InDegrees", &Latin2InDegrees)) != GRIB_SUCCESS)
return err;
if ((err = grib_get_double_internal(h, "LoVInDegrees", &LoVInDegrees)) != GRIB_SUCCESS)
return err;
if ((err = grib_get_double_internal(h, "LaDInDegrees", &LaDInDegrees)) != GRIB_SUCCESS)
return err;
snprintf(result, 1024, "+proj=lcc +lon_0=%lf +lat_0=%lf +lat_1=%lf +lat_2=%lf %s",
LoVInDegrees, LaDInDegrees, Latin1InDegrees, Latin2InDegrees, shape);
return err;
}
static int proj_lambert_azimuthal_equal_area(grib_handle* h, char* result)
{
int err = 0;
char shape[64] = {0,};
double standardParallel = 0, centralLongitude = 0;
if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS)
return err;
if ((err = grib_get_double_internal(h, "standardParallelInDegrees", &standardParallel)) != GRIB_SUCCESS)
return err;
if ((err = grib_get_double_internal(h, "centralLongitudeInDegrees", &centralLongitude)) != GRIB_SUCCESS)
return err;
snprintf(result, 1024, "+proj=laea +lon_0=%lf +lat_0=%lf %s",
centralLongitude, standardParallel, shape);
return err;
}
static int proj_polar_stereographic(grib_handle* h, char* result)
{
int err = 0;
double centralLongitude = 0, centralLatitude = 0;
int has_northPole = 0;
long projectionCentreFlag = 0;
char shape[64] = {0,};
if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS)
return err;
if ((err = grib_get_double_internal(h, "orientationOfTheGridInDegrees", &centralLongitude)) != GRIB_SUCCESS)
return err;
if ((err = grib_get_double_internal(h, "LaDInDegrees", &centralLatitude)) != GRIB_SUCCESS)
return err;
if ((err = grib_get_long_internal(h, "projectionCentreFlag", &projectionCentreFlag)) != GRIB_SUCCESS)
return err;
has_northPole = ((projectionCentreFlag & 128) == 0);
snprintf(result, 1024, "+proj=stere +lat_ts=%lf +lat_0=%s +lon_0=%lf +k_0=1 +x_0=0 +y_0=0 %s",
centralLatitude, has_northPole ? "90" : "-90", centralLongitude, shape);
return err;
}
// ECC-1552: This is for regular_ll, regular_gg, reduced_ll, reduced_gg
// These are not 'projected' grids!
static int proj_unprojected(grib_handle* h, char* result)
{
int err = 0;
//char shape[64] = {0,};
//if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) return err;
//snprintf(result, 1024, "+proj=longlat %s", shape);
snprintf(result, 1024, "+proj=longlat +datum=WGS84 +no_defs +type=crs");
return err;
}
static int proj_mercator(grib_handle* h, char* result)
{
int err = 0;
double LaDInDegrees = 0;
char shape[64] = {0,};
if ((err = grib_get_double_internal(h, "LaDInDegrees", &LaDInDegrees)) != GRIB_SUCCESS)
return err;
if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS)
return err;
snprintf(result, 1024, "+proj=merc +lat_ts=%lf +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 %s",
LaDInDegrees, shape);
return err;
}
struct proj_mapping
{
const char* gridType; // key gridType
proj_func func; // function to compute proj string
};
typedef struct proj_mapping proj_mapping;
static std::array proj_mappings = {
proj_mapping{ "regular_ll", &proj_unprojected },
proj_mapping{ "regular_gg", &proj_unprojected },
proj_mapping{ "reduced_ll", &proj_unprojected },
proj_mapping{ "reduced_gg", &proj_unprojected },
proj_mapping{ "mercator", &proj_mercator },
proj_mapping{ "lambert", &proj_lambert_conformal },
proj_mapping{ "polar_stereographic", &proj_polar_stereographic },
proj_mapping{ "lambert_azimuthal_equal_area", &proj_lambert_azimuthal_equal_area },
proj_mapping{ "space_view", &proj_space_view },
proj_mapping{ "albers", &proj_albers },
proj_mapping{ "transverse_mercator", &proj_transverse_mercator },
proj_mapping{ "equatorial_azimuthal_equidistant", &proj_equatorial_azimuthal_equidistant },
};
int get_proj_func(const char* grid_type, proj_func &func)
{
if(auto it = std::find_if(std::begin(proj_mappings), std::end(proj_mappings),
[grid_type](const proj_mapping& pm){ return strcmp(grid_type, pm.gridType) == 0; });
it != proj_mappings.end()) {
func = it->func;
return GRIB_SUCCESS;
}
return GRIB_NOT_FOUND;
}
}

View File

@ -0,0 +1,14 @@
#ifndef _PROJ_STRING_HELPER_H_20230620_
#define _PROJ_STRING_HELPER_H_20230620_
struct grib_handle;
namespace eccodes {
// Function pointer than takes a handle and returns the proj string
typedef int (*proj_func)(grib_handle*, char*);
int get_proj_func(const char* grid_type, proj_func &func);
}
#endif // _PROJ_STRING_HELPER_H_20230620_

View File

@ -0,0 +1,434 @@
#!/bin/sh
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_abstract_vector.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_apply_operators.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_array.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_ascii.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_assert.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bit.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bits.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bits_per_value.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_blob.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_box.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_budgdate.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_data_array.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_data_element.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_elements_table.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_extract_area_subsets.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_extract_datetime_subsets.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_extract_subsets.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_group.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_simple_thinning.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_string_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufrdc_expanded_descriptors.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bytes.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_change_alternative_row_scanning.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_change_scanning_direction.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_check_internal_version.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_closest_date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_codeflag.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_codetable.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_codetable_title.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_codetable_units.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_concept.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_constant.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_count_file.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_count_missing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_count_total.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_2order_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_apply_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_apply_boustrophedonic.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_apply_boustrophedonic_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_apply_gdsnotpresent.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_ccsds_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_complex_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_dummy_field.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1complex_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1second_order_constant_width_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1second_order_general_extended_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1second_order_general_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1second_order_row_by_row_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1secondary_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1shsimple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1simple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g22order_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2bifourier_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2complex_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2secondary_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2shsimple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2simple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2simple_packing_with_preprocessing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_jpeg2000_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_png_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_raw_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_run_length_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_secondary_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_sh_packed.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_sh_unpacked.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_shsimple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_simple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_decimal_precision.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_dictionary.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_dirty.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_divdouble.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_double.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_element.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_evaluate.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_expanded_descriptors.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_forward.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_from_scale_factor_scaled_value.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1_half_byte_codeflag.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1_message_length.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1_section4_length.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1area.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1day_of_the_year_date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1end_of_interval_monthly.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1fcperiod.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1forecastmonth.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1monthlydate.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1number_of_coded_values_sh_complex.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1number_of_coded_values_sh_simple.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1verificationdate.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2_aerosol.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2_chemical.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2_eps.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2_mars_labeling.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2bitmap_present.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2end_step.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2grid.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2latlon.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2level.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2lon.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2step_range.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_gaussian_grid_name.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_gds_is_present.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_gds_not_present_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_getenv.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_global_gaussian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_group.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_gts_header.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_hash_array.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_headers_only.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_ibmfloat.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_ieeefloat.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_ifs_param.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int16.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int16_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int32.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int32_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int64.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int64_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int8.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_iterator.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_julian_date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_julian_day.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_ksec1expver.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_label.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_laplacian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_latitudes.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_latlon_increment.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_latlonvalues.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_library_version.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_local_definition.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_long.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_long_vector.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_longitudes.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_lookup.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_mars_param.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_mars_step.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_md5.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_message.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_message_copy.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_missing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_nearest.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_non_alpha.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_number_of_coded_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_number_of_points.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_number_of_points_gaussian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_number_of_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_number_of_values_data_raw_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_octahedral_gaussian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_octet_number.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_offset_file.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_offset_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_pack_bufr_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_pad.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_padding.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_padto.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_padtoeven.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_padtomultiple.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_position.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_raw.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_rdbtime_guess_date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_reference_value_error.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_round.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_scale.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_scale_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_second_order_bits_per_value.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_section.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_section_length.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_section_padding.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_section_pointer.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_select_step_template.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_sexagesimal2decimal.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_signed.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_signed_bits.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_simple_packing_error.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_size.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_smart_table.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_smart_table_column.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_spd.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_spectral_truncation.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_sprintf.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_statistics.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_statistics_spectral.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_step_human_readable.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_step_in_units.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_sum.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_suppressed.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_time.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_times.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_to_double.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_to_integer.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_to_string.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_transient.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_transient_darray.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_trim.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint16.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint16_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint32.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint32_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint64.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint64_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint8.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_unexpanded_descriptors.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_unpack_bufr_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_unsigned.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_unsigned_bits.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_validity_date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_validity_time.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_variable.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_vector.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_when.h
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_abstract_vector.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_apply_operators.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_array.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_ascii.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_assert.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bit.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bits.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bits_per_value.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_blob.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_box.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_budgdate.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_data_array.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_data_element.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_elements_table.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_extract_area_subsets.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_extract_datetime_subsets.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_extract_subsets.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_group.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_simple_thinning.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_string_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufrdc_expanded_descriptors.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bytes.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_change_alternative_row_scanning.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_change_scanning_direction.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_check_internal_version.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_closest_date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_codeflag.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_codetable.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_codetable_title.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_codetable_units.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_concept.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_constant.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_count_file.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_count_missing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_count_total.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_2order_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_apply_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_apply_boustrophedonic.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_apply_boustrophedonic_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_apply_gdsnotpresent.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_ccsds_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_complex_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_dummy_field.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1complex_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1second_order_constant_width_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1second_order_general_extended_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1second_order_general_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1second_order_row_by_row_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1secondary_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1shsimple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1simple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g22order_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2bifourier_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2complex_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2secondary_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2shsimple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2simple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2simple_packing_with_preprocessing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_jpeg2000_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_png_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_raw_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_run_length_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_secondary_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_sh_packed.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_sh_unpacked.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_shsimple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_simple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_decimal_precision.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_dictionary.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_dirty.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_divdouble.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_double.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_element.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_evaluate.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_expanded_descriptors.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_forward.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_from_scale_factor_scaled_value.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1_half_byte_codeflag.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1_message_length.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1_section4_length.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1area.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1day_of_the_year_date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1end_of_interval_monthly.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1fcperiod.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1forecastmonth.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1monthlydate.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1number_of_coded_values_sh_complex.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1number_of_coded_values_sh_simple.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1verificationdate.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2_aerosol.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2_chemical.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2_eps.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2_mars_labeling.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2bitmap_present.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2end_step.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2grid.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2latlon.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2level.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2lon.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2step_range.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_gaussian_grid_name.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_gds_is_present.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_gds_not_present_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_getenv.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_global_gaussian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_group.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_gts_header.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_hash_array.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_headers_only.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_ibmfloat.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_ieeefloat.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_ifs_param.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int16.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int16_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int32.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int32_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int64.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int64_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int8.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_iterator.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_julian_date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_julian_day.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_ksec1expver.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_label.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_laplacian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_latitudes.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_latlon_increment.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_latlonvalues.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_library_version.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_local_definition.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_long.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_long_vector.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_longitudes.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_lookup.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_mars_param.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_mars_step.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_md5.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_message.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_message_copy.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_missing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_nearest.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_non_alpha.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_number_of_coded_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_number_of_points.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_number_of_points_gaussian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_number_of_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_number_of_values_data_raw_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_octahedral_gaussian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_octet_number.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_offset_file.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_offset_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_pack_bufr_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_pad.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_padding.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_padto.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_padtoeven.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_padtomultiple.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_position.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_raw.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_rdbtime_guess_date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_reference_value_error.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_round.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_scale.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_scale_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_second_order_bits_per_value.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_section.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_section_length.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_section_padding.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_section_pointer.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_select_step_template.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_sexagesimal2decimal.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_signed.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_signed_bits.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_simple_packing_error.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_size.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_smart_table.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_smart_table_column.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_spd.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_spectral_truncation.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_sprintf.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_statistics.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_statistics_spectral.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_step_human_readable.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_step_in_units.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_sum.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_suppressed.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_time.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_times.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_to_double.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_to_integer.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_to_string.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_transient.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_transient_darray.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_trim.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint16.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint16_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint32.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint32_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint64.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint64_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint8.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_unexpanded_descriptors.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_unpack_bufr_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_unsigned.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_unsigned_bits.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_validity_date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_validity_time.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_variable.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_vector.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_when.cpp

View File

@ -0,0 +1,438 @@
#!/bin/sh
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_abstract_long_vector.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_abstract_vector.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_apply_operators.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_array.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_ascii.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_assert.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bit.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bits.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bits_per_value.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_blob.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_box.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_budgdate.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_data_array.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_data_element.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_elements_table.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_extract_area_subsets.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_extract_datetime_subsets.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_extract_subsets.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_group.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_simple_thinning.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufr_string_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bufrdc_expanded_descriptors.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_bytes.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_change_alternative_row_scanning.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_change_scanning_direction.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_check_internal_version.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_closest_date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_codeflag.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_codetable.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_codetable_title.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_codetable_units.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_concept.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_constant.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_count_file.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_count_missing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_count_total.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_2order_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_apply_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_apply_boustrophedonic.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_apply_boustrophedonic_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_apply_gdsnotpresent.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_ccsds_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_complex_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_dummy_field.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1complex_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1second_order_constant_width_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1second_order_general_extended_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1second_order_general_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1second_order_row_by_row_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1secondary_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1shsimple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g1simple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g22order_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2bifourier_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2complex_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2secondary_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2shsimple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2simple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_g2simple_packing_with_preprocessing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_jpeg2000_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_png_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_raw_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_run_length_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_secondary_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_sh_packed.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_sh_unpacked.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_shsimple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_data_simple_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_decimal_precision.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_dictionary.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_dirty.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_divdouble.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_double.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_element.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_evaluate.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_expanded_descriptors.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_forward.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_from_scale_factor_scaled_value.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1_half_byte_codeflag.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1_message_length.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1_section4_length.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1area.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1day_of_the_year_date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1end_of_interval_monthly.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1fcperiod.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1forecastmonth.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1monthlydate.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1number_of_coded_values_sh_complex.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1number_of_coded_values_sh_simple.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1step_range.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g1verificationdate.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2_aerosol.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2_chemical.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2_eps.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2_mars_labeling.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2bitmap_present.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2end_step.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2grid.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2latlon.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2level.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2lon.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_g2step_range.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_gaussian_grid_name.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_gds_is_present.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_gds_not_present_bitmap.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_getenv.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_global_gaussian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_group.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_gts_header.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_hash_array.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_headers_only.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_ibmfloat.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_ieeefloat.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_ifs_param.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int16.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int16_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int32.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int32_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int64.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int64_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_int8.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_iterator.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_julian_date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_julian_day.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_ksec1expver.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_label.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_laplacian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_latitudes.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_latlon_increment.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_latlonvalues.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_library_version.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_local_definition.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_long.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_long_vector.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_longitudes.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_lookup.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_mars_param.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_mars_step.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_md5.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_message.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_message_copy.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_missing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_nearest.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_non_alpha.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_number_of_coded_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_number_of_points.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_number_of_points_gaussian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_number_of_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_number_of_values_data_raw_packing.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_octahedral_gaussian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_octet_number.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_offset_file.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_offset_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_pack_bufr_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_pad.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_padding.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_padto.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_padtoeven.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_padtomultiple.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_position.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_raw.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_rdbtime_guess_date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_reference_value_error.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_round.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_scale.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_scale_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_second_order_bits_per_value.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_section.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_section_length.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_section_padding.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_section_pointer.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_select_step_template.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_sexagesimal2decimal.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_signed.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_signed_bits.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_simple_packing_error.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_size.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_smart_table.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_smart_table_column.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_spd.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_spectral_truncation.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_sprintf.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_statistics.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_statistics_spectral.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_step_human_readable.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_step_in_units.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_sum.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_suppressed.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_time.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_times.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_to_double.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_to_integer.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_to_string.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_transient.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_transient_darray.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_trim.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint16.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint16_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint32.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint32_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint64.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint64_little_endian.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_uint8.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_unexpanded_descriptors.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_unpack_bufr_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_unsigned.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_unsigned_bits.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_validity_date.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_validity_time.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_values.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_variable.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_vector.h
cp grib_accessor_impl_TEMPLATE.h grib_accessor_impl_when.h
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_abstract_long_vector.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_abstract_vector.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_apply_operators.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_array.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_ascii.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_assert.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bit.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bits.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bits_per_value.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_blob.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_box.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_budgdate.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_data_array.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_data_element.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_elements_table.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_extract_area_subsets.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_extract_datetime_subsets.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_extract_subsets.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_group.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_simple_thinning.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufr_string_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bufrdc_expanded_descriptors.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_bytes.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_change_alternative_row_scanning.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_change_scanning_direction.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_check_internal_version.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_closest_date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_codeflag.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_codetable.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_codetable_title.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_codetable_units.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_concept.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_constant.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_count_file.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_count_missing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_count_total.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_2order_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_apply_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_apply_boustrophedonic.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_apply_boustrophedonic_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_apply_gdsnotpresent.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_ccsds_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_complex_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_dummy_field.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1complex_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1second_order_constant_width_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1second_order_general_extended_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1second_order_general_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1second_order_row_by_row_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1secondary_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1shsimple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g1simple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g22order_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2bifourier_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2complex_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2secondary_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2shsimple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2simple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_g2simple_packing_with_preprocessing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_jpeg2000_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_png_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_raw_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_run_length_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_secondary_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_sh_packed.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_sh_unpacked.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_shsimple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_data_simple_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_decimal_precision.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_dictionary.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_dirty.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_divdouble.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_double.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_element.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_evaluate.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_expanded_descriptors.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_forward.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_from_scale_factor_scaled_value.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1_half_byte_codeflag.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1_message_length.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1_section4_length.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1area.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1day_of_the_year_date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1end_of_interval_monthly.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1fcperiod.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1forecastmonth.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1monthlydate.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1number_of_coded_values_sh_complex.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1number_of_coded_values_sh_simple.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1step_range.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g1verificationdate.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2_aerosol.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2_chemical.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2_eps.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2_mars_labeling.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2bitmap_present.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2end_step.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2grid.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2latlon.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2level.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2lon.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_g2step_range.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_gaussian_grid_name.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_gds_is_present.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_gds_not_present_bitmap.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_getenv.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_global_gaussian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_group.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_gts_header.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_hash_array.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_headers_only.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_ibmfloat.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_ieeefloat.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_ifs_param.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int16.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int16_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int32.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int32_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int64.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int64_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_int8.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_iterator.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_julian_date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_julian_day.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_ksec1expver.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_label.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_laplacian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_latitudes.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_latlon_increment.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_latlonvalues.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_library_version.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_local_definition.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_long.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_long_vector.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_longitudes.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_lookup.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_mars_param.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_mars_step.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_md5.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_message.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_message_copy.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_missing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_nearest.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_non_alpha.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_number_of_coded_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_number_of_points.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_number_of_points_gaussian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_number_of_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_number_of_values_data_raw_packing.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_octahedral_gaussian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_octet_number.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_offset_file.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_offset_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_pack_bufr_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_pad.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_padding.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_padto.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_padtoeven.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_padtomultiple.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_position.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_raw.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_rdbtime_guess_date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_reference_value_error.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_round.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_scale.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_scale_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_second_order_bits_per_value.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_section.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_section_length.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_section_padding.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_section_pointer.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_select_step_template.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_sexagesimal2decimal.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_signed.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_signed_bits.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_simple_packing_error.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_size.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_smart_table.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_smart_table_column.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_spd.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_spectral_truncation.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_sprintf.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_statistics.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_statistics_spectral.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_step_human_readable.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_step_in_units.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_sum.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_suppressed.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_time.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_times.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_to_double.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_to_integer.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_to_string.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_transient.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_transient_darray.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_trim.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint16.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint16_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint32.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint32_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint64.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint64_little_endian.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_uint8.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_unexpanded_descriptors.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_unpack_bufr_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_unsigned.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_unsigned_bits.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_validity_date.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_validity_time.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_values.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_variable.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_vector.cpp
cp grib_accessor_impl_TEMPLATE.cpp grib_accessor_impl_when.cpp

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

View File

@ -0,0 +1,62 @@
#include "grib_accessor_impl_TEMPLATE.h"
namespace eccodes {
grib_accessor_impl_TEMPLATE::grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator) :
grib_accessor_impl_PARENT(p, ga_creator)
{
// No extra logic here - init() handles this
}
grib_accessor_impl_TEMPLATE::~grib_accessor_impl_TEMPLATE()
{}
void grib_accessor_impl_TEMPLATE::init(const long len, grib_arguments* params)
{
// Default is to call parent's init, then init self (i.e. like a constructor)
grib_accessor_impl_PARENT::init(len, params);
init_TEMPLATE(len, params);
}
void grib_accessor_impl_TEMPLATE::init_TEMPLATE(const long len, grib_arguments* params) {}
int grib_accessor_impl_TEMPLATE::pack_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::is_missing() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string_array(const char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_expression(grib_expression* e) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string_array(char** v, size_t* len) { return GRIB_NOT_IMPLEMENTED; }
size_t grib_accessor_impl_TEMPLATE::string_length() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_count() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::byte_offset() { return GRIB_NOT_IMPLEMENTED; }
long grib_accessor_impl_TEMPLATE::next_offset() { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::value_count(long* count) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::dump(grib_dumper* dumper) {}
void grib_accessor_impl_TEMPLATE::post_init() {}
int grib_accessor_impl_TEMPLATE::notify_change(grib_accessor* observed) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::update_size(size_t s) {}
size_t grib_accessor_impl_TEMPLATE::preferred_size(int from_handle) { return GRIB_NOT_IMPLEMENTED; }
void grib_accessor_impl_TEMPLATE::resize(size_t new_size) {}
int grib_accessor_impl_TEMPLATE::nearest_smaller_value (double val, double* nearest) { return GRIB_NOT_IMPLEMENTED; }
grib_accessor* grib_accessor_impl_TEMPLATE::next_accessor(int mod) { return NULL; }
int grib_accessor_impl_TEMPLATE::compare(grib_accessor_impl* ga_impl) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element(size_t i, double* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element(size_t i, float* val) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double_subarray(double* val, size_t start, size_t len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::clear() { return GRIB_NOT_IMPLEMENTED; }
grib_accessor_impl* grib_accessor_impl_TEMPLATE::make_clone(grib_section* s, int* err) { return NULL; }
int grib_accessor_impl_TEMPLATE::pack_bytes(pack_buffer& bytes, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_double(pack_buffer& doubles, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_float(pack_buffer& floats, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_long(pack_buffer& longs, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::pack_string(pack_buffer& chars, std::size_t* packed_len) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_bytes(byte_view bytes) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_double(double_view doubles) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_float(float_view floats) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_long(long_view longs) { return GRIB_NOT_IMPLEMENTED; }
int grib_accessor_impl_TEMPLATE::unpack_string(char_view chars) { return GRIB_NOT_IMPLEMENTED; }
}

View File

@ -0,0 +1,72 @@
#ifndef _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#define _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_
#include "grib_accessor_impl_PARENT.h"
namespace eccodes {
class grib_accessor_impl_TEMPLATE : public grib_accessor_impl_PARENT {
protected:
// grib_accessor_TEMPLATE data
//
// WARNING: Whilst converting from C to C++ the code supports casting
// this class to the equivalent grib_accessor_TEMPLATE C struct
//
// This is only possible if the member variables MATCH EXACTLY!
//
// DO NOT ADD any extra member variables to this class otherwise
// this functionality will break!
//
public:
grib_accessor_impl_TEMPLATE(grib_section* p, grib_action* ga_creator);
~grib_accessor_impl_TEMPLATE();
void init(const long len, grib_arguments* params) override;
int native_type() override { return SET_TYPE_OR_DELETE_THIS_OVERLOAD; }
int pack_missing() override;
int is_missing() override;
int pack_string_array(const char** v, size_t* len) override;
int pack_expression(grib_expression* e) override;
int unpack_string_array(char** v, size_t* len) override;
size_t string_length() override;
long byte_count() override;
long byte_offset() override;
long next_offset() override;
int value_count(long* count) override;
void dump(grib_dumper* dumper) override;
void post_init() override;
int notify_change(grib_accessor* observed) override;
void update_size(size_t s) override;
size_t preferred_size(int from_handle) override;
void resize(size_t new_size) override;
int nearest_smaller_value (double val, double* nearest) override;
grib_accessor* next_accessor(int mod) override;
int compare(grib_accessor_impl* ga_impl) override;
int unpack_double_element(size_t i, double* val) override;
int unpack_float_element(size_t i, float* val) override;
int unpack_double_element_set(const size_t* index_array, size_t len, double* val_array) override;
int unpack_float_element_set(const size_t* index_array, size_t len, float* val_array) override;
int unpack_double_subarray(double* val, size_t start, size_t len) override;
int clear() override;
grib_accessor_impl* make_clone(grib_section* s, int* err) override;
protected:
virtual void init_TEMPLATE(const long len, grib_arguments* params);
int pack_bytes(pack_buffer& bytes, std::size_t* packed_len) override;
int pack_double(pack_buffer& doubles, std::size_t* packed_len) override;
int pack_float(pack_buffer& floats, std::size_t* packed_len) override;
int pack_long(pack_buffer& longs, std::size_t* packed_len) override;
int pack_string(pack_buffer& chars, std::size_t* packed_len) override;
int unpack_bytes(byte_view bytes) override;
int unpack_double(double_view doubles) override;
int unpack_float(float_view floats) override;
int unpack_long(long_view longs) override;
int unpack_string(char_view chars) override;
private:
void init_TEMPLATE(const long len, grib_arguments* params);
};
}
#endif // _GRIB_ACCESSOR_IMPL_TEMPLATE_H_2023MMDD_

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