wreport::bulletin::UncompressedEncoder Struct Reference

Base Interpreter specialisation for message encoders that works on a subset at a time. More...

`#include <internals.h>`

Inheritance diagram for wreport::bulletin::UncompressedEncoder:

## Public Member Functions

| UncompressedEncoder (const Bulletin &bulletin, unsigned subset_no)
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 Var & | get_var (unsigned pos) const
| Get the variable at the given position.
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.
void | define_variable_with_associated_field (Varinfo info) override
| Request processing, according to info, of a data variable.
unsigned | define_delayed_replication_factor (Varinfo info) override
| Request processing, according to info, of a data variabile that is significant for controlling the encoding process.
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_var (Varinfo info, const Var &var)
| Encode a variable.
virtual void | encode_associated_field (const Var &var)
| Encode an attribute for an associated field.
Public Member Functions inherited from wreport::bulletin::Interpreter
| Interpreter (const Tables &tables, const Opcodes &opcodes)
| Interpreter (const Interpreter &)=delete
Interpreter & | operator= (const Interpreter &)=delete
void | run ()
| Run the interpreter.
virtual void | b_variable (Varcode code)
| Notify of a B variable entry.
virtual void | c_modifier (Varcode code, Opcodes &next)
| Notify of a C modifier.
virtual void | r_replication (Varcode code, Varcode delayed_code, const Opcodes &ops)
| Handle a replicated section.
virtual void | r_bitmap (Varcode code, Varcode delayed_code, const Opcodes &ops)
| Handle a replicated section which defines a bitmap.
virtual void | run_r_repetition (unsigned cur, unsigned total)
| Executes a repetition of the opcodes on top of the stack.
virtual void | run_d_expansion (Varcode code)
| Executes the expansion of code, which has been put on top of the opcode stack.
virtual void | define_substituted_value (unsigned pos)
| Request processing of a substituted value corresponding to position pos in the list or previous variables.
virtual void | define_attribute (Varinfo info, unsigned pos)
| Request processing of an attribute encoded with info, related to the variable as position pos in the list of previous variables.
virtual void | define_raw_character_data (Varcode code)
| Request processing of C05yyy raw character data.
virtual void | define_c03_refval_override (Varcode code)
| Request processing of a new value for the reference value of the given B code.

## Data Fields

const Subset & | current_subset
| Current subset (used to refer to past variables).
unsigned | current_var = 0
| Index of the next variable to be visited.
Data Fields inherited from wreport::bulletin::Interpreter
const Tables & | tables
std::stack< Opcodes > | opcode_stack
Bitmaps | bitmaps
| Bitmap iteration.
AssociatedField | associated_field
| Current associated field state.
int | c_scale_change = 0
| Current value of scale change from C modifier.
int | c_width_change = 0
| Current value of width change from C modifier.
int | c_scale_ref_width_increase = 0
| Increase of scale, reference value and data width.
int | c_string_len_override = 0
| Current value of string length override from C08 modifiers (0 for no override).
std::map< wreport::Varcode, uint32_t > | c03_refval_overrides
| Current reference value overrides.
unsigned | c03_refval_override_bits = 0
| Set to the number of reference value override bits while reading the override values.

## Additional Inherited Members

Static Public Member Functions inherited from wreport::bulletin::Interpreter
static void | print_c_modifier (FILE *out, Varcode code, Opcodes &nex)
| Print a description of this C modifier.
Protected Member Functions inherited from wreport::bulletin::Interpreter
Varinfo | get_varinfo (Varcode code)
| Return a Varinfo for the given Varcode, applying all relevant C modifications that are currently active.

## Detailed Description

Base Interpreter specialisation for message encoders that works on a subset at a time.

## Member Function Documentation

## define_associated_field_significance()

unsigned wreport::bulletin::UncompressedEncoder::define_associated_field_significance | ( | Varinfo | info | ) |

override virtual

Request processing of an associated field significance variable (B31021).

Returns
  the associated field significance value

Reimplemented from wreport::bulletin::Interpreter.

## define_bitmap()

void wreport::bulletin::UncompressedEncoder::define_bitmap | ( | unsigned | bitmap_size | ) |

override virtual

Request processing of a data present bitmap.

Parameters

  code | The C modifier code that defines the bitmap
  rep_code | The R replicator that defines the bitmap
  delayed_code | The B delayed replicator that defines the bitmap length (it is 0 if the length is encoded in the YYY part of rep_code
  ops | The replicated opcodes that define the bitmap

Returns
  The bitmap that has been processed.

Reimplemented from wreport::bulletin::Interpreter.

## define_bitmap_delayed_replication_factor()

unsigned wreport::bulletin::UncompressedEncoder::define_bitmap_delayed_replication_factor | ( | Varinfo | info | ) |

override virtual

Request processing of a delayed replication factor variable used to encode the size of a bitmap.

Returns
  the repetition count

Reimplemented from wreport::bulletin::Interpreter.

## define_delayed_replication_factor()

unsigned wreport::bulletin::UncompressedEncoder::define_delayed_replication_factor | ( | Varinfo | info | ) |

override virtual

Request processing, according to info, of a data variabile that is significant for controlling the encoding process.

This means that the variable has always the same value on all datasets (in case of compressed datasets), and that the interpreter needs to know its value.

Returns
  the value of the variable, or 0xffffffff if it is unset

Reimplemented from wreport::bulletin::Interpreter.

## define_variable()

void wreport::bulletin::UncompressedEncoder::define_variable | ( | Varinfo | info | ) |

override virtual

Request processing, according to info, of a data variable.

Reimplemented from wreport::bulletin::Interpreter.

## define_variable_with_associated_field()

void wreport::bulletin::UncompressedEncoder::define_variable_with_associated_field | ( | Varinfo | info | ) |

override virtual

Request processing, according to info, of a data variable.

Reimplemented from wreport::bulletin::Interpreter.

## encode_associated_field()

virtual void wreport::bulletin::UncompressedEncoder::encode_associated_field | ( | const Var & | var | ) |

virtual

Encode an attribute for an associated field.

Var is the variable that the associated field refers to. The actual value of the associated field can be looked up using the functions in this->associated_field.

Reimplemented in wreport::bulletin::DDSPrinter.

## encode_var()

virtual void wreport::bulletin::UncompressedEncoder::encode_var | ( | Varinfo | info,
|  | const Var & | var )

virtual

Encode a variable.

By default, this raises error_unimplemented. For decoders that encode normal variables, delayed replication factors, bitmap delayed replication factors, and associated field significances in the same way, can just override this method and use the default define_* implementations.

Reimplemented in wreport::bulletin::DDSPrinter, and wreport::bulletin::DDSValidator.

The documentation for this struct was generated from the following file:

- internals.h