17 #ifndef __OMNETPP_NEDXML_ERRORSTORE_H 18 #define __OMNETPP_NEDXML_ERRORSTORE_H 47 std::vector<Entry> entries;
51 void doAdd(
ASTNode *context,
const char *loc,
int severity,
const char *message);
68 void addError(
ASTNode *context,
const char *messagefmt, ...);
73 void addError(
const char *location,
const char *messagefmt, ...);
78 void addWarning(
ASTNode *context,
const char *messagefmt, ...);
83 void addWarning(
const char *location,
const char *messagefmt, ...);
88 void add(
ASTNode *context,
int severity,
const char *messagefmt, ...);
93 void add(
const char *location,
int severity,
const char *messagefmt, ...);
98 bool empty()
const {
return entries.empty();}
108 bool containsError()
const;
117 const char *errorSeverity(
int i)
const;
118 int errorSeverityCode(
int i)
const;
119 const char *errorLocation(
int i)
const;
120 ASTNode *errorContext(
int i)
const;
121 const char *errorText(
int i)
const;
128 int findFirstErrorFor(
ASTNode *node,
int startIndex)
const;
133 static const char *severityName(
int severity);
137 #define INTERNAL_ERROR0(context,msg) NedInternalError(__FILE__,__LINE__,context,msg) 138 #define INTERNAL_ERROR1(context,msg,arg1) NedInternalError(__FILE__,__LINE__,context,msg,arg1) 139 #define INTERNAL_ERROR2(context,msg,arg1,arg2) NedInternalError(__FILE__,__LINE__,context,msg,arg1,arg2) 140 #define INTERNAL_ERROR3(context,msg,arg1,arg2,arg3) NedInternalError(__FILE__,__LINE__,context,msg,arg1,arg2,arg3) 147 void NedInternalError(
const char *file,
int line, ASTNode *context,
const char *messagefmt, ...);
#define NEDXML_API
Definition: nedxmldefs.h:31
bool empty() const
Definition: errorstore.h:98
~ErrorStore()
Definition: errorstore.h:58
void clear()
Definition: errorstore.h:113
Definition: errorstore.h:32
ProblemSeverity
Definition: errorstore.h:32
Definition: errorstore.h:32
Definition: astbuilder.h:25
void setPrintToStderr(bool p)
Definition: errorstore.h:63
Definition: errorstore.h:32
ErrorStore()
Definition: errorstore.h:57
int numMessages() const
Definition: errorstore.h:103
Definition: errorstore.h:37
void NedInternalError(const char *file, int line, ASTNode *context, const char *messagefmt,...)