libwreport 3.38
dds-printer.h
1#ifndef WREPORT_BULLETIN_DDS_PRINTER_H
2#define WREPORT_BULLETIN_DDS_PRINTER_H
3
4#include <wreport/bulletin.h>
5#include <wreport/bulletin/internals.h>
6#include <vector>
7#include <cstdio>
8
9namespace wreport {
10namespace bulletin {
11
16{
17 std::vector<Varcode> stack;
18 FILE* out;
19 unsigned subset_no;
20
21 void print_context(Varinfo info, unsigned var_pos);
22 void print_context(Varcode code, unsigned var_pos);
23 void print_attr(Varinfo info, unsigned var_pos);
24
25public:
34 DDSPrinter(const Bulletin& b, FILE* out, unsigned subset_idx);
35 virtual ~DDSPrinter();
36
37 void define_bitmap(unsigned bitmap_size) override;
38 void define_substituted_value(unsigned pos) override;
39 void define_attribute(Varinfo info, unsigned pos) override;
41 void encode_var(Varinfo info, const Var& var) override;
42 void encode_associated_field(const Var& var) override;
43
44 void r_replication(Varcode code, Varcode delayed_code, const Opcodes& ops) override;
45 void run_d_expansion(Varcode code) override;
46};
47
48}
49}
50#endif
Storage for the decoded data of a BUFR or CREX message.
Definition: bulletin.h:30
A physical variable.
Definition: var.h:25
Interpreter that prints the bulletin contents and its structure.
Definition: dds-printer.h:16
void define_raw_character_data(Varcode code) override
Request processing of C05yyy raw character data.
DDSPrinter(const Bulletin &b, FILE *out, unsigned subset_idx)
Create a new DDS printer.
void encode_associated_field(const Var &var) override
Encode an attribute for an associated field.
void define_attribute(Varinfo info, unsigned pos) override
Request processing of an attribute encoded with info, related to the variable as position pos in the ...
void r_replication(Varcode code, Varcode delayed_code, const Opcodes &ops) override
Handle a replicated section.
void define_bitmap(unsigned bitmap_size) override
Request processing of a data present bitmap.
void encode_var(Varinfo info, const Var &var) override
Encode a variable.
void define_substituted_value(unsigned pos) override
Request processing of a substituted value corresponding to position pos in the list or previous varia...
void run_d_expansion(Varcode code) override
Executes the expansion of code, which has been put on top of the opcode stack.
String functions.
Definition: benchmark.h:13
uint16_t Varcode
Holds the WMO variable code of a variable.
Definition: fwd.h:12
Sequence of opcodes, as a slice of a Varcode vector.
Definition: opcodes.h:20
Information about a variable.
Definition: varinfo.h:139
Base Interpreter specialisation for message encoders that works on a subset at a time.
Definition: internals.h:23