57         FileLocation(
const std::string &file, 
int line, 
unsigned int column)
 
   58             : fileIndex(0), line(line), column(column), mOrigFileName(file), mFileName(file) {}
 
   60         FileLocation(
const std::string &file, std::string info, 
int line, 
unsigned int column)
 
   61             : fileIndex(0), line(line), column(column), mOrigFileName(file), mFileName(file), mInfo(std::move(info)) {}
 
   71         std::string getfile(
bool convert = 
true) 
const;
 
   78         std::string getOrigFile(
bool convert = 
true) 
const;
 
   84         void setfile(std::string file);
 
   89         std::string stringify() 
const;
 
  108                  const std::string &msg,
 
  113                  const std::string &msg,
 
  121                  const std::string& msg,
 
  127                  const std::string& msg,
 
  134                  const std::string &msg,
 
  138     explicit ErrorMessage(
const tinyxml2::XMLElement * 
const errmsg);
 
  143     std::string toXML() 
const;
 
  145     static std::string getXMLHeader(std::string productName);
 
  146     static std::string getXMLFooter();
 
  159                          const std::string &templateLocation = 
emptyString) 
const;
 
  161     std::string serialize() 
const;
 
  162     void deserialize(
const std::string &data);
 
  178     void setmsg(
const std::string &msg);
 
  182         return mShortMessage;
 
  187         return mVerboseMessage;
 
  198     static std::string fixInvalidChars(
const std::string& raw);
 
  241     virtual void reportProgress(
const std::string &filename, 
const char stage[], 
const std::size_t value) {
 
  247     static std::string callStackToString(
const std::list<ErrorMessage::FileLocation> &callStack);
 
  254     static std::string toxml(
const std::string &str);
 
  256     static std::string plistHeader(
const std::string &version, 
const std::vector<std::string> &files);
 
  259         return " </array>\r\n" 
  265         return mCriticalErrorIds.count(
id) != 0;
 
  273 std::string 
replaceStr(std::string s, 
const std::string &from, 
const std::string &to);
 
This is an interface, which the class responsible of error logging should implement.
 
static bool isCriticalErrorId(const std::string &id)
 
static const char * plistFooter()
 
virtual void reportErr(const ErrorMessage &msg)=0
Information about found errors and warnings is directed here.
 
virtual ~ErrorLogger()=default
 
static const std::set< std::string > mCriticalErrorIds
 
virtual void reportOut(const std::string &outmsg, Color c=Color::Reset)=0
Information about progress is directed here.
 
virtual void reportProgress(const std::string &filename, const char stage[], const std::size_t value)
Report progress to client.
 
File name and line number.
 
FileLocation(const std::string &file, std::string info, int line, unsigned int column)
 
std::string mOrigFileName
 
FileLocation(const std::string &file, int line, unsigned int column)
 
const std::string & getinfo() const
 
Wrapper for error messages, provided by reportErr()
 
std::string mSymbolNames
symbol names
 
std::string mVerboseMessage
Verbose message.
 
std::size_t hash
Warning hash.
 
const std::string & shortMessage() const
Short message (single line short message)
 
std::string mShortMessage
Short message.
 
const std::string & verboseMessage() const
Verbose message (may be the same as the short message)
 
std::string file0
For GUI rechecking; source file (not header)
 
std::list< FileLocation > callStack
 
const std::string & symbolNames() const
Symbol names.
 
The token list that the TokenList generates is a linked-list of this class.
 
std::string toString(Color c)
 
static const std::string emptyString
 
Severity
enum class for severity.
 
CPPCHECKLIB void substituteTemplateFormatStatic(std::string &templateFormat)
replaces the static parts of the location template
 
std::string replaceStr(std::string s, const std::string &from, const std::string &to)
Replace substring.
 
CPPCHECKLIB void substituteTemplateLocationStatic(std::string &templateLocation)
replaces the static parts of the location template
 
std::list< ErrorPathItem > ErrorPath
 
Simple container to be thrown when internal error is detected.