#include <Errors.h>
Public Member Functions | |
~ErrorManager () | |
unsigned int | getNumberOfErrors () const |
void | getFirstError (ErrorDescription &error) const |
void | getAllErrors (std::vector< ErrorDescription > &errors) |
void | deleteFirstError () |
void | deleteAllErrors () |
void | addError (const ErrorDescription &error) |
void | addError (const std::string &title, const std::string &text) |
void | addError (const std::string &title, const std::string &text, int line, int column) |
Private Attributes | |
std::deque< ErrorDescription > | errors |
Definition at line 22 of file Errors.h.
ErrorManager::~ErrorManager | ( | ) | [inline] |
void ErrorManager::addError | ( | const std::string & | title, | |
const std::string & | text, | |||
int | line, | |||
int | column | |||
) |
Adds a new error at the end of the queue (error.position will be set to true)
title | The title of the error | |
text | Detailed description | |
line | The line in the XML file in which the error occured | |
column | The column in the XML file in which the error occured |
Definition at line 20 of file Errors.cpp.
References addError(), ErrorDescription::column, ErrorDescription::line, ErrorDescription::position, ErrorDescription::text, and ErrorDescription::title.
void ErrorManager::addError | ( | const std::string & | title, | |
const std::string & | text | |||
) |
Adds a new error at the end of the queue (line and column will be set to 0, error.position to false)
title | The title of the error | |
text | Detailed description |
Definition at line 32 of file Errors.cpp.
References addError(), ErrorDescription::column, ErrorDescription::line, ErrorDescription::position, ErrorDescription::text, and ErrorDescription::title.
void ErrorManager::addError | ( | const ErrorDescription & | error | ) | [inline] |
Adds a new error at the end of the queue
error | The error |
Definition at line 56 of file Errors.h.
References errors.
Referenced by addError(), SAX2Handler::checkPointsAndSurfaces(), SAX2Handler::error(), SAX2Handler::extractNumbersFromPair(), SAX2Handler::extractNumbersFromTriple(), SAX2Handler::fatalError(), SAX2Handler::getSurface(), SAX2Parser::parse(), SAX2Handler::parseBoolean(), SAX2Handler::parseDouble(), SAX2Handler::parseInteger(), SAX2Handler::parsePoints(), SAX2Handler::parseSurfaces(), SAX2Handler::parseUseAttributes(), SAX2Handler::startElement(), and SAX2Handler::warning().
void ErrorManager::deleteAllErrors | ( | ) | [inline] |
Deletes all errors
Definition at line 51 of file Errors.h.
References errors.
Referenced by Simulation::deleteAllErrors(), and Simulation::getAllErrors().
void ErrorManager::deleteFirstError | ( | ) | [inline] |
Deletes the first (oldest) error
Definition at line 48 of file Errors.h.
References errors.
Referenced by Simulation::getFirstError().
void ErrorManager::getAllErrors | ( | std::vector< ErrorDescription > & | errors | ) |
Returns a list of all errors
errors | The errors to be returned |
Definition at line 12 of file Errors.cpp.
Referenced by Simulation::getAllErrors().
void ErrorManager::getFirstError | ( | ErrorDescription & | error | ) | const [inline] |
Returns the first (oldest) error
error | The error to be returned |
Definition at line 40 of file Errors.h.
References errors.
Referenced by Simulation::getFirstError().
unsigned int ErrorManager::getNumberOfErrors | ( | ) | const [inline] |
Returns the number of stored errors
Definition at line 35 of file Errors.h.
References errors.
Referenced by SAX2Parser::parse(), and SAX2Handler::startElement().
std::deque<ErrorDescription> ErrorManager::errors [private] |
The error queue
Definition at line 26 of file Errors.h.
Referenced by addError(), deleteAllErrors(), deleteFirstError(), getFirstError(), getNumberOfErrors(), and ~ErrorManager().