libdballe 9.14
dballe::impl::msg::Context Class Reference

Store an array of physical data all on the same level. More...

#include <context.h>

Protected Member Functions

int compare (const Context &ctx) const
 Return the index of the var `code' in l, or -1 if it was not found */ int find_index(wreport::Varcode code) const;.
int compare (const Level &lev, const Trange &tr) const
 Compare a Context struture with level and time range information, for use in sorting.
const wreport::Varfind_vsig () const
 If this context is the right context for a vertical sounding significance and contains a vertical sounding significance variable, return it.
void print (FILE *out) const
 Dump all the contents of the context to the given stream.
unsigned diff (const Context &ctx) const
 Compute the differences between two contexts.

Detailed Description

Store an array of physical data all on the same level.

Member Function Documentation

◆ compare() [1/2]

int dballe::impl::msg::Context::compare ( const Context & ctx) const
protected

Return the index of the var `code' in l, or -1 if it was not found */ int find_index(wreport::Varcode code) const;.

public: Level level; Trange trange; Values values;

Context(const Level& lev, const Trange& tr); Context(const Context& c) = default; Context(Context&& c) = default;

Context& operator=(const Context& src) = default; Context& operator=(Context&& src) = default;

/** Compare two dba_msg_context strutures, for use in sorting.

Parameters
ctxFirst context to compare
Returns
-1 if l1 < l2, 0 if l1 == l2, 1 if l1 > l2

◆ compare() [2/2]

int dballe::impl::msg::Context::compare ( const Level & lev,
const Trange & tr ) const
protected

Compare a Context struture with level and time range information, for use in sorting.

Returns
-1 if l < lev, tr; 0 if l == lev, tr; 1 if l > lev, tr

◆ diff()

unsigned dballe::impl::msg::Context::diff ( const Context & ctx) const
protected

Compute the differences between two contexts.

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

See also
notes.h).
Parameters
ctxContext to compare with this one
Returns
The number of differences found

◆ find_vsig()

const wreport::Var * dballe::impl::msg::Context::find_vsig ( ) const
protected

If this context is the right context for a vertical sounding significance and contains a vertical sounding significance variable, return it.

Else, return NULL.

◆ print()

void dballe::impl::msg::Context::print ( FILE * out) const
protected

Dump all the contents of the context to the given stream.

Parameters
outThe stream to dump the contents of the level to.

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