Code::Blocks  SVN r11506
compilererrors.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3  * http://www.gnu.org/licenses/gpl-3.0.html
4  */
5 
6 #ifndef COMPILERERRORS_H
7 #define COMPILERERRORS_H
8 
9 #include <wx/arrstr.h>
10 #include <wx/dynarray.h>
11 #include <wx/string.h>
12 #include "compiler.h" // CompilerLineType
13 
14 class cbProject;
15 
17 {
21  long int line;
23 };
24 WX_DECLARE_OBJARRAY(CompileError, ErrorsArray);
25 
27 {
28  public:
30  virtual ~CompilerErrors();
31 
32  void AddError(CompilerLineType lt, cbProject* project, const wxString& filename, long int line, const wxString& error);
33 
34  void GotoError(int nr);
35  void Next();
36  void Previous();
37  void Clear();
38  bool HasNextError() const;
39  bool HasPreviousError() const;
40  int GetCount() const { return m_Errors.GetCount(); }
41  wxString GetErrorString(int index);
42 
43  unsigned int GetCount(CompilerLineType lt) const;
44 
45  int GetFirstError() const;
46  int GetFocusedError() const { return m_ErrorIndex; }
47  private:
48  void DoAddError(const CompileError& error);
49  void DoGotoError(const CompileError& error);
50  void DoClearErrorMarkFromAllEditors();
51  int ErrorLineHasMore(const wxString& filename, long int line) const; // returns the index in the array
52  ErrorsArray m_Errors;
54 };
55 
56 #endif // COMPILERERRORS_H
57 
long int line
WX_DECLARE_OBJARRAY(CompileError, ErrorsArray)
CompilerLineType lineType
CompilerLineType
Enum categorizing compiler&#39;s output line as warning/error/info/normal.
Definition: compiler.h:66
wxString filename
cbProject * project
Represents a Code::Blocks project.
Definition: cbproject.h:96
int GetFocusedError() const
wxArrayString errors
ErrorsArray m_Errors
int GetCount() const
const wxString lt(_T("<"))