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