libwreport 2.1
Public Member Functions | Data Fields | Protected Member Functions
wreport::Subset Struct Reference

Represent a BUFR/CREX data subset as a list of decoded variables. More...

#include <subset.h>

Inherits std::vector< T >.

Public Member Functions

 Subset (const Vartable *btable)
 Create a new BUFR/CREX subset.
void store_variable (const Var &var)
 Store a decoded variable in the message, to be encoded later.
void store_variable (Varcode code, const Var &var)
 Store a new variable in the message, copying it from an already existing variable.
void store_variable_i (Varcode code, int val)
 Store a new variable in the message, providing its value as an int.
void store_variable_d (Varcode code, double val)
 Store a new variable in the message, providing its value as a double.
void store_variable_c (Varcode code, const char *val)
 Store a new variable in the message, providing its value as a string.
void store_variable_undef (Varcode code)
 Store a new, undefined variable in the message.
int append_dpb (Varcode ccode, unsigned size, Varcode attr)
 Compute and append a data present bitmap.
void append_fixed_dpb (Varcode ccode, int size)
 Append a fixed-size data present bitmap with all zeros.
void print (FILE *out) const
 Dump the contents of this subset.
unsigned diff (const Subset &s2) const
 Compute the differences between two wreport subsets.

Data Fields

const Vartablebtable
 dba_vartable used to lookup B table codes

Protected Member Functions

void append_c_with_dpb (Varcode ccode, int count, const char *bitmap)
 Append a C operator with a count long bitmap.

Detailed Description

Represent a BUFR/CREX data subset as a list of decoded variables.


Constructor & Destructor Documentation

wreport::Subset::Subset ( const Vartable btable)

Create a new BUFR/CREX subset.

Parameters:
btableReference to the B table to use to create variables.

Member Function Documentation

int wreport::Subset::append_dpb ( Varcode  ccode,
unsigned  size,
Varcode  attr 
)

Compute and append a data present bitmap.

Parameters:
ccodeThe C code that uses this bitmap
sizeThe size of the bitmap
attrThe code of the attribute that the bitmap will represent. See vartable.h
Returns:
The number of attributes that will be encoded (for which the dpb has '+')
void wreport::Subset::append_fixed_dpb ( Varcode  ccode,
int  size 
)

Append a fixed-size data present bitmap with all zeros.

Parameters:
ccodeThe C code that uses this bitmap
sizeThe size of the bitmap
unsigned wreport::Subset::diff ( const Subset s2) const

Compute the differences between two wreport subsets.

Details of the differences found will be formatted using the notes system (

See also:
notes.h).
Parameters:
s2The subset to compare with this one
Returns:
The number of differences found
void wreport::Subset::store_variable ( Varcode  code,
const Var var 
)

Store a new variable in the message, copying it from an already existing variable.

Parameters:
codeThe Varcode of the variable to add. See varinfo.h
varThe variable holding the value for the variable to add.
void wreport::Subset::store_variable_c ( Varcode  code,
const char *  val 
)

Store a new variable in the message, providing its value as a string.

Parameters:
codeThe Varcode of the variable to add. See vartable.h
valThe value for the variable
void wreport::Subset::store_variable_d ( Varcode  code,
double  val 
)

Store a new variable in the message, providing its value as a double.

Parameters:
codeThe Varcode of the variable to add. See vartable.h
valThe value for the variable
void wreport::Subset::store_variable_i ( Varcode  code,
int  val 
)

Store a new variable in the message, providing its value as an int.

Parameters:
codeThe Varcode of the variable to add. See vartable.h
valThe value for the variable
void wreport::Subset::store_variable_undef ( Varcode  code)

Store a new, undefined variable in the message.

Parameters:
codeThe Varcode of the variable to add. See vartable.h

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