libdballe  9.11
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
dballe::impl::msg::Context Class Reference

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

#include <context.h>

Public Member Functions

 Context (const Level &lev, const Trange &tr)
 
 Context (const Context &c)=default
 
 Context (Context &&c)=default
 
Contextoperator= (const Context &src)=default
 
Contextoperator= (Context &&src)=default
 
int compare (const Context &ctx) const
 Compare two dba_msg_context strutures, for use in sorting. More...
 
int compare (const Level &lev, const Trange &tr) const
 Compare a Context struture with level and time range information, for use in sorting. More...
 
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. More...
 
void print (FILE *out) const
 Dump all the contents of the context to the given stream. More...
 
unsigned diff (const Context &ctx) const
 Compute the differences between two contexts. More...
 

Public Attributes

Level level
 
Trange trange
 
Values values
 

Protected Member Functions

int find_index (wreport::Varcode code) const
 Return the index of the var ‘code’ in l, or -1 if it was not found.
 

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

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

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

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

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

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: