63 const std::string& filename,
65 const std::string& msg)
67 initmsg(filename, index, msg.c_str());
71 const std::string& filename,
73 const std::exception& original)
75 initmsg(filename, index, original.what());
79 const std::string& filename,
81 const std::string& msg,
82 const std::exception& original)
84 initmsg(filename, index, msg.c_str());
86 this->msg += original.what();
91 virtual const char* what()
const throw ()
97 void initmsg(
const std::string& fname,
unsigned index,
const char* msg);
104 wreport::Bulletin* bulletin;
120 virtual bool operator()(
const Item& item) = 0;
143 bool match_index(
int idx)
const;
144 bool match_common(
const Rawmsg& rmsg,
const Msgs* msgs)
const;
145 bool match_msgs(
const Msgs& msgs)
const;
146 bool match_bufrex(
const Rawmsg& rmsg,
const wreport::Bulletin* rm,
const Msgs* msgs)
const;
147 bool match_bufr(
const Rawmsg& rmsg,
const wreport::Bulletin* rm,
const Msgs* msgs)
const;
148 bool match_crex(
const Rawmsg& rmsg,
const wreport::Bulletin* rm,
const Msgs* msgs)
const;
149 bool match_aof(
const Rawmsg& rmsg,
const Msgs* msgs)
const;
150 bool match_item(
const Item& item)
const;
156 void read_csv(
const std::list<std::string>& fnames,
Action& action);
157 void read_file(
const std::list<std::string>& fnames,
Action& action);
160 const char* input_type;
164 const char* fail_file_name;
168 void read(
const std::list<std::string>& fnames,
Action& action);
Definition: processor.h:117
Definition: processor.h:153
Message importer.
Definition: codec.h:53
File I/O for files containing meterorological messages.
void matcher_reset()
Reset to the empty matcher.
void matcher_from_record(const Record &query)
Initialise the matcher from a record.
DB-All.E record.
Definition: record.h:102
Definition: processor.h:123
Definition: processor.h:100
Definition: matcher.h:113
void set_msgs(Msgs *new_msgs)
Set the value of msgs, possibly replacing the previous one.
void decode(msg::Importer &imp, bool print_errors=false)
Decode all that can be decoded.
In-memory storage of an encoded weather report.
Implement a storage object for a group of related observation data.
Definition: conversion.h:31
Dynamic array of dba_msg.
Definition: msgs.h:38
Annotated string buffer for encoded messages.
Definition: rawmsg.h:38
Exception used to embed processing issues that mean that processing of the current element can safely...
Definition: processor.h:49
ProcessingException(const std::string &filename, unsigned index, const std::string &msg)
Create a new exception.
Definition: processor.h:62