libwreport  2.4
Public Member Functions | Data Fields
wreport::bulletin::Bitmap Struct Reference

Associate a Data Present Bitmap to decoded variables in a subset. More...

#include <internals.h>

Public Member Functions

void reset ()
 Resets the object.
void init (const Var &bitmap, const Subset &subset, unsigned anchor)
 Initialise the bitmap handler.
bool eob () const
 True if there is no bitmap or if the bitmap has been iterated until the end.
unsigned next ()
 Return the next variable offset for which the bitmap reports that data is present.

Data Fields

const Varbitmap
 Bitmap being iterated.
std::vector< unsigned > refs
 Arrays of variable indices corresponding to positions in the bitmap where data is present.
std::vector< unsigned >
::const_reverse_iterator 
iter
 Iterator over refs.
unsigned old_anchor
 Anchor point of the first bitmap found since the last reset().

Detailed Description

Associate a Data Present Bitmap to decoded variables in a subset.

Member Function Documentation

void wreport::bulletin::Bitmap::init ( const Var bitmap,
const Subset subset,
unsigned  anchor 
)

Initialise the bitmap handler.

Parameters
bitmapThe bitmap
subsetThe subset to which the bitmap refers
anchorThe index to the first element after the end of the bitmap (usually the C operator that defines or uses the bitmap)
void wreport::bulletin::Bitmap::reset ( )

Resets the object.

To be called at start of decoding, to discard all previous leftover context, if any.

Field Documentation

std::vector<unsigned>::const_reverse_iterator wreport::bulletin::Bitmap::iter

Iterator over refs.

Since refs is filled while going backwards over the subset, iteration is done via a reverse_iterator.

unsigned wreport::bulletin::Bitmap::old_anchor

Anchor point of the first bitmap found since the last reset().

From the specs it looks like bitmaps refer to all data that precedes the C operator that defines or uses them, but from the data samples that we have it look like when multiple bitmaps are present, they always refer to the same set of variables.

For this reason we remember the first anchor point that we see and always refer the other bitmaps that we see to it.


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