libwreport  3.23
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 
11 namespace wreport {
12 struct Var;
13 struct Subset;
14 struct Bulletin;
15 
16 namespace 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;
45  unsigned define_delayed_replication_factor(Varinfo info) override;
46  unsigned define_associated_field_significance(Varinfo info) override;
47  unsigned define_bitmap_delayed_replication_factor(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
void define_bitmap(unsigned bitmap_size) override
Request processing of a data present bitmap.
virtual void encode_var(Varinfo info, const Var &var)
Encode a variable.
A physical variable.
Definition: var.h:24
unsigned current_var
Index of the next variable to be visited.
Definition: internals.h:27
virtual void encode_associated_field(const Var &var)
Encode an attribute for an associated field.
Storage for the decoded data of a BUFR or CREX message.
Definition: bulletin.h:30
Base Interpreter specialisation for message encoders that works on a subset at a time.
Definition: internals.h:22
const Subset & current_subset
Current subset (used to refer to past variables)
Definition: internals.h:25
Information about a variable.
Definition: varinfo.h:136
const Var & peek_var()
Get the next variable, without incrementing current_var.
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_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...
String functions.
Definition: benchmark.h:13
Interpreter for data descriptor sections.
Definition: interpreter.h:25
Implement fast access to information about WMO variables.
void define_variable(Varinfo info) override
Request processing, according to info, of a data variable.
Represent a BUFR/CREX data subset as a list of decoded variables.
Definition: subset.h:13
const Var & get_var()
Get the next variable, incrementing current_var by 1.