TerraLib 4.1
TeThread Class Reference

#include <TeThread.h>

Inheritance diagram for TeThread:
TePDICorrelationMatching::CorrThread TePDISAMClassifier::SegThread TeThreadFunctor

List of all members.

Public Member Functions

 TeThread ()
 Default constructor.
virtual ~TeThread ()
 Virtual destructor.
bool start ()
 Starts the current thread.
TeThreadStatus getStatus () const
 Gets the current thread status.
TeThreadPriority getPriority () const
 Returns the current thread priority.
bool setPriority (TeThreadPriority newPriority)
 Changes the current thread priority.
bool waitToFinish ()
 Block the current thread until the thread handled by this instance terminates.

Protected Member Functions

virtual void run ()=0
 Thread execution method: this method will be called when the thread starts. Subclasses must reimplement it.

Protected Attributes

volatile TeThreadStatus threadStatus_
 The current thread status variable.
volatile TeThreadPriority threadCurrPriority_
 The current thread priority.

Constructor & Destructor Documentation

TeThread::TeThread ( )

Default constructor.

TeThread::~TeThread ( ) [virtual]

Virtual destructor.


Member Function Documentation

TeThreadPriority TeThread::getPriority ( ) const

Returns the current thread priority.

Returns:
The current thread priority.
TeThreadStatus TeThread::getStatus ( ) const

Gets the current thread status.

Returns:
The current thread status.
virtual void TeThread::run ( ) [protected, pure virtual]

Thread execution method: this method will be called when the thread starts. Subclasses must reimplement it.

Implemented in TePDICorrelationMatching::CorrThread, TePDISAMClassifier::SegThread, and TeThreadFunctor.

bool TeThread::setPriority ( TeThreadPriority  newPriority)

Changes the current thread priority.

Parameters:
newPriorityThe new thread priority.
Returns:
true if OK, false on errors.
bool TeThread::start ( )

Starts the current thread.

Returns:
true if OK, false on errors.
bool TeThread::waitToFinish ( )

Block the current thread until the thread handled by this instance terminates.

Returns:
true if OK, false if wait failed.

Member Data Documentation

The current thread priority.

The current thread status variable.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines