![]() |
VR-Link API Documentation for HLA Evolved
|
Abstract Threading Class Provides a system independent thread object. More...
Collaboration diagram for DtThread:Public Member Functions | |
| DtThread (DtThreadStart *) | |
| Constructor. | |
| virtual | ~DtThread () |
| Destructor. | |
| virtual DtThreadStatus | start () |
| Over-ride run to implement thread execution. | |
| DtThreadStatus | startInCurrentThread () |
| Execute within the current thread ( does not start a new thread ) | |
| void | stop (bool blocking) |
| Signals Thread to stop. | |
| bool | hasStarted () const |
| Has the thread been started. | |
| bool | isRunning () const |
| Is thread still active? This is true once the thread has actually started executing. | |
| DtThreadStatus | join () const |
| Wait for thread to finish (blocking). | |
| DtThreadHandle | threadId () const |
| Get the thread's ID. | |
| void | run () |
Static Public Member Functions | |
| static DtThreadId | GetCurrentThreadHandle () |
| Return a unique id for the current thread (useful for thread-specific mapping) | |
Protected Member Functions | |
| bool | stopped () |
| Has stop() been called? | |
Protected Attributes | |
| DtThreadHandle | myThreadID |
| System Independent Thread Handle. | |
Private Member Functions | |
| DtThread (const DtThread &orig) | |
| Copy Ctor and Assign Op. undefined for threads. | |
| DtThread & | operator= (const DtThread &orig) |
Private Attributes | |
| volatile bool | myTimeToStop |
| Stop Flag. | |
| bool | myRunning |
| Active status Flag. | |
| DtThreadStart * | myThreadStart |
| DtMutex | myMutex |
| Shared lock for protecting critical sections. | |
Abstract Threading Class Provides a system independent thread object.
Constructor.
| virtual DtThread::~DtThread | ( | ) | [virtual] |
Destructor.
| DtThread::DtThread | ( | const DtThread & | orig | ) | [private] |
Copy Ctor and Assign Op. undefined for threads.
| static DtThreadId DtThread::GetCurrentThreadHandle | ( | ) | [static] |
Return a unique id for the current thread (useful for thread-specific mapping)
| bool DtThread::hasStarted | ( | ) | const |
Has the thread been started.
This true for all times after start() has been called including when the thread has stopped on it's own. The running flag will be set to false after a thread has stopped.
| bool DtThread::isRunning | ( | ) | const |
Is thread still active? This is true once the thread has actually started executing.
Immediately after start this will still return false. When
| DtThreadStatus DtThread::join | ( | ) | const |
Wait for thread to finish (blocking).
| void DtThread::run | ( | ) |
| virtual DtThreadStatus DtThread::start | ( | ) | [virtual] |
Over-ride run to implement thread execution.
Execute within the current thread ( does not start a new thread )
| void DtThread::stop | ( | bool | blocking | ) |
Signals Thread to stop.
| bool DtThread::stopped | ( | ) | [protected] |
Has stop() been called?
| DtThreadHandle DtThread::threadId | ( | ) | const [inline] |
Get the thread's ID.
DtMutex DtThread::myMutex [mutable, private] |
Shared lock for protecting critical sections.
bool DtThread::myRunning [private] |
Active status Flag.
DtThreadHandle DtThread::myThreadID [protected] |
System Independent Thread Handle.
DtThreadStart* DtThread::myThreadStart [private] |
volatile bool DtThread::myTimeToStop [private] |
Stop Flag.