1 #ifndef DBALLE_CMDLINE_PROCESSOR_H 2 #define DBALLE_CMDLINE_PROCESSOR_H 9 #define DBALLE_JSON_VERSION "0.1" 41 const std::string& filename,
43 const std::string& msg)
45 initmsg(filename, index, msg.c_str());
57 const std::string& filename,
59 const std::exception& original)
61 initmsg(filename, index, original.what());
74 const std::string& filename,
76 const std::string& msg,
77 const std::exception& original)
79 initmsg(filename, index, msg.c_str());
81 this->msg += original.what();
86 virtual const char* what()
const throw ()
92 void initmsg(
const std::string& fname,
unsigned index,
const char* msg);
115 virtual bool operator()(
const Item& item) = 0;
120 std::vector<std::pair<int, int>> ranges;
122 void parse(
const std::string& str);
124 bool match(
int val)
const;
130 int subcategory = -1;
134 const char* index_filter =
nullptr;
135 const char* input_type =
"auto";
136 const char* fail_file_name =
nullptr;
143 int subcategory = -1;
154 void set_index_filter(
const std::string& val);
157 void matcher_reset();
160 void matcher_from_record(
const Query& query);
162 bool match_index(
int idx)
const;
164 bool match_msgs(
const Messages& msgs)
const;
169 bool match_item(
const Item& item)
const;
175 std::string input_type;
176 const char* fail_file_name;
178 void read_csv(
const std::list<std::string>& fnames,
Action& action);
179 void read_json(
const std::list<std::string>& fnames,
Action& action);
180 void read_file(
const std::list<std::string>& fnames,
Action& action);
189 void read(
const std::list<std::string>& fnames,
Action& action);
Definition: processor.h:118
Definition: processor.h:112
Definition: processor.h:172
Message importer.
Definition: codec.h:32
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
ProcessingException(const std::string &filename, unsigned index, const std::string &msg, const std::exception &original)
Create a new exception.
Definition: processor.h:73
Definition: processor.h:139
Definition: processor.h:95
Match DB-All.e objects using the same queries that can be made on DB-All.e databases.
Definition: matcher.h:92
Binary message.
Definition: file.h:131
ProcessingException(const std::string &filename, unsigned index, const std::exception &original)
Create a new exception.
Definition: processor.h:56
Ordered collection of messages.
Definition: message.h:67
Query used to filter DB-All.e data.
Definition: query.h:14
Definition: processor.h:127
Exception used to embed processing issues that mean that processing of the current element can safely...
Definition: processor.h:29
ProcessingException(const std::string &filename, unsigned index, const std::string &msg)
Create a new exception.
Definition: processor.h:40