1#ifndef WREPORT_BUFR_INPUT_H
2#define WREPORT_BUFR_INPUT_H
5#include <wreport/var.h>
6#include <wreport/bulletin.h>
22 unsigned subset_count;
27 for (
unsigned i = 0; i < subset_count; ++i)
28 out.
subsets[i].store_variable_undef(info);
30 void add_same(
const Var& var)
32 for (
unsigned i = 0; i < subset_count; ++i)
35 void add_var(
unsigned subset,
Var&& var)
37 out.
subsets[subset].store_variable(var);
131 return (
unsigned)
data[pos];
135 inline unsigned read_byte(
unsigned section,
unsigned pos)
const
137 return (
unsigned)
data[
sec[section] + pos];
144 for (
unsigned i = 0; i < byte_len; ++i)
147 res |=
data[pos + i];
156 inline unsigned read_number(
unsigned section,
unsigned pos,
unsigned byte_len)
const
170 parse_error(
"end of buffer while looking for %d bits of bit-packed data", n);
176 for (
unsigned i = 0; i < n; i++)
199 parse_error(
"end of buffer while looking for %d bits of bit-packed data", n);
201 for (
unsigned i = 0; i < n; i++)
351 bool decode_string(
unsigned bit_len,
char* str,
size_t& len);
364 void decode_string(
Var& dest);
377 void decode_string(
Var& dest,
unsigned subsets);
383 void decode_string(
Varinfo info,
unsigned subsets, std::function<
void(
unsigned,
Var&&)> dest);
Storage for the decoded data of a BUFR or CREX message.
Definition bulletin.h:30
std::vector< Subset > subsets
Decoded variables.
Definition bulletin.h:122
A physical variable.
Definition var.h:25
#define WREPORT_THROWF_ATTRS(a, b)
Tell the compiler that a function always throws and expects printf-style arguments.
Definition error.h:56
String functions.
Definition benchmark.h:13
Information about a variable.
Definition varinfo.h:139
Definition associated_fields.h:13