libdballe  9.11
Public Member Functions | Static Public Member Functions | List of all members
dballe::Matched Struct Reference

Common interface for things that are matched. More...

#include <matcher.h>

Inheritance diagram for dballe::Matched:
dballe::impl::MatchedMessages dballe::impl::MatchedMsg dballe::MatchedBulletin dballe::MatchedSubset

Public Member Functions

virtual matcher::Result match_var_id (int val) const
 Match variable ID. More...
 
virtual matcher::Result match_station_id (int val) const
 Match station ID. More...
 
virtual matcher::Result match_station_wmo (int block, int station=-1) const
 Match station WMO code. More...
 
virtual matcher::Result match_datetime (const DatetimeRange &range) const
 Match datetime.
 
virtual matcher::Result match_coords (const LatRange &latrange, const LonRange &lonrange) const
 Match coordinates, with bounds in 1/100000 of degree. More...
 
virtual matcher::Result match_rep_memo (const char *memo) const
 Match rep_memo. More...
 

Static Public Member Functions

static matcher::Result int_in_range (int val, int min, int max)
 Match if min <= val <= max. More...
 
static matcher::Result lon_in_range (int val, int min, int max)
 Match if val is contained inside the given longitude range.
 

Detailed Description

Common interface for things that are matched.

This allows the Record-derived matcher to operate on several different elements. Examples are Record and Msg, but can also be unknown elements provided by code that uses DB-All.e.

Member Function Documentation

◆ int_in_range()

static matcher::Result dballe::Matched::int_in_range ( int  val,
int  min,
int  max 
)
static

Match if min <= val <= max.

It correctly deals with min and max being set to MISSING_INT to signify an open bound.

◆ match_coords()

virtual matcher::Result dballe::Matched::match_coords ( const LatRange latrange,
const LonRange lonrange 
) const
virtual

Match coordinates, with bounds in 1/100000 of degree.

Any value can be set to MISSING_INT if not applicable or to represent an open bound

Reimplemented in dballe::impl::MatchedMessages, dballe::impl::MatchedMsg, dballe::MatchedBulletin, and dballe::MatchedSubset.

◆ match_rep_memo()

virtual matcher::Result dballe::Matched::match_rep_memo ( const char *  memo) const
virtual

Match rep_memo.

the memo value that is passed is always lowercase

Reimplemented in dballe::impl::MatchedMessages, dballe::impl::MatchedMsg, dballe::MatchedBulletin, and dballe::MatchedSubset.

◆ match_station_id()

virtual matcher::Result dballe::Matched::match_station_id ( int  val) const
virtual

Match station ID.

This corresponds to DBA_KEY_ANA_ID

Reimplemented in dballe::impl::MatchedMessages, dballe::impl::MatchedMsg, dballe::MatchedBulletin, and dballe::MatchedSubset.

◆ match_station_wmo()

virtual matcher::Result dballe::Matched::match_station_wmo ( int  block,
int  station = -1 
) const
virtual

Match station WMO code.

If station is -1, only match the block.

Reimplemented in dballe::impl::MatchedMessages, dballe::impl::MatchedMsg, dballe::MatchedBulletin, and dballe::MatchedSubset.

◆ match_var_id()

virtual matcher::Result dballe::Matched::match_var_id ( int  val) const
virtual

Match variable ID.

This corresponds to B33195

Reimplemented in dballe::impl::MatchedMessages, dballe::impl::MatchedMsg, dballe::MatchedBulletin, and dballe::MatchedSubset.


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