]> git.lyx.org Git - lyx.git/blob - src/ErrorList.h
prepare Qt 5.6 builds
[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 "support/docstring.h"
16 #include "support/types.h"
17
18 #include <vector>
19
20
21 namespace lyx {
22
23 class Buffer;
24
25 /// A class to hold an error item
26 class ErrorItem {
27 public:
28         docstring error;
29         docstring description;
30         int par_id;
31         pos_type pos_start;
32         pos_type pos_end;
33         Buffer const * buffer;
34         ErrorItem(docstring const & error, docstring const & description,
35                   int parid, pos_type posstart, pos_type posend,
36                   Buffer const * buf = 0);
37         ErrorItem();
38 };
39
40
41 class ErrorList : private std::vector<ErrorItem>
42 {
43 public:
44         ErrorList() : std::vector<ErrorItem> () {}
45
46         using std::vector<ErrorItem>::push_back;
47         using std::vector<ErrorItem>::end;
48         using std::vector<ErrorItem>::begin;
49         using std::vector<ErrorItem>::operator[];
50         using std::vector<ErrorItem>::size;
51         using std::vector<ErrorItem>::clear;
52         using std::vector<ErrorItem>::empty;
53         using std::vector<ErrorItem>::const_iterator;
54 };
55
56
57 } // namespace lyx
58
59 #endif