dds-printer.h
#ifndef WREPORT_BULLETIN_DDS_PRINTER_H
#define WREPORT_BULLETIN_DDS_PRINTER_H
#include <wreport/bulletin.h>
#include <wreport/bulletin/internals.h>
#include <vector>
#include <cstdio>
namespace wreport {
namespace bulletin {
class DDSPrinter : public UncompressedEncoder
{
std::vector<Varcode> stack;
FILE* out;
unsigned subset_no;
void print_context(Varinfo info, unsigned var_pos);
void print_context(Varcode code, unsigned var_pos);
void print_attr(Varinfo info, unsigned var_pos);
public:
DDSPrinter(const Bulletin& b, FILE* out, unsigned subset_idx);
virtual ~DDSPrinter();
void define_bitmap(unsigned bitmap_size) override;
void define_substituted_value(unsigned pos) override;
void define_attribute(Varinfo info, unsigned pos) override;
void define_raw_character_data(Varcode code) override;
void encode_var(Varinfo info, const Var& var) override;
void encode_associated_field(const Var& var) override;
void r_replication(Varcode code, Varcode delayed_code, const Opcodes& ops) override;
void run_d_expansion(Varcode code) override;
};
}
}
#endif
wreport::Bulletin
Storage for the decoded data of a BUFR or CREX message.
Definition bulletin.h:30
wreport::Var
A physical variable.
Definition var.h:25
wreport::bulletin::DDSPrinter::define_raw_character_data
void define_raw_character_data(Varcode code) override
Request processing of C05yyy raw character data.
wreport::bulletin::DDSPrinter::DDSPrinter
DDSPrinter(const Bulletin &b, FILE *out, unsigned subset_idx)
Create a new DDS printer.
wreport::bulletin::DDSPrinter::encode_associated_field
void encode_associated_field(const Var &var) override
Encode an attribute for an associated field.
wreport::bulletin::DDSPrinter::define_attribute
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 ...
wreport::bulletin::DDSPrinter::r_replication
void r_replication(Varcode code, Varcode delayed_code, const Opcodes &ops) override
Handle a replicated section.
wreport::bulletin::DDSPrinter::define_bitmap
void define_bitmap(unsigned bitmap_size) override
Request processing of a data present bitmap.
wreport::bulletin::DDSPrinter::encode_var
void encode_var(Varinfo info, const Var &var) override
Encode a variable.
wreport::bulletin::DDSPrinter::define_substituted_value
void define_substituted_value(unsigned pos) override
Request processing of a substituted value corresponding to position pos in the list or previous varia...
wreport::bulletin::DDSPrinter::run_d_expansion
void run_d_expansion(Varcode code) override
Executes the expansion of code, which has been put on top of the opcode stack.
wreport::bulletin
The bulletin namespace contains bulletin implementation details, internals and utility functions.
Definition input.h:13
wreport
String functions.
Definition benchmark.h:13
wreport::Varinfo
const _Varinfo * Varinfo
Varinfo reference.
Definition fwd.h:11
wreport::Varcode
uint16_t Varcode
Holds the WMO variable code of a variable.
Definition fwd.h:12
wreport::Opcodes
Sequence of opcodes, as a slice of a Varcode vector.
Definition opcodes.h:20