2003-05-20 16:51:31 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-04-26 04:41:58 +00:00
|
|
|
* \file ErrorList.h
|
2003-05-20 16:51:31 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Alfredo Braunstein
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2003-05-20 16:51:31 +00:00
|
|
|
*/
|
|
|
|
|
2003-08-23 00:17:00 +00:00
|
|
|
#ifndef ERRORLIST_H
|
|
|
|
#define ERRORLIST_H
|
|
|
|
|
2007-10-31 22:40:34 +00:00
|
|
|
#include "support/types.h"
|
2006-09-13 21:13:49 +00:00
|
|
|
#include "support/docstring.h"
|
2004-03-24 17:06:17 +00:00
|
|
|
|
2003-05-20 16:51:31 +00:00
|
|
|
#include <vector>
|
2003-10-06 15:43:21 +00:00
|
|
|
#include <string>
|
2003-05-20 16:51:31 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
2003-05-20 16:51:31 +00:00
|
|
|
class Buffer;
|
|
|
|
|
|
|
|
/// A class to hold an error item
|
2005-01-19 15:03:31 +00:00
|
|
|
class ErrorItem {
|
|
|
|
public:
|
2006-10-21 00:16:43 +00:00
|
|
|
docstring error;
|
|
|
|
docstring description;
|
2003-05-20 16:51:31 +00:00
|
|
|
int par_id;
|
2006-10-21 00:16:43 +00:00
|
|
|
pos_type pos_start;
|
|
|
|
pos_type pos_end;
|
|
|
|
ErrorItem(docstring const & error, docstring const & description,
|
|
|
|
int parid, pos_type posstart, pos_type posend);
|
2003-05-20 16:51:31 +00:00
|
|
|
ErrorItem();
|
|
|
|
};
|
|
|
|
|
2004-03-25 09:16:36 +00:00
|
|
|
|
2003-05-20 16:51:31 +00:00
|
|
|
class ErrorList : private std::vector<ErrorItem>
|
|
|
|
{
|
2003-09-09 18:27:24 +00:00
|
|
|
public:
|
2003-05-20 16:51:31 +00:00
|
|
|
ErrorList() : std::vector<ErrorItem> () {};
|
|
|
|
|
|
|
|
using std::vector<ErrorItem>::push_back;
|
|
|
|
using std::vector<ErrorItem>::end;
|
|
|
|
using std::vector<ErrorItem>::begin;
|
|
|
|
using std::vector<ErrorItem>::operator[];
|
|
|
|
using std::vector<ErrorItem>::size;
|
|
|
|
using std::vector<ErrorItem>::clear;
|
|
|
|
using std::vector<ErrorItem>::empty;
|
|
|
|
using std::vector<ErrorItem>::const_iterator;
|
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
2003-05-20 16:51:31 +00:00
|
|
|
#endif
|