Torc
0.1
|
A Torc specific wrapper around QThread. More...
#include <torcqthread.h>
Signals | |
void | Started (void) |
void | Finished (void) |
Public Member Functions | |
TorcQThread (const QString &Name) | |
virtual | ~TorcQThread ()=default |
virtual void | Start (void)=0 |
virtual void | Finish (void)=0 |
Static Public Member Functions | |
static void | SetMainThread (void) |
static bool | IsMainThread (void) |
static void | InitRand (void) |
Protected Member Functions | |
virtual void | run (void) |
void | Initialise (void) |
Performs Torc specific thread initialisation. More... | |
void | Deinitialise (void) |
Performs Torc specific thread cleanup. More... | |
A Torc specific wrapper around QThread.
TorcQThread performs basic Torc thread setup when a new thread is started (principally logging initialisation and random number seeding) and cleanup (logging and database cleanup) when a thread is exiting.
Subclass TorcQThread and reimplement Start and Finish to add additional code that will be executed in the new thread after initialisation and just before exiting respectively.
To trigger code in other objects, use the TorcQThread specific Started and Finished signals (instead of 'started' and 'finished', as provided by QThread).
Definition at line 7 of file torcqthread.h.
|
explicit |
Definition at line 64 of file torcqthread.cpp.
|
virtualdefault |
|
protected |
Performs Torc specific thread cleanup.
Definition at line 90 of file torcqthread.cpp.
|
pure virtual |
|
signal |
|
protected |
Performs Torc specific thread initialisation.
Definition at line 79 of file torcqthread.cpp.
|
static |
Definition at line 59 of file torcqthread.cpp.
|
static |
Definition at line 52 of file torcqthread.cpp.
|
protectedvirtual |
Reimplemented in TorcPiSwitchInputThread, and LoggingThread.
Definition at line 71 of file torcqthread.cpp.
|
static |
Definition at line 45 of file torcqthread.cpp.
|
pure virtual |
|
signal |