MAK RTIspy API Documentation for HLA 1.3
Public Member Functions | Protected Member Functions | Protected Attributes
vrlmod::DtThreadedObject Class Reference
+ Collaboration diagram for vrlmod::DtThreadedObject:

List of all members.

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.
DtThreadedObjectoperator= (const DtThreadedObject &)
void setRunning (bool value)
 Change the running state.

Protected Attributes

bool myRunningFlag
DtRunnableSP myObject
MAKRti::DtThread * myThread
MAKRti::DtMutex myMutex

Constructor & Destructor Documentation

Constructor, pass it owner ship of a MAKRti::DtThreadable object.

Warning:
setRunnableObject must be called before starting.

Constructor, pass it owner ship of a MAKRti::DtThreadable object.

Exceptions:
DtInvalidInput
Warning:
destructor calls blocking function: stop(true)

References join(), myThread, running(), and stop().

Make Non-copiable.


Member Function Documentation

Block the current thread until the threaded object stops running.

Exceptions:
DtThreadNotStarted

References myThread, running(), and setRunning().

Referenced by ~DtThreadedObject().

DtThreadedObject& vrlmod::DtThreadedObject::operator= ( const DtThreadedObject ) [protected]

Gets the runnable object.

References myMutex, and myObject.

Is the thread running.

References myMutex, and myRunningFlag.

Referenced by join(), setRunnableObject(), start(), stop(), and ~DtThreadedObject().

Set the runnable object to be run.

Exceptions:
DtThreadAlreadyRunning

References myMutex, myObject, and running().

void vrlmod::DtThreadedObject::setRunning ( bool  value) [protected]

Change the running state.

References myMutex, and myRunningFlag.

Referenced by join(), start(), and stop().

Starts the thread running, calls its MAKRti::DtThreadable run method A thread can be started again if it is finished running.

Exceptions:
DtInvalidInput
DtThreadAlreadyRunning
DtThreadNotStarted

References DtTHROW_PROPAGATE, myMutex, myObject, myThread, running(), and setRunning().

Referenced by DtFedExec::createDistributor().

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().


Member Data Documentation

MAKRti::DtMutex vrlmod::DtThreadedObject::myMutex [mutable, protected]

Referenced by running(), and setRunning().

MAKRti::DtThread* vrlmod::DtThreadedObject::myThread [protected]

Referenced by join(), start(), stop(), and ~DtThreadedObject().


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

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)