Cppcheck
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Standards Struct Reference

This is just a container for standards settings. More...

#include <standards.h>

Public Types

enum  Language { None , C , CPP }
 
enum  cstd_t {
  C89 , C99 , C11 , C17 ,
  C23 , CLatest = C23
}
 C code standard. More...
 
enum  cppstd_t {
  CPP03 , CPP11 , CPP14 , CPP17 ,
  CPP20 , CPP23 , CPPLatest = CPP23
}
 C++ code standard. More...
 

Public Member Functions

bool setC (const std::string &str)
 
std::string getC () const
 
bool setCPP (std::string str)
 
std::string getCPP () const
 

Static Public Member Functions

static cstd_t getC (const std::string &std)
 
static std::string getCPP (cppstd_t std)
 
static cppstd_t getCPP (const std::string &std)
 

Public Attributes

enum Standards::cstd_t c = CLatest
 
enum Standards::cppstd_t cpp = CPPLatest
 
std::string stdValue
 –std value given on command line More...
 

Detailed Description

This is just a container for standards settings.

This struct contains all possible standards that cppcheck recognize.

Definition at line 36 of file standards.h.

Member Enumeration Documentation

◆ cppstd_t

C++ code standard.

Enumerator
CPP03 
CPP11 
CPP14 
CPP17 
CPP20 
CPP23 
CPPLatest 

Definition at line 43 of file standards.h.

◆ cstd_t

C code standard.

Enumerator
C89 
C99 
C11 
C17 
C23 
CLatest 

Definition at line 40 of file standards.h.

◆ Language

Enumerator
None 
CPP 

Definition at line 37 of file standards.h.

Member Function Documentation

◆ getC() [1/2]

std::string Standards::getC ( ) const
inline

Definition at line 64 of file standards.h.

References c, C11, C17, C23, C89, and C99.

Referenced by CppCheck::checkClang(), CppCheck::checkFile(), createDUI(), and CmdLineParser::parseFromArgs().

◆ getC() [2/2]

static cstd_t Standards::getC ( const std::string &  std)
inlinestatic

Definition at line 79 of file standards.h.

References C11, C17, C23, C89, C99, and CLatest.

◆ getCPP() [1/3]

std::string Standards::getCPP ( ) const
inline

◆ getCPP() [2/3]

static cppstd_t Standards::getCPP ( const std::string &  std)
inlinestatic

Definition at line 123 of file standards.h.

References CPP03, CPP11, CPP14, CPP17, CPP20, CPP23, and CPPLatest.

◆ getCPP() [3/3]

static std::string Standards::getCPP ( cppstd_t  std)
inlinestatic

Definition at line 106 of file standards.h.

References CPP03, CPP11, CPP14, CPP17, CPP20, and CPP23.

◆ setC()

bool Standards::setC ( const std::string &  str)
inline

◆ setCPP()

bool Standards::setCPP ( std::string  str)
inline

Member Data Documentation

◆ c

enum Standards::cstd_t Standards::c = CLatest

◆ cpp

enum Standards::cppstd_t Standards::cpp = CPPLatest

◆ stdValue

std::string Standards::stdValue

–std value given on command line

Definition at line 46 of file standards.h.

Referenced by CppCheck::checkClang(), setC(), and setCPP().


The documentation for this struct was generated from the following file: