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
|
|
|
|
|
2006-09-13 21:13:49 +00:00
|
|
|
#include "support/docstring.h"
|
2009-03-25 08:31:46 +00:00
|
|
|
#include "support/types.h"
|
2004-03-24 17:06:17 +00:00
|
|
|
|
2003-05-20 16:51:31 +00:00
|
|
|
#include <vector>
|
|
|
|
|
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;
|
2011-03-04 13:37:14 +00:00
|
|
|
Buffer const * buffer;
|
2006-10-21 00:16:43 +00:00
|
|
|
ErrorItem(docstring const & error, docstring const & description,
|
2011-03-04 13:37:14 +00:00
|
|
|
int parid, pos_type posstart, pos_type posend,
|
|
|
|
Buffer const * buf = 0);
|
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:
|
2013-05-12 11:00:02 +00:00
|
|
|
ErrorList() : std::vector<ErrorItem> () {}
|
2003-05-20 16:51:31 +00:00
|
|
|
|
|
|
|
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
|