22 #ifndef DBA_MSG_MSGS_H
23 #define DBA_MSG_MSGS_H
38 struct Msgs :
public std::vector<Msg*>
61 void acquire(std::auto_ptr<Msg> msg);
80 void to_csv(std::ostream& out)
const;
88 void print(FILE* out)
const;
101 unsigned diff(
const Msgs& msgs)
const;
111 void operator()(std::auto_ptr<Msg> msg)
131 virtual matcher::Result
match_date(
const int* min,
const int* max)
const;
132 virtual matcher::Result
match_coords(
int latmin,
int latmax,
int lonmin,
int lonmax)
const;
void print(FILE *out) const
Dump all the contents of the message to the given stream.
Common interface for things that are matched.
Definition: matcher.h:48
Storage for related physical data.
Definition: msg.h:119
Match adapter for Msgs.
Definition: msgs.h:121
void to_csv(std::ostream &out) const
Output in CSV format.
void clear()
Remove all messages.
virtual matcher::Result match_date(const int *min, const int *max) const
Match date.
virtual matcher::Result match_rep_memo(const char *memo) const
Match rep_memo.
virtual matcher::Result match_coords(int latmin, int latmax, int lonmin, int lonmax) const
Match coordinates, with bounds in 1/100000 of degree.
bool from_csv(CSVReader &in)
Read data from a CSV input.
Abstraction for a weather report message which is independent from the encoding, used to make sense o...
unsigned diff(const Msgs &msgs) const
Compute the differences between two Msgs.
virtual matcher::Result match_station_id(int val) const
Match station ID.
virtual matcher::Result match_station_wmo(int block, int station=-1) const
Match station WMO code.
Dynamic array of dba_msg.
Definition: msgs.h:38
Consumer interface used to stream messages as they are produced.
Definition: msg.h:478
virtual matcher::Result match_var_id(int val) const
Match variable ID.
void acquire(const Msg &msg)
Append a copy of the message to the array.