28 #ifndef GUM_ERRORS_CONTAINERS_H 29 #define GUM_ERRORS_CONTAINERS_H 35 #include <agrum/agrum.h> 37 #include <agrum/tools/core/cocoR/common.h> 62 ParseError(
bool is_error,
const std::string& msg, Idx line);
72 ParseError(
bool is_error,
73 const std::string& msg,
74 const std::string& filename,
87 ParseError(
bool is_error,
88 const std::string& msg,
89 const std::string& filename,
90 const std::string& code,
98 ParseError(
const ParseError& cont);
111 ParseError operator=(
const ParseError& cont);
132 std::string filename;
135 mutable std::string code;
141 std::string toString()
const;
149 std::string toElegantString()
const;
160 class ErrorsContainer {
162 mutable std::vector< ParseError > errors;
185 ErrorsContainer(
const ErrorsContainer& cont);
197 void add(ParseError error);
205 ParseError error(Idx i)
const;
212 ParseError last()
const;
221 void addError(
const std::string& msg,
222 const std::string& filename,
233 void addWarning(
const std::string& msg,
234 const std::string& filename,
243 void addException(
const std::string& msg,
const std::string& filename);
255 void syntheticResults(std::ostream& o)
const;
261 void simpleErrors(std::ostream& o)
const;
267 void simpleErrorsAndWarnings(std::ostream& o)
const;
273 void elegantErrors(std::ostream& o)
const;
279 void elegantErrorsAndWarnings(std::ostream& o)
const;
295 Error(
const std::wstring& filename, Idx line, Idx col,
const wchar_t* msg);
304 void Warning(
const std::wstring& filename,
314 void Exception(
const std::wstring& filename,
const wchar_t* msg);
327 ErrorsContainer operator+(
const ErrorsContainer& cont)
const;
334 ErrorsContainer operator=(
const ErrorsContainer& cont);
342 ErrorsContainer operator+=(
const ErrorsContainer& cont);
351 #ifndef GUM_NO_INLINE 352 # include <agrum/tools/core/errorsContainer_inl.h>