libwreport 3.38
internals.h
1#ifndef WREPORT_BULLETIN_INTERNALS_H
2#define WREPORT_BULLETIN_INTERNALS_H
3
4#include <wreport/varinfo.h>
5#include <wreport/opcodes.h>
6#include <wreport/bulletin/interpreter.h>
7#include <vector>
8#include <memory>
9#include <cmath>
10
11namespace wreport {
12class Var;
13class Subset;
14class Bulletin;
15
16namespace bulletin {
17
23{
27 unsigned current_var = 0;
28
29 UncompressedEncoder(const Bulletin& bulletin, unsigned subset_no);
30 virtual ~UncompressedEncoder();
31
33 const Var& peek_var();
34
36 const Var& get_var();
37
39 const Var& get_var(unsigned pos) const;
40
41 void define_bitmap(unsigned bitmap_size) override;
42
43 void define_variable(Varinfo info) override;
48
58 virtual void encode_var(Varinfo info, const Var& var);
59
67 virtual void encode_associated_field(const Var& var);
68};
69
70}
71}
72#endif
Storage for the decoded data of a BUFR or CREX message.
Definition bulletin.h:30
Represent a BUFR/CREX data subset as a list of decoded variables.
Definition subset.h:13
A physical variable.
Definition var.h:25
String functions.
Definition benchmark.h:13
Information about a variable.
Definition varinfo.h:139
Interpreter for data descriptor sections.
Definition interpreter.h:26
Base Interpreter specialisation for message encoders that works on a subset at a time.
Definition internals.h:23
unsigned current_var
Index of the next variable to be visited.
Definition internals.h:27
const Var & peek_var()
Get the next variable, without incrementing current_var.
const Var & get_var()
Get the next variable, incrementing current_var by 1.
const Subset & current_subset
Current subset (used to refer to past variables)
Definition internals.h:25
virtual void encode_var(Varinfo info, const Var &var)
Encode a variable.
const Var & get_var(unsigned pos) const
Get the variable at the given position.
void define_variable_with_associated_field(Varinfo info) override
Request processing, according to info, of a data variable.
unsigned define_associated_field_significance(Varinfo info) override
Request processing of an associated field significance variable (B31021).
unsigned define_bitmap_delayed_replication_factor(Varinfo info) override
Request processing of a delayed replication factor variable used to encode the size of a bitmap.
virtual void encode_associated_field(const Var &var)
Encode an attribute for an associated field.
unsigned define_delayed_replication_factor(Varinfo info) override
Request processing, according to info, of a data variabile that is significant for controlling the en...
void define_bitmap(unsigned bitmap_size) override
Request processing of a data present bitmap.
void define_variable(Varinfo info) override
Request processing, according to info, of a data variable.
Implement fast access to information about WMO variables.