libdballe 9.6
match-wreport.h
Go to the documentation of this file.
1#ifndef DBALLE_CORE_MATCH_WREPORT_H
2#define DBALLE_CORE_MATCH_WREPORT_H
3
9#include <dballe/core/matcher.h>
10
11namespace wreport {
12struct Var;
13struct Subset;
14struct Bulletin;
15}
16
17namespace dballe {
18
19struct MatchedSubset : public Matched
20{
21 const wreport::Subset& r;
22
25
30 matcher::Result match_var_id(int val) const override;
31 matcher::Result match_station_id(int val) const override;
32 matcher::Result match_station_wmo(int block, int station=-1) const override;
33 matcher::Result match_datetime(const DatetimeRange& range) const override;
34 matcher::Result match_coords(const LatRange& latrange, const LonRange& lonrange) const override;
35 matcher::Result match_rep_memo(const char* memo) const override;
36
37protected:
38 Datetime date;
39 int lat, lon;
40 const wreport::Var* var_ana_id;
41 const wreport::Var* var_block;
42 const wreport::Var* var_station;
43 const wreport::Var* var_rep_memo;
44};
45
49struct MatchedBulletin : public Matched
50{
51 const wreport::Bulletin& r;
52
55
56 matcher::Result match_var_id(int val) const override;
57 matcher::Result match_station_id(int val) const override;
58 matcher::Result match_station_wmo(int block, int station=-1) const override;
59 matcher::Result match_datetime(const DatetimeRange& range) const override;
60 matcher::Result match_coords(const LatRange& latrange, const LonRange& lonrange) const override;
61 matcher::Result match_rep_memo(const char* memo) const override;
62
63protected:
64 const MatchedSubset** subsets;
65};
66
67}
68#endif
Range of datetimes.
Definition: types.h:295
Date and time.
Definition: types.h:165
Range of latitudes.
Definition: types.h:468
Range of longitudes.
Definition: types.h:552
Match all subsets in turn, returning true if at least one subset matches.
Definition: match-wreport.h:50
matcher::Result match_var_id(int val) const override
Match variable ID.
matcher::Result match_station_id(int val) const override
Match station ID.
matcher::Result match_datetime(const DatetimeRange &range) const override
Match datetime.
matcher::Result match_rep_memo(const char *memo) const override
Match rep_memo.
matcher::Result match_station_wmo(int block, int station=-1) const override
Match station WMO code.
matcher::Result match_coords(const LatRange &latrange, const LonRange &lonrange) const override
Match coordinates, with bounds in 1/100000 of degree.
Definition: match-wreport.h:20
matcher::Result match_datetime(const DatetimeRange &range) const override
Match datetime.
matcher::Result match_station_id(int val) const override
Match station ID.
matcher::Result match_coords(const LatRange &latrange, const LonRange &lonrange) const override
Match coordinates, with bounds in 1/100000 of degree.
matcher::Result match_var_id(int val) const override
Return YES if the subset contains at least one var with the given B33195 attribute; else return NA.
matcher::Result match_rep_memo(const char *memo) const override
Match rep_memo.
matcher::Result match_station_wmo(int block, int station=-1) const override
Match station WMO code.
Common interface for things that are matched.
Definition: matcher.h:30