Cppcheck
Signals | Public Member Functions | Protected Types | Protected Attributes
CheckThread Class Reference

Thread to run cppcheck. More...

#include <checkthread.h>

List of all members.

Signals

void Done ()
 cpp checking is done
void FileChecked (const QString &file)

Public Member Functions

 CheckThread (ThreadResult &result)
virtual ~CheckThread ()
void Check (const Settings &settings)
 Set settings for cppcheck.
void run ()
 method that is run in a thread
void stop ()

Protected Types

enum  State { Running, Stopping, Stopped, Ready }
 States for the check thread. More...

Protected Attributes

State mState
 Thread's current execution state.
ThreadResultmResult
CppCheck mCppcheck
 Cppcheck itself.

Detailed Description

Thread to run cppcheck.

Definition at line 36 of file checkthread.h.


Member Enumeration Documentation

enum CheckThread::State [protected]

States for the check thread.

Whole purpose of these states is to allow stopping of the checking. When stopping we say for the thread (Stopping) that stop when current check has been completed. Thread must be stopped cleanly, just terminating thread likely causes unpredictable side-effects.

Enumerator:
Running 

The thread is checking.

Stopping 

The thread will stop after current work.

Stopped 

The thread has been stopped.

Ready 

The thread is ready.

Definition at line 76 of file checkthread.h.


Constructor & Destructor Documentation

Definition at line 25 of file checkthread.cpp.

Definition at line 33 of file checkthread.cpp.


Member Function Documentation

void CheckThread::Check ( const Settings settings)

Set settings for cppcheck.

Parameters:
settingssettings for cppcheck

Definition at line 38 of file checkthread.cpp.

References mCppcheck, and CppCheck::settings().

void CheckThread::Done ( ) [signal]

cpp checking is done

Referenced by run().

void CheckThread::FileChecked ( const QString &  file) [signal]

Referenced by run().

void CheckThread::run ( )

method that is run in a thread

Definition at line 44 of file checkthread.cpp.

References CppCheck::check(), Done(), FileChecked(), ThreadResult::GetNextFile(), mCppcheck, mResult, mState, Ready, Running, and Stopped.

Definition at line 66 of file checkthread.cpp.

References mCppcheck, mState, Stopping, and CppCheck::terminate().


Member Data Documentation

Cppcheck itself.

Definition at line 93 of file checkthread.h.

Referenced by Check(), run(), and stop().

Definition at line 88 of file checkthread.h.

Referenced by run().

Thread's current execution state.

Definition at line 86 of file checkthread.h.

Referenced by run(), and stop().


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