MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
vrlmod::DtThreadedObject Class Reference
+ 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.
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

vrlmod::DtThreadedObject::DtThreadedObject ( )

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

Warning
setRunnableObject must be called before starting.
vrlmod::DtThreadedObject::DtThreadedObject ( DtRunnableSP  ptr)

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

Exceptions
DtInvalidInput
virtual vrlmod::DtThreadedObject::~DtThreadedObject ( )
virtual
Warning
destructor calls blocking function: stop(true)
vrlmod::DtThreadedObject::DtThreadedObject ( const DtThreadedObject )
protected

Make Non-copiable.

Member Function Documentation

void vrlmod::DtThreadedObject::join ( )

Block the current thread until the threaded object stops running.

Exceptions
DtThreadNotStarted
DtThreadedObject& vrlmod::DtThreadedObject::operator= ( const DtThreadedObject )
protected
DtRunnableSP vrlmod::DtThreadedObject::runnableObject ( ) const

Gets the runnable object.

bool vrlmod::DtThreadedObject::running ( ) const

Is the thread running.

void vrlmod::DtThreadedObject::setRunnableObject ( DtRunnableSP  newObject)

Set the runnable object to be run.

Exceptions
DtThreadAlreadyRunning
void vrlmod::DtThreadedObject::setRunning ( bool  value)
protected

Change the running state.

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.

Exceptions
DtInvalidInput
DtThreadAlreadyRunning
DtThreadNotStarted
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.

Member Data Documentation

MAKRti::DtMutex vrlmod::DtThreadedObject::myMutex
mutableprotected
DtRunnableSP vrlmod::DtThreadedObject::myObject
protected
bool vrlmod::DtThreadedObject::myRunningFlag
protected
MAKRti::DtThread* vrlmod::DtThreadedObject::myThread
protected

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

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)