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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:44