![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
This class is used contain and manipulate gum::ParseError. More...
#include <agrum/tools/core/errorsContainer.h>
Public Attributes | |
Size | error_count |
Number of errors detected. More... | |
Size | warning_count |
Public Member Functions | |
Class Constructor | |
ErrorsContainer () | |
Class Constructor. More... | |
ErrorsContainer (const ErrorsContainer &cont) | |
Copy constructor. More... | |
Accessors / Modifiers | |
void | add (ParseError error) |
Add an error object to the container. More... | |
ParseError | error (Idx i) const |
Returns the i-th error. More... | |
ParseError | last () const |
Returns the last added error. More... | |
void | addError (const std::string &msg, const std::string &filename, Idx line, Idx col) |
Adds an error. More... | |
void | addWarning (const std::string &msg, const std::string &filename, Idx line, Idx col) |
Adds a warning. More... | |
void | addException (const std::string &msg, const std::string &filename) |
Add an exception. More... | |
Size | count () const |
Returns the number of errors and warnings. More... | |
void | syntheticResults (std::ostream &o) const |
Print errors on output stream. More... | |
void | simpleErrors (std::ostream &o) const |
Print errors on output stream. More... | |
void | simpleErrorsAndWarnings (std::ostream &o) const |
Print errors on output stream. More... | |
void | elegantErrors (std::ostream &o) const |
Print errors on output stream. More... | |
void | elegantErrorsAndWarnings (std::ostream &o) const |
Print errors on output stream. More... | |
Coco/R helpers | |
void | Error (const std::wstring &filename, Idx line, Idx col, const wchar_t *msg) |
For adding errors. More... | |
void | Warning (const std::wstring &filename, Idx line, Idx col, const wchar_t *msg) |
For adding warnings. More... | |
void | Exception (const std::wstring &filename, const wchar_t *msg) |
For adding exceptions. More... | |
Class operators | |
ErrorsContainer | operator+ (const ErrorsContainer &cont) const |
Return the sum of two gum::ErrorsContainer. More... | |
ErrorsContainer | operator= (const ErrorsContainer &cont) |
Copy Operator. More... | |
ErrorsContainer | operator+= (const ErrorsContainer &cont) |
Add the content of a gum::ErrorsContainer to this gum::ErrorsContainer. More... | |
This class is used contain and manipulate gum::ParseError.
Definition at line 160 of file errorsContainer.h.
gum::ErrorsContainer::ErrorsContainer | ( | ) |
Class Constructor.
gum::ErrorsContainer::ErrorsContainer | ( | const ErrorsContainer & | cont | ) |
Copy constructor.
cont | The ErrorsContainer to copy. |
INLINE void gum::ErrorsContainer::add | ( | ParseError | error | ) |
Add an error object to the container.
error | The gum::ParseError to add. |
Definition at line 50 of file errorsContainer_inl.h.
References gum::Set< Key, Alloc >::emplace().
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 60 of file errorsContainer_inl.h.
References gum::Set< Key, Alloc >::emplace().
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 76 of file errorsContainer_inl.h.
References gum::Set< Key, Alloc >::emplace().
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 68 of file errorsContainer_inl.h.
References gum::Set< Key, Alloc >::emplace().
INLINE Size gum::ErrorsContainer::count | ( | ) | const |
Returns the number of errors and warnings.
Definition at line 81 of file errorsContainer_inl.h.
References gum::Set< Key, Alloc >::emplace().
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. |
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. |
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 34 of file errorsContainer_inl.h.
References gum::Set< Key, Alloc >::emplace().
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 45 of file errorsContainer_inl.h.
References gum::Set< Key, Alloc >::emplace().
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. |
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. |
ErrorsContainer gum::ErrorsContainer::operator= | ( | const ErrorsContainer & | cont | ) |
Copy Operator.
cont | The gum::ErrorsContainer to copy. |
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 84 of file errorsContainer_inl.h.
References gum::Set< Key, Alloc >::emplace().
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 40 of file errorsContainer_inl.h.
References gum::Set< Key, Alloc >::emplace().
Size gum::ErrorsContainer::error_count |
Number of errors detected.
Definition at line 166 of file errorsContainer.h.
|
mutableprivate |
The list of gum::ParseError contained in this gum::ErrorsContainer.
Definition at line 162 of file errorsContainer.h.
Size gum::ErrorsContainer::warning_count |
Definition at line 169 of file errorsContainer.h.