wreport::Subset Class Reference

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

`#include <subset.h>`

Inheritance diagram for wreport::Subset:

## Public Member Functions

| Subset (const Tables &tables)
| Create a new BUFR/CREX subset.
| Subset (const Subset &subset)=default
| Subset (Subset &&subset)
Subset & | operator= (const Subset &)=default
Subset & | operator= (Subset &&s)
void | store_variable (const Var &var)
| Store a decoded variable in the message, to be encoded later.
void | store_variable (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.
void | store_variable_undef (Varinfo info)
| 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 Tables * | tables
| Tables used for creating variables in this subset.

## 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

## Subset()

wreport::Subset::Subset | ( | const Tables & | tables | ) |

Create a new BUFR/CREX subset.

Parameters

  btable | Reference to the B table to use to create variables.

References Subset(), and tables.

Referenced by diff(), and Subset().

## Member Function Documentation

## append_dpb()

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

Compute and append a data present bitmap.

Parameters

  ccode | The C code that uses this bitmap
  size | The size of the bitmap
  attr | The 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 '+')

## append_fixed_dpb()

void wreport::Subset::append_fixed_dpb | ( | Varcode | ccode,
|  | int | size )

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

Parameters

  ccode | The C code that uses this bitmap
  size | The size of the bitmap

## diff()

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

  s2 | The subset to compare with this one

Returns
  The number of differences found

References Subset().

## store_variable()

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

  code | The Varcode of the variable to add. See varinfo.h
  var | The variable holding the value for the variable to add.

## store_variable_c()

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

  code | The Varcode of the variable to add. See vartable.h
  val | The value for the variable

## store_variable_d()

void wreport::Subset::store_variable_d | ( | Varcode | code,
|  | double | val )

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

Parameters

  code | The Varcode of the variable to add. See vartable.h
  val | The value for the variable

## store_variable_i()

void wreport::Subset::store_variable_i | ( | Varcode | code,
|  | int | val )

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

Parameters

  code | The Varcode of the variable to add. See vartable.h
  val | The value for the variable

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

- subset.h