libdballe  8.3
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 }
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, 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 
37 protected:
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 
49 struct MatchedBulletin : public Matched
50 {
51  const wreport::Bulletin& r;
52 
54  ~MatchedBulletin();
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 
63 protected:
64  const MatchedSubset** subsets;
65 };
66 
67 }
68 #endif
Common interface for things that are matched.
Definition: matcher.h:29
Definition: cmdline.h:18
Range of datetimes.
Definition: types.h:291
Range of latitudes.
Definition: types.h:464
Date and time.
Definition: types.h:164
Definition: match-wreport.h:19
Match all subsets in turn, returning true if at least one subset matches.
Definition: match-wreport.h:49
Range of longitudes.
Definition: types.h:548