Cppcheck
Public Member Functions | Private Attributes | List of all members
SyncLogForwarder Class Reference
Inheritance diagram for SyncLogForwarder:
ErrorLogger

Public Member Functions

 SyncLogForwarder (ThreadExecutor &threadExecutor, ErrorLogger &errorLogger)
 
void reportOut (const std::string &outmsg, Color c) override
 Information about progress is directed here. More...
 
void reportErr (const ErrorMessage &msg) override
 Information about found errors and warnings is directed here. More...
 
void reportStatus (std::size_t fileindex, std::size_t filecount, std::size_t sizedone, std::size_t sizetotal)
 
- Public Member Functions inherited from ErrorLogger
 ErrorLogger ()=default
 
virtual ~ErrorLogger ()=default
 
virtual void reportProgress (const std::string &filename, const char stage[], const std::size_t value)
 Report progress to client. More...
 

Private Attributes

std::mutex mReportSync
 
ThreadExecutormThreadExecutor
 
ErrorLoggermErrorLogger
 

Additional Inherited Members

- Static Public Member Functions inherited from ErrorLogger
static std::string callStackToString (const std::list< ErrorMessage::FileLocation > &callStack)
 
static std::string toxml (const std::string &str)
 Convert XML-sensitive characters into XML entities. More...
 
static std::string plistHeader (const std::string &version, const std::vector< std::string > &files)
 
static std::string plistData (const ErrorMessage &msg)
 
static const char * plistFooter ()
 
static bool isCriticalErrorId (const std::string &id)
 

Detailed Description

Definition at line 49 of file threadexecutor.cpp.

Constructor & Destructor Documentation

◆ SyncLogForwarder()

SyncLogForwarder::SyncLogForwarder ( ThreadExecutor threadExecutor,
ErrorLogger errorLogger 
)
inlineexplicit

Definition at line 52 of file threadexecutor.cpp.

Member Function Documentation

◆ reportErr()

void SyncLogForwarder::reportErr ( const ErrorMessage msg)
inlineoverridevirtual

Information about found errors and warnings is directed here.

Override this to receive the errormessages.

Parameters
msgLocation and other information about the found error.

Implements ErrorLogger.

Definition at line 62 of file threadexecutor.cpp.

References Executor::hasToLog(), mErrorLogger, mReportSync, mThreadExecutor, and ErrorLogger::reportErr().

◆ reportOut()

void SyncLogForwarder::reportOut ( const std::string &  outmsg,
Color  c 
)
inlineoverridevirtual

Information about progress is directed here.

Override this to receive the progress messages.

Parameters
outmsgMessage to show e.g. "Checking main.cpp..."

Implements ErrorLogger.

Definition at line 55 of file threadexecutor.cpp.

References mErrorLogger, mReportSync, and ErrorLogger::reportOut().

◆ reportStatus()

void SyncLogForwarder::reportStatus ( std::size_t  fileindex,
std::size_t  filecount,
std::size_t  sizedone,
std::size_t  sizetotal 
)
inline

Definition at line 70 of file threadexecutor.cpp.

References mReportSync, mThreadExecutor, and Executor::reportStatus().

Referenced by ThreadData::status().

Member Data Documentation

◆ mErrorLogger

ErrorLogger& SyncLogForwarder::mErrorLogger
private

Definition at line 78 of file threadexecutor.cpp.

Referenced by reportErr(), and reportOut().

◆ mReportSync

std::mutex SyncLogForwarder::mReportSync
private

Definition at line 76 of file threadexecutor.cpp.

Referenced by reportErr(), reportOut(), and reportStatus().

◆ mThreadExecutor

ThreadExecutor& SyncLogForwarder::mThreadExecutor
private

Definition at line 77 of file threadexecutor.cpp.

Referenced by reportErr(), and reportStatus().


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