]> git.lyx.org Git - lyx.git/blob - src/ErrorList.h
LyXText -> Text
[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
17 #include <vector>
18 #include <string>
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         ErrorItem(docstring const & error, docstring const & description,
34                   int parid, pos_type posstart, pos_type posend);
35         ErrorItem();
36 };
37
38
39 class ErrorList : private std::vector<ErrorItem>
40 {
41 public:
42         ErrorList() : std::vector<ErrorItem> () {};
43
44         using std::vector<ErrorItem>::push_back;
45         using std::vector<ErrorItem>::end;
46         using std::vector<ErrorItem>::begin;
47         using std::vector<ErrorItem>::operator[];
48         using std::vector<ErrorItem>::size;
49         using std::vector<ErrorItem>::clear;
50         using std::vector<ErrorItem>::empty;
51         using std::vector<ErrorItem>::const_iterator;
52 };
53
54
55 } // namespace lyx
56
57 #endif