libdballe 9.13
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
8
9#include <dballe/core/matcher.h>
10
11namespace wreport {
12struct Var;
13struct Subset;
14struct Bulletin;
15} // namespace wreport
16
17namespace dballe {
18
19struct MatchedSubset : public Matched
20{
21 const wreport::Subset& r;
22
23 MatchedSubset(const wreport::Subset& r);
24 ~MatchedSubset();
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,
33 int station = -1) const override;
34 matcher::Result match_datetime(const DatetimeRange& range) const override;
35 matcher::Result match_coords(const LatRange& latrange,
36 const LonRange& lonrange) const override;
37 matcher::Result match_rep_memo(const char* memo) const override;
38
39protected:
40 Datetime date;
41 int lat, lon;
42 const wreport::Var* var_ana_id;
43 const wreport::Var* var_block;
44 const wreport::Var* var_station;
45 const wreport::Var* var_rep_memo;
46};
47
51struct MatchedBulletin : public Matched
52{
53 const wreport::Bulletin& r;
54
55 MatchedBulletin(const wreport::Bulletin& r);
56 ~MatchedBulletin();
57
58 matcher::Result match_var_id(int val) const override;
59 matcher::Result match_station_id(int val) const override;
60 matcher::Result match_station_wmo(int block,
61 int station = -1) const override;
62 matcher::Result match_datetime(const DatetimeRange& range) const override;
63 matcher::Result match_coords(const LatRange& latrange,
64 const LonRange& lonrange) const override;
65 matcher::Result match_rep_memo(const char* memo) const override;
66
67protected:
68 const MatchedSubset** subsets;
69};
70
71} // namespace dballe
72#endif
Range of datetimes.
Definition types.h:297
Date and time.
Definition types.h:164
Range of latitudes.
Definition types.h:470
Range of longitudes.
Definition types.h:553
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