eccodes/src/accessor.class

104 lines
5.2 KiB
Plaintext

static grib_section* sub_section(grib_accessor* a);
static int get_native_type(grib_accessor*);
static int pack_missing(grib_accessor*);
static int is_missing(grib_accessor*);
static int pack_bytes(grib_accessor*, const unsigned char*, size_t* len);
static int pack_double(grib_accessor*, const double* val, size_t* len);
static int pack_float(grib_accessor*, const float* val, size_t* len);
static int pack_long(grib_accessor*, const long* val, size_t* len);
static int pack_string(grib_accessor*, const char*, size_t* len);
static int pack_string_array(grib_accessor*, const char**, size_t* len);
static int pack_expression(grib_accessor*, grib_expression*);
static int unpack_bytes(grib_accessor*, unsigned char*, size_t* len);
static int unpack_double(grib_accessor*, double* val, size_t* len);
static int unpack_float(grib_accessor*, float* val, size_t* len);
static int unpack_long(grib_accessor*, long* val, size_t* len);
static int unpack_string(grib_accessor*, char*, size_t* len);
static int unpack_string_array(grib_accessor*, char**, size_t* len);
static size_t string_length(grib_accessor*);
static long byte_count(grib_accessor*);
static long byte_offset(grib_accessor*);
static long next_offset(grib_accessor*);
static int value_count(grib_accessor*, long*);
static void destroy(grib_context*, grib_accessor*);
static void dump(grib_accessor*, grib_dumper*);
static void init(grib_accessor*, const long, grib_arguments*);
static void post_init(grib_accessor*);
static int notify_change(grib_accessor*, grib_accessor*);
static void update_size(grib_accessor*, size_t);
static size_t preferred_size(grib_accessor*, int);
static void resize(grib_accessor*,size_t);
static int nearest_smaller_value (grib_accessor*, double, double*);
static grib_accessor* next(grib_accessor*, int);
static int compare(grib_accessor*, grib_accessor*);
static int unpack_double_element(grib_accessor*, size_t i, double* val);
static int unpack_float_element(grib_accessor*, size_t i, float* val);
static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array);
static int unpack_float_element_set(grib_accessor*, const size_t* index_array, size_t len, float* val_array);
static int unpack_double_subarray(grib_accessor*, double* val, size_t start, size_t len);
static int clear(grib_accessor*);
static grib_accessor* make_clone(grib_accessor*, grib_section*, int*);
typedef struct grib_accessor_NAME
{
grib_accessor att;
MEMBERS
} grib_accessor_NAME;
extern grib_accessor_class* SUPER;
static grib_accessor_class _grib_accessor_class_NAME = {
&SUPER, /* super */
"NAME", /* name */
sizeof(grib_accessor_NAME), /* size */
0, /* inited */
0, /* init_class */
&init, /* init */
&post_init, /* post_init */
&destroy, /* destroy */
&dump, /* dump */
&next_offset, /* next_offset */
&string_length, /* get length of string */
&value_count, /* get number of values */
&byte_count, /* get number of bytes */
&byte_offset, /* get offset to bytes */
&get_native_type, /* get native type */
&sub_section, /* get sub_section */
&pack_missing, /* pack_missing */
&is_missing, /* is_missing */
&pack_long, /* pack_long */
&unpack_long, /* unpack_long */
&pack_double, /* pack_double */
&pack_float, /* pack_float */
&unpack_double, /* unpack_double */
&unpack_float, /* unpack_float */
&pack_string, /* pack_string */
&unpack_string, /* unpack_string */
&pack_string_array, /* pack_string_array */
&unpack_string_array, /* unpack_string_array */
&pack_bytes, /* pack_bytes */
&unpack_bytes, /* unpack_bytes */
&pack_expression, /* pack_expression */
&notify_change, /* notify_change */
&update_size, /* update_size */
&preferred_size, /* preferred_size */
&resize, /* resize */
&nearest_smaller_value, /* nearest_smaller_value */
&next, /* next accessor */
&compare, /* compare vs. another accessor */
&unpack_double_element, /* unpack only ith value (double) */
&unpack_float_element, /* unpack only ith value (float) */
&unpack_double_element_set, /* unpack a given set of elements (double) */
&unpack_float_element_set, /* unpack a given set of elements (float) */
&unpack_double_subarray, /* unpack a subarray */
&clear, /* clear */
&make_clone, /* clone accessor */
};
grib_accessor_class* grib_accessor_class_NAME = &_grib_accessor_class_NAME;
ADD_TO_FILE grib_accessor_class.h extern grib_accessor_class* grib_accessor_class_NAME;
ADD_TO_FILE grib_accessor_factory.h { "NAME", &grib_accessor_class_NAME, },
ADD_TO_FILE grib_accessor_factory_hash_list NAME, &grib_accessor_class_NAME