libNuML 1.1.1
Library for reading / writing NuML documents
NUMLErrorLog.h
Go to the documentation of this file.
1/*
2* ****************************************************************************
3* This file is part of libNUML. Please visit http://code.google.com/p/numl/for more
4* information about NUML, and the latest version of libNUML.
5* Copyright (c) 2013 The University of Manchester.
6*
7* This library is free software; you can redistribute it and/or modify it
8* under the terms of the GNU Lesser General Public License as published
9* by the Free Software Foundation. A copy of the license agreement is
10* provided in the file named "LICENSE.txt" included with this software
11* distribution and also available online as http://www.gnu.org/licenses/lgpl.html
12*
13* Contributors:
14* Joseph O. Dada, The University of Manchester - initial API and implementation
15* ****************************************************************************
16*/
17
24#ifndef NUMLErrorLog_h
25#define NUMLErrorLog_h
26
27
28#include <numl/common/extern.h>
29#include <sbml/xml/XMLError.h>
30#include <sbml/xml/XMLErrorLog.h>
31#include <numl/NUMLError.h>
32
33
34#ifdef __cplusplus
35
36LIBNUML_CPP_NAMESPACE_BEGIN
37
38class LIBNUML_EXTERN NUMLErrorLog : public LIBSBML_CPP_NAMESPACE_QUALIFIER XMLErrorLog
39{
40public:
41
55 const NUMLError* getError (unsigned int n) const;
56
57
80 unsigned int getNumFailsWithSeverity(unsigned int severity);
81
82
86 NUMLErrorLog ();
87
88
92 virtual ~NUMLErrorLog ();
93
94
128 void logError
129 (
130 const unsigned int errorId = 0
131 , const unsigned int level = NUML_DEFAULT_LEVEL
132 , const unsigned int version = NUML_DEFAULT_VERSION
133 , const std::string& details = ""
134 , const unsigned int line = 0
135 , const unsigned int column = 0
136 , const unsigned int severity = LIBNUML_SEV_ERROR
137 , const unsigned int category = LIBNUML_CAT_NUML
138 );
139
140
146 void add (const NUMLError& error);
147
148
155 void add (const std::list<NUMLError>& errors);
156
157
166 void remove (const unsigned int errorId);
167
168
169};
170
171LIBNUML_CPP_NAMESPACE_END
172
173#endif /* __cplusplus */
174#endif /* NUMLErrorLog_h */
@ LIBNUML_SEV_ERROR
Definition: NUMLError.h:203
@ LIBNUML_CAT_NUML
General NUML error not falling into another category below.
Definition: NUMLError.h:149
LIBNUML_CPP_NAMESPACE_BEGIN const unsigned int NUML_DEFAULT_LEVEL
Definition: NUMLNamespaces.h:41
const unsigned int NUML_DEFAULT_VERSION
Definition: NUMLNamespaces.h:42
contains all error information collected
Definition: NUMLError.h:235
the error log containing all errors / warnings encountered
Definition: NUMLErrorLog.h:39
#define LIBNUML_EXTERN
Begin svn Header.
Definition: extern.h:104