2003-05-20 16:51:31 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file errorlist.h
|
|
|
|
* 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
|
|
|
|
|
2004-03-24 17:06:17 +00:00
|
|
|
#include "support/types.h"
|
|
|
|
|
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
|
|
|
|
|
|
|
class Buffer;
|
|
|
|
|
|
|
|
/// A class to hold an error item
|
|
|
|
struct ErrorItem {
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string error;
|
|
|
|
std::string description;
|
2003-05-20 16:51:31 +00:00
|
|
|
int par_id;
|
2004-03-24 17:06:17 +00:00
|
|
|
lyx::pos_type pos_start;
|
|
|
|
lyx::pos_type pos_end;
|
2003-10-06 15:43:21 +00:00
|
|
|
ErrorItem(std::string const & error, std::string const & description,
|
2004-03-24 17:06:17 +00:00
|
|
|
int parid, lyx::pos_type posstart, lyx::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;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|