![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
This class is used contain and manipulate gum::ParseError. More...
#include <agrum/base/core/errorsContainer.h>
Public Member Functions | |
Class Constructor | |
| ErrorsContainer () | |
| Class Constructor. | |
| ErrorsContainer (const ErrorsContainer &cont) | |
| Copy constructor. | |
Accessors / Modifiers | |
| void | add (ParseError error) |
| Add an error object to the container. | |
| ParseError | error (Idx i) const |
| Returns the i-th error. | |
| ParseError | last () const |
| Returns the last added error. | |
| void | addError (const std::string &msg, const std::string &filename, Idx line, Idx col) |
| Adds an error. | |
| void | addWarning (const std::string &msg, const std::string &filename, Idx line, Idx col) |
| Adds a warning. | |
| void | addException (const std::string &msg, const std::string &filename) |
| Add an exception. | |
| Size | count () const |
| Returns the number of errors and warnings. | |
| void | syntheticResults (std::ostream &o) const |
| Print errors on output stream. | |
| void | simpleErrors (std::ostream &o) const |
| Print errors on output stream. | |
| void | simpleErrorsAndWarnings (std::ostream &o) const |
| Print errors on output stream. | |
| void | elegantErrors (std::ostream &o) const |
| Print errors on output stream. | |
| void | elegantErrorsAndWarnings (std::ostream &o) const |
| Print errors on output stream. | |
Coco/R helpers | |
| void | Error (const std::wstring &filename, Idx line, Idx col, const wchar_t *msg) |
| For adding errors. | |
| void | Warning (const std::wstring &filename, Idx line, Idx col, const wchar_t *msg) |
| For adding warnings. | |
| void | Exception (const std::wstring &filename, const wchar_t *msg) |
| For adding exceptions. | |
Class operators | |
| ErrorsContainer | operator+ (const ErrorsContainer &cont) const |
| Return the sum of two gum::ErrorsContainer. | |
| ErrorsContainer | operator= (const ErrorsContainer &cont) |
| Copy Operator. | |
| ErrorsContainer | operator+= (const ErrorsContainer &cont) |
| Add the content of a gum::ErrorsContainer to this gum::ErrorsContainer. | |
Public Attributes | |
| Size | error_count |
| Number of errors detected. | |
| Size | warning_count |
Private Attributes | |
| std::vector< ParseError > | errors |
| The list of gum::ParseError contained in this gum::ErrorsContainer. | |
This class is used contain and manipulate gum::ParseError.
Definition at line 180 of file errorsContainer.h.
| gum::ErrorsContainer::ErrorsContainer | ( | ) |
Class Constructor.
Referenced by ErrorsContainer(), operator+(), operator+=(), and operator=().
| gum::ErrorsContainer::ErrorsContainer | ( | const ErrorsContainer & | cont | ) |
Copy constructor.
| cont | The ErrorsContainer to copy. |
References ErrorsContainer(), and error().
| INLINE void gum::ErrorsContainer::add | ( | ParseError | error | ) |
Add an error object to the container.
| error | The gum::ParseError to add. |
Definition at line 73 of file errorsContainer_inl.h.
References error(), error_count, errors, and warning_count.
Referenced by addError(), addException(), addWarning(), Error(), Exception(), and Warning().
| INLINE void gum::ErrorsContainer::addError | ( | const std::string & | msg, |
| const std::string & | filename, | ||
| Idx | line, | ||
| Idx | col ) |
Adds an error.
| msg | The error's message. |
| filename | The error's file. |
| line | The error's line. |
| col | The error's column. |
Definition at line 81 of file errorsContainer_inl.h.
References add().
| INLINE void gum::ErrorsContainer::addException | ( | const std::string & | msg, |
| const std::string & | filename ) |
Add an exception.
| msg | The exception's message. |
| filename | The exception's file. |
Definition at line 97 of file errorsContainer_inl.h.
References add().
| INLINE void gum::ErrorsContainer::addWarning | ( | const std::string & | msg, |
| const std::string & | filename, | ||
| Idx | line, | ||
| Idx | col ) |
Adds a warning.
| msg | The warning's message. |
| filename | The warning's file. |
| line | The warning's line. |
| col | The warning's column. |
Definition at line 89 of file errorsContainer_inl.h.
References add().
| INLINE Size gum::ErrorsContainer::count | ( | ) | const |
Returns the number of errors and warnings.
Definition at line 102 of file errorsContainer_inl.h.
References error_count, and warning_count.
| void gum::ErrorsContainer::elegantErrors | ( | std::ostream & | o | ) | const |
Print errors on output stream.
| o | The output strem to send results. |
| void gum::ErrorsContainer::elegantErrorsAndWarnings | ( | std::ostream & | o | ) | const |
Print errors on output stream.
| o | The output strem to send results. |
| INLINE void gum::ErrorsContainer::Error | ( | const std::wstring & | filename, |
| Idx | line, | ||
| Idx | col, | ||
| const wchar_t * | msg ) |
For adding errors.
| filename | The error's file. |
| line | The error's line. |
| col | The error's column. |
| msg | The error's message. |
Definition at line 55 of file errorsContainer_inl.h.
References add(), and narrow().
| ParseError gum::ErrorsContainer::error | ( | Idx | i | ) | const |
Returns the i-th error.
| i | The error to return. |
| OutOfBounds | Raised if there is less than i errors. |
Referenced by ErrorsContainer(), and add().
| INLINE void gum::ErrorsContainer::Exception | ( | const std::wstring & | filename, |
| const wchar_t * | msg ) |
For adding exceptions.
| filename | The exception's file. |
| msg | The exception's message. |
Definition at line 68 of file errorsContainer_inl.h.
References add(), and narrow().
| ParseError gum::ErrorsContainer::last | ( | ) | const |
Returns the last added error.
| OutOfBounds | Raised if is no error to return. |
| ErrorsContainer gum::ErrorsContainer::operator+ | ( | const ErrorsContainer & | cont | ) | const |
Return the sum of two gum::ErrorsContainer.
| cont | The gum::ErrorsContainer to add. |
References ErrorsContainer().
| ErrorsContainer gum::ErrorsContainer::operator+= | ( | const ErrorsContainer & | cont | ) |
Add the content of a gum::ErrorsContainer to this gum::ErrorsContainer.
| cont | The gum::ErrorsContainer to add to this. |
References ErrorsContainer().
| ErrorsContainer gum::ErrorsContainer::operator= | ( | const ErrorsContainer & | cont | ) |
Copy Operator.
| cont | The gum::ErrorsContainer to copy. |
References ErrorsContainer().
| void gum::ErrorsContainer::simpleErrors | ( | std::ostream & | o | ) | const |
Print errors on output stream.
| o | The output strem to send results. |
| void gum::ErrorsContainer::simpleErrorsAndWarnings | ( | std::ostream & | o | ) | const |
Print errors on output stream.
| o | The output strem to send results. |
| INLINE void gum::ErrorsContainer::syntheticResults | ( | std::ostream & | o | ) | const |
Print errors on output stream.
| o | The output strem to send results. |
Definition at line 105 of file errorsContainer_inl.h.
References error_count, and warning_count.
| INLINE void gum::ErrorsContainer::Warning | ( | const std::wstring & | filename, |
| Idx | line, | ||
| Idx | col, | ||
| const wchar_t * | msg ) |
For adding warnings.
| filename | The warning's file. |
| line | The warning's line. |
| col | The warning's column. |
| msg | The warning's message. |
Definition at line 60 of file errorsContainer_inl.h.
References add(), and narrow().
| Size gum::ErrorsContainer::error_count |
Number of errors detected.
Definition at line 186 of file errorsContainer.h.
Referenced by add(), count(), and syntheticResults().
|
mutableprivate |
The list of gum::ParseError contained in this gum::ErrorsContainer.
Definition at line 182 of file errorsContainer.h.
Referenced by add().
| Size gum::ErrorsContainer::warning_count |
Definition at line 189 of file errorsContainer.h.
Referenced by add(), count(), and syntheticResults().