error_collectors.h
Go to the documentation of this file.
1 #ifndef ERROR_COLLECTORS_H
2 #define ERROR_COLLECTORS_H
3 
4 
5 #include <google/protobuf/io/tokenizer.h>
6 #include <google/protobuf/compiler/importer.h>
7 
8 #include <QStringList>
9 
10 class IoErrorCollector: public google::protobuf::io::ErrorCollector
11 {
12 public:
13  void AddError(int line, google::protobuf::io::ColumnNumber column,
14  const std::string& message) override;
15 
16  void AddWarning(int line, google::protobuf::io::ColumnNumber column,
17  const std::string& message) override;
18 
19  const QStringList& errors()
20  {
21  return _errors;
22  }
23 
24 private:
25  QStringList _errors;
26 };
27 
28 class FileErrorCollector: public google::protobuf::compiler::MultiFileErrorCollector
29 {
30 public:
31  void AddError(const std::string& filename, int line, int,
32  const std::string& message) override;
33 
34  void AddWarning(const std::string& filename, int line, int,
35  const std::string& message) override;
36 
37  const QStringList& errors()
38  {
39  return _errors;
40  }
41 
42 private:
43  QStringList _errors;
44 };
45 
46 #endif // ERROR_COLLECTORS_H
QStringList _errors
void AddWarning(int line, google::protobuf::io::ColumnNumber column, const std::string &message) override
void AddError(int line, google::protobuf::io::ColumnNumber column, const std::string &message) override
const QStringList & errors()
const QStringList & errors()


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:02