foobar2000 SDK  2015-08-03
Public Member Functions | Protected Member Functions | Private Member Functions
CVerySimpleThreadabstract

#include <fb2k_threads.h>

+ Inheritance diagram for CVerySimpleThread:

Public Member Functions

bool IsThreadActive () const
 
void StartThread (int priority)
 
void StartThread ()
 
void WaitTillThreadDone ()
 

Protected Member Functions

 CVerySimpleThread ()
 
virtual void ThreadProc ()=0
 

Private Member Functions

void threadProc ()
 
- Private Member Functions inherited from pfc::thread
 thread ()
 
 ~thread ()
 
int getPriority ()
 
bool isActive () const
 
 PFC_DECLARE_EXCEPTION (exception_creation, exception,"Could not create thread")
 
pthread_t posixThreadHandle ()
 
void setPriority (int priority)
 
void start ()
 
void startWithPriority (int priority)
 
void waitTillDone ()
 
void winStart (int priority, DWORD *outThreadID)
 
HANDLE winThreadHandle ()
 

Additional Inherited Members

- Static Private Member Functions inherited from pfc::thread
static int currentPriority ()
 

Detailed Description

IMPORTANT: all classes derived from CVerySimpleThread must call WaitTillThreadDone() in their destructor, to avoid object destruction during a virtual function call!

Definition at line 6 of file fb2k_threads.h.

Constructor & Destructor Documentation

CVerySimpleThread::CVerySimpleThread ( )
inlineprotected

Definition at line 22 of file fb2k_threads.h.

22 {}

Member Function Documentation

bool CVerySimpleThread::IsThreadActive ( ) const
inline

Definition at line 15 of file fb2k_threads.h.

15  {
16  return this->pfc::thread::isActive();
17  }
bool isActive() const
Definition: threads.cpp:70
void CVerySimpleThread::StartThread ( int  priority)
inline

Definition at line 8 of file fb2k_threads.h.

8  {
9  this->pfc::thread::startWithPriority( priority );
10  }
void startWithPriority(int priority)
Definition: threads.cpp:86
void CVerySimpleThread::StartThread ( )
inline

Definition at line 11 of file fb2k_threads.h.

11  {
13  }
static int currentPriority()
Definition: threads.cpp:106
virtual void CVerySimpleThread::ThreadProc ( )
protectedpure virtual
void CVerySimpleThread::threadProc ( )
inlineprivatevirtual

Reimplemented from pfc::thread.

Definition at line 26 of file fb2k_threads.h.

26  {
27  this->ThreadProc();
28  }
virtual void ThreadProc()=0
void CVerySimpleThread::WaitTillThreadDone ( )
inline

Definition at line 18 of file fb2k_threads.h.

18  {
20  }
void waitTillDone()
Definition: threads.h:21

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