libdballe  9.14
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 
11 namespace wreport {
12 struct Var;
13 struct Subset;
14 struct Bulletin;
15 } // namespace wreport
16 
17 namespace dballe {
18 
19 struct MatchedSubset : public Matched
20 {
21  const wreport::Subset& r;
22 
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 
39 protected:
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 
51 struct MatchedBulletin : public Matched
52 {
53  const wreport::Bulletin& r;
54 
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 
67 protected:
68  const MatchedSubset** subsets;
69 };
70 
71 } // namespace dballe
72 #endif
matcher::Result match_station_id(int val) const override
Match station ID.
matcher::Result match_var_id(int val) const override
Match variable ID.
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...
Common interface for things that are matched.
Definition: matcher.h:29
matcher::Result match_station_wmo(int block, int station=-1) const override
Match station WMO code.
Definition: cmdline.h:18
matcher::Result match_station_id(int val) const override
Match station ID.
matcher::Result match_rep_memo(const char *memo) const override
Match rep_memo.
Range of datetimes.
Definition: types.h:296
matcher::Result match_datetime(const DatetimeRange &range) const override
Match datetime.
Range of latitudes.
Definition: types.h:469
Date and time.
Definition: types.h:163
Definition: match-wreport.h:19
matcher::Result match_coords(const LatRange &latrange, const LonRange &lonrange) const override
Match coordinates, with bounds in 1/100000 of degree.
matcher::Result match_datetime(const DatetimeRange &range) const override
Match datetime.
Match all subsets in turn, returning true if at least one subset matches.
Definition: match-wreport.h:51
matcher::Result match_coords(const LatRange &latrange, const LonRange &lonrange) const override
Match coordinates, with bounds in 1/100000 of degree.
matcher::Result match_station_wmo(int block, int station=-1) const override
Match station WMO code.
Range of longitudes.
Definition: types.h:552
matcher::Result match_rep_memo(const char *memo) const override
Match rep_memo.