22 #ifndef WREPORT_BULLETIN_INTERNALS_H
23 #define WREPORT_BULLETIN_INTERNALS_H
48 std::vector<unsigned>
refs;
56 std::vector<unsigned>::const_reverse_iterator
iter;
91 void init(
const Var& bitmap,
const Subset& subset,
unsigned anchor);
Bitmap bitmap
Bitmap iteration.
Definition: internals.h:119
virtual void b_variable(Varcode code)
opcode::Visitor methods implementation
Var & get_var()
Get the next variable.
virtual const Var & do_semantic_var(Varinfo info)=0
Request processing, according to info, of a data variabile that is significant for controlling the en...
std::vector< unsigned > refs
Arrays of variable indices corresponding to positions in the bitmap where data is present...
Definition: internals.h:48
virtual void c_increase_scale_ref_width(Varcode code, int change)
opcode::Visitor methods implementation
unsigned current_var
Index of the next variable to be visited.
Definition: internals.h:259
virtual void c_substituted_value_bitmap(Varcode code)
opcode::Visitor methods implementation
BaseVisitor(Bulletin &bulletin)
Create visitor for the given bulletin.
int c_width_change
Current value of width change from C modifier.
Definition: internals.h:125
unsigned next()
Return the next variable offset for which the bitmap reports that data is present.
virtual void r_replication(Varcode code, Varcode delayed_code, const Opcodes &ops)
opcode::Visitor methods implementation
Holds a wreport variable.
Definition: var.h:50
virtual void c_substituted_value(Varcode code)
opcode::Visitor methods implementation
virtual void c_local_descriptor(Varcode code, Varcode desc_code, unsigned nbits)
opcode::Visitor methods implementation
unsigned current_subset_no
Index of the subset being visited.
Definition: internals.h:257
virtual void c_change_data_scale(Varcode code, int change)
opcode::Visitor methods implementation
Common bulletin::Visitor base for visitors that do not modify the bulletin.
Definition: internals.h:278
virtual void do_start_subset(unsigned subset_no, const Subset ¤t_subset)
Notify the start of a subset.
virtual void do_start_subset(unsigned subset_no, const Subset ¤t_subset)
Notify the start of a subset.
unsigned current_subset_no
Index of the subset being visited.
Definition: internals.h:283
virtual void do_start_subset(unsigned subset_no, const Subset ¤t_subset)
Notify the start of a subset.
Associate a Data Present Bitmap to decoded variables in a subset.
Definition: internals.h:39
Bulletin & bulletin
Bulletin being visited.
Definition: internals.h:255
virtual void c_change_data_width(Varcode code, int change)
opcode::Visitor methods implementation
bool eob() const
True if there is no bitmap or if the bitmap has been iterated until the end.
virtual const Var & do_bitmap(Varcode code, Varcode rep_code, Varcode delayed_code, const Opcodes &ops)
Request processing of a data present bitmap.
Storage for the decoded data of a BUFR or CREX message.
Definition: bulletin.h:63
Holds a variable information table.
Definition: vartable.h:84
virtual void c_char_data(Varcode code)
opcode::Visitor methods implementation
Visitor-style interface for scanning the contents of a data descriptor section.
Definition: opcode.h:167
const Var & get_var()
Get the next variable.
int c_scale_change
Current value of scale change from C modifier.
Definition: internals.h:122
void reset()
Resets the object.
int c04_meaning
Meaning of C04yyy field according to code table B31021.
Definition: internals.h:143
int c_scale_ref_width_increase
Increase of scale, reference value and data width.
Definition: internals.h:134
const Subset * current_subset
Current subset (used to refer to past variables)
Definition: internals.h:116
Common bulletin::Visitor base for visitors that modify the bulletin.
Definition: internals.h:252
virtual void c_modifier(Varcode code)
opcode::Visitor methods implementation
virtual const Var & do_bitmap(Varcode code, Varcode rep_code, Varcode delayed_code, const Opcodes &ops)
Request processing of a data present bitmap.
Varcode want_bitmap
Nonzero if a Data Present Bitmap is expected.
Definition: internals.h:146
Varinfo get_varinfo(Varcode code)
Return the Varinfo describing the variable code, possibly altered taking into account current C modif...
Sequence of opcodes, as a slice of a Varcode vector.
Definition: opcode.h:50
virtual void c_quality_information_bitmap(Varcode code)
opcode::Visitor methods implementation
const Bulletin & bulletin
Bulletin being visited.
Definition: internals.h:281
short unsigned int Varcode
Holds the WMO variable code of a variable.
Definition: varinfo.h:78
virtual void c_char_data_override(Varcode code, unsigned new_length)
opcode::Visitor methods implementation
std::vector< unsigned >::const_reverse_iterator iter
Iterator over refs.
Definition: internals.h:56
virtual void do_start_repetition(unsigned idx)
Notify the beginning of one instance of an R group.
unsigned data_pos
Number of data items processed so far.
Definition: internals.h:154
virtual void do_char_data(Varcode code)=0
Request processing of C05yyy character data.
Main namespace.
Definition: buffers.h:30
const Var * bitmap
Bitmap being iterated.
Definition: internals.h:42
Implement fast access to information about WMO variables.
Smart pointer to handle/use varinfos.
Definition: varinfo.h:336
virtual const Var & do_bitmap(Varcode code, Varcode rep_code, Varcode delayed_code, const Opcodes &ops)=0
Request processing of a data present bitmap.
void init(const Var &bitmap, const Subset &subset, unsigned anchor)
Initialise the bitmap handler.
ConstBaseVisitor(const Bulletin &bulletin)
Create visitor for the given bulletin.
int c04_bits
Number of extra bits inserted by the current C04yyy modifier (0 for no C04yyy operator in use) ...
Definition: internals.h:140
virtual void do_associated_field(unsigned bit_count, unsigned significance)=0
Request processing of bit_count bits of associated field with the given significance.
int c_string_len_override
Current value of string length override from C08 modifiers (0 for no override)
Definition: internals.h:131
const Vartable * btable
B table used to resolve variable information.
Definition: internals.h:113
virtual void do_attr(Varinfo info, unsigned var_pos, Varcode attr_code)=0
Request processing, according to info, of the attribute attr_code of the variable in position var_pos...
Represent a BUFR/CREX data subset as a list of decoded variables.
Definition: subset.h:40
Implementation of opcode chains, that are used to drive the encoding and decoding process...
virtual void do_var(Varinfo info)=0
Request processing, according to info, of a data variable.
Abstract interface for classes that can be used as targets for the Bulletin Data Descriptor Section i...
Definition: internals.h:110
virtual void c_associated_field(Varcode code, Varcode sig_code, unsigned nbits)
opcode::Visitor methods implementation
unsigned old_anchor
Anchor point of the first bitmap found since the last reset().
Definition: internals.h:69
unsigned current_var
Index of the next variable to be visited.
Definition: internals.h:285