Cppcheck
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Private Attributes | List of all members
AnalyzerInformation Class Reference

Analyzer information. More...

#include <analyzerinfo.h>

Public Member Functions

 ~AnalyzerInformation ()
 
void close ()
 Close current TU.analyzerinfo file. More...
 
bool analyzeFile (const std::string &buildDir, const std::string &sourcefile, const std::string &cfg, std::size_t hash, std::list< ErrorMessage > &errors)
 
void reportErr (const ErrorMessage &msg)
 
void setFileInfo (const std::string &check, const std::string &fileInfo)
 

Static Public Member Functions

static void writeFilesTxt (const std::string &buildDir, const std::list< std::string > &sourcefiles, const std::string &userDefines, const std::list< FileSettings > &fileSettings)
 
static std::string getAnalyzerInfoFile (const std::string &buildDir, const std::string &sourcefile, const std::string &cfg)
 

Static Protected Member Functions

static std::string getAnalyzerInfoFileFromFilesTxt (std::istream &filesTxt, const std::string &sourcefile, const std::string &cfg)
 

Private Attributes

std::ofstream mOutputStream
 
std::string mAnalyzerInfoFile
 

Detailed Description

Analyzer information.

Store various analysis information:

The information can be used for various purposes. It allows:

Definition at line 50 of file analyzerinfo.h.

Constructor & Destructor Documentation

◆ ~AnalyzerInformation()

AnalyzerInformation::~AnalyzerInformation ( )

Definition at line 31 of file analyzerinfo.cpp.

References close().

Member Function Documentation

◆ analyzeFile()

bool AnalyzerInformation::analyzeFile ( const std::string &  buildDir,
const std::string &  sourcefile,
const std::string &  cfg,
std::size_t  hash,
std::list< ErrorMessage > &  errors 
)

◆ close()

void AnalyzerInformation::close ( )

Close current TU.analyzerinfo file.

Definition at line 67 of file analyzerinfo.cpp.

References mAnalyzerInfoFile, and mOutputStream.

Referenced by analyzeFile(), CppCheck::checkFile(), and ~AnalyzerInformation().

◆ getAnalyzerInfoFile()

std::string AnalyzerInformation::getAnalyzerInfoFile ( const std::string &  buildDir,
const std::string &  sourcefile,
const std::string &  cfg 
)
static

◆ getAnalyzerInfoFileFromFilesTxt()

std::string AnalyzerInformation::getAnalyzerInfoFileFromFilesTxt ( std::istream &  filesTxt,
const std::string &  sourcefile,
const std::string &  cfg 
)
staticprotected

Definition at line 99 of file analyzerinfo.cpp.

References cfg(), endsWith(), and Path::simplifyPath().

Referenced by getAnalyzerInfoFile().

◆ reportErr()

void AnalyzerInformation::reportErr ( const ErrorMessage msg)

Definition at line 153 of file analyzerinfo.cpp.

References mOutputStream, and ErrorMessage::toXML().

Referenced by CppCheck::reportErr().

◆ setFileInfo()

void AnalyzerInformation::setFileInfo ( const std::string &  check,
const std::string &  fileInfo 
)

Definition at line 159 of file analyzerinfo.cpp.

References mOutputStream.

Referenced by CppCheck::checkNormalTokens().

◆ writeFilesTxt()

void AnalyzerInformation::writeFilesTxt ( const std::string &  buildDir,
const std::list< std::string > &  sourcefiles,
const std::string &  userDefines,
const std::list< FileSettings > &  fileSettings 
)
static

Member Data Documentation

◆ mAnalyzerInfoFile

std::string AnalyzerInformation::mAnalyzerInfoFile
private

Definition at line 66 of file analyzerinfo.h.

Referenced by analyzeFile(), and close().

◆ mOutputStream

std::ofstream AnalyzerInformation::mOutputStream
private

Definition at line 65 of file analyzerinfo.h.

Referenced by analyzeFile(), close(), reportErr(), and setFileInfo().


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