VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtThreadedObject Class Reference
+ Collaboration diagram for DtThreadedObject:

Public Member Functions

 DtThreadedObject ()
 Constructor, pass it owner ship of a DtThreadable object setRunnableObject must be called before starting.
 DtThreadedObject (DtRunnableSP ptr)
 Constructor, pass it owner ship of a DtThreadable object.
virtual ~DtThreadedObject ()
 Warning, destructor calls blocking function: stop(true)
void start ()
 Starts the thread running, calls its 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 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
DtThreadmyThread
DtMutex myMutex

Constructor & Destructor Documentation

DtThreadedObject::DtThreadedObject ( )

Constructor, pass it owner ship of a DtThreadable object setRunnableObject must be called before starting.

DtThreadedObject::DtThreadedObject ( DtRunnableSP  ptr)

Constructor, pass it owner ship of a DtThreadable object.

Exceptions
DtInvalidInput
virtual DtThreadedObject::~DtThreadedObject ( )
virtual

Warning, destructor calls blocking function: stop(true)

DtThreadedObject::DtThreadedObject ( const DtThreadedObject )
protected

Make Non-copiable.

Member Function Documentation

void DtThreadedObject::join ( )

Block the current thread until the threaded object stops running.

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

Gets the runnable object.

bool DtThreadedObject::running ( ) const

Is the thread running.

void DtThreadedObject::setRunnableObject ( DtRunnableSP  newObject)

Set the runnable object to be run.

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

Change the running state.

void DtThreadedObject::start ( )

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

Exceptions
DtInvalidInput
DtThreadAlreadyRunning
DtThreadNotStarted
void DtThreadedObject::stop ( bool  block)

Signal the object to stop, it may not respond Optionally block execution until it stops Calls the DtThreadable run method.

Member Data Documentation

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

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

Document ID: Generated on Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)