![]() |
MAK RTIspy API Documentation for HLA Evolved
|
Collaboration diagram for vrlmod::DtThreadedObject:Public Member Functions | |
| DtThreadedObject () | |
| Constructor, pass it owner ship of a MAKRti::DtThreadable object. | |
| DtThreadedObject (DtRunnableSP ptr) | |
| Constructor, pass it owner ship of a MAKRti::DtThreadable object. | |
| virtual | ~DtThreadedObject () |
| void | start () |
| Starts the thread running, calls its MAKRti::DtThreadable run method A thread can be started again if it is finished running. | |
| void | join () |
| Block the current thread until the threaded object stops running. | |
| void | stop (bool block) |
| Signal the object to stop, it may not respond Optionally block execution until it stops Calls the MAKRti::DtThreadable run method. | |
| bool | running () const |
| Is the thread running. | |
| void | setRunnableObject (DtRunnableSP newObject) |
| Set the runnable object to be run. | |
| DtRunnableSP | runnableObject () const |
| Gets the runnable object. | |
Protected Member Functions | |
| DtThreadedObject (const DtThreadedObject &) | |
| Make Non-copiable. | |
| DtThreadedObject & | operator= (const DtThreadedObject &) |
| void | setRunning (bool value) |
| Change the running state. | |
Protected Attributes | |
| bool | myRunningFlag |
| DtRunnableSP | myObject |
| MAKRti::DtThread * | myThread |
| MAKRti::DtMutex | myMutex |
Constructor, pass it owner ship of a MAKRti::DtThreadable object.
Constructor, pass it owner ship of a MAKRti::DtThreadable object.
| DtInvalidInput |
| vrlmod::DtThreadedObject::~DtThreadedObject | ( | ) | [virtual] |
| vrlmod::DtThreadedObject::DtThreadedObject | ( | const DtThreadedObject & | ) | [protected] |
Make Non-copiable.
| void vrlmod::DtThreadedObject::join | ( | ) |
Block the current thread until the threaded object stops running.
| DtThreadNotStarted |
References myThread, running(), and setRunning().
Referenced by ~DtThreadedObject().
| DtThreadedObject& vrlmod::DtThreadedObject::operator= | ( | const DtThreadedObject & | ) | [protected] |
| bool vrlmod::DtThreadedObject::running | ( | ) | const |
Is the thread running.
References myMutex, and myRunningFlag.
Referenced by join(), setRunnableObject(), start(), stop(), and ~DtThreadedObject().
| void vrlmod::DtThreadedObject::setRunnableObject | ( | DtRunnableSP | newObject | ) |
| void vrlmod::DtThreadedObject::setRunning | ( | bool | value | ) | [protected] |
Change the running state.
References myMutex, and myRunningFlag.
| void vrlmod::DtThreadedObject::start | ( | ) |
Starts the thread running, calls its MAKRti::DtThreadable run method A thread can be started again if it is finished running.
| DtInvalidInput | |
| DtThreadAlreadyRunning | |
| DtThreadNotStarted |
References DtTHROW_PROPAGATE, myMutex, myObject, myThread, running(), and setRunning().
Referenced by DtFedExec::createDistributor().
| void vrlmod::DtThreadedObject::stop | ( | bool | block | ) |
Signal the object to stop, it may not respond Optionally block execution until it stops Calls the MAKRti::DtThreadable run method.
References myMutex, myThread, running(), and setRunning().
Referenced by DtFedExec::destroyDistributor(), and ~DtThreadedObject().
MAKRti::DtMutex vrlmod::DtThreadedObject::myMutex [mutable, protected] |
Referenced by runnableObject(), running(), setRunnableObject(), setRunning(), start(), and stop().
DtRunnableSP vrlmod::DtThreadedObject::myObject [protected] |
Referenced by runnableObject(), setRunnableObject(), and start().
bool vrlmod::DtThreadedObject::myRunningFlag [protected] |
Referenced by running(), and setRunning().
MAKRti::DtThread* vrlmod::DtThreadedObject::myThread [protected] |
Referenced by join(), start(), stop(), and ~DtThreadedObject().