Cppcheck
Public Types | Static Public Member Functions | List of all members
Severity Class Reference

enum class for severity. More...

#include <errortypes.h>

Public Types

enum  SeverityType {
  none , error , warning , style ,
  performance , portability , information , debug
}
 Message severities. More...
 

Static Public Member Functions

static std::string toString (SeverityType severity)
 
static SeverityType fromString (const std::string &severity)
 

Detailed Description

enum class for severity.

Used when reporting errors.

Definition at line 63 of file errortypes.h.

Member Enumeration Documentation

◆ SeverityType

Message severities.

Enumerator
none 

No severity (default value).

error 

Programming error.

This indicates severe error like memory leak etc. The error is certain.

warning 

Warning.

Used for dangerous coding style that can cause severe runtime errors. For example: forgetting to initialize a member variable in a constructor.

style 

Style warning.

Used for general code cleanup recommendations. Fixing these will not fix any bugs but will make the code easier to maintain. For example: redundant code, unreachable code, etc.

performance 

Performance warning.

Not an error as is but suboptimal code and fixing it probably leads to faster performance of the compiled code.

portability 

Portability warning.

This warning indicates the code is not properly portable for different platforms and bitnesses (32/64 bit). If the code is meant to compile in different platforms and bitnesses these warnings should be fixed.

information 

Checking information.

Information message about the checking (process) itself. These messages inform about header files not found etc issues that are not errors in the code but something user needs to know.

debug 

Debug message.

Debug-mode message useful for the developers.

Definition at line 68 of file errortypes.h.

Member Function Documentation

◆ fromString()

Severity::SeverityType Severity::fromString ( const std::string &  severity)
static

◆ toString()

std::string Severity::toString ( Severity::SeverityType  severity)
static

The documentation for this class was generated from the following files: