ErrorManager Class Reference

#include <Errors.h>

List of all members.

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< ErrorDescriptionerrors


Detailed Description

A class for storing errors which occur at runtime

Definition at line 22 of file Errors.h.


Constructor & Destructor Documentation

ErrorManager::~ErrorManager (  )  [inline]

Destructor

Definition at line 30 of file Errors.h.

References errors.


Member Function Documentation

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)

Parameters:
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)

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Returns:
The number of errors

Definition at line 35 of file Errors.h.

References errors.

Referenced by SAX2Parser::parse(), and SAX2Handler::startElement().


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:31:15 2006 for DT2005.panorama by  doxygen 1.4.7