]> git.lyx.org Git - lyx.git/blob - src/ErrorList.h
Cmake build: Don't use temporary doc-files as source for installation
[lyx.git] / src / ErrorList.h
1 // -*- C++ -*-
2 /**
3  * \file ErrorList.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Alfredo Braunstein
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef ERRORLIST_H
13 #define ERRORLIST_H
14
15 #include "TexRow.h"
16
17 #include "support/docstring.h"
18 #include "support/types.h"
19
20 #include <vector>
21
22
23 namespace lyx {
24
25 class Buffer;
26
27 /// A class to hold an error item
28 class ErrorItem {
29 public:
30         typedef TexRow::TextEntry TextEntry;
31         docstring error;
32         docstring description;
33         // To generalise into RowEntries
34         TextEntry start;
35         TextEntry end;
36         Buffer const * buffer;
37         // With a start position and an end position
38         ErrorItem(docstring const & error, docstring const & description,
39                   TextEntry start, TextEntry end, Buffer const * buf = 0);
40         // Error outside the document body
41         ErrorItem(docstring const & error, docstring const & description,
42                   Buffer const * buf = 0);
43         ErrorItem();
44 };
45
46
47 class ErrorList : private std::vector<ErrorItem>
48 {
49 public:
50         ErrorList() : std::vector<ErrorItem> () {}
51
52         using std::vector<ErrorItem>::push_back;
53         using std::vector<ErrorItem>::end;
54         using std::vector<ErrorItem>::begin;
55         using std::vector<ErrorItem>::operator[];
56         using std::vector<ErrorItem>::size;
57         using std::vector<ErrorItem>::clear;
58         using std::vector<ErrorItem>::empty;
59         using std::vector<ErrorItem>::const_iterator;
60 };
61
62
63 } // namespace lyx
64
65 #endif