StThread Class Reference

This class is used to create seperate execution thread. More...

#include <stthread.h>

Inheritance diagram for StThread:

StApplication StUrl StScript StScriptFile List of all members.

Public Member Functions

 StThread ()
virtual ~StThread ()
void start ()
void terminate ()
bool hasFinished () const

Protected Member Functions

virtual void run ()=0

Private Member Functions

void init ()

Static Private Member Functions

static void * startThread (void *)

Private Attributes

pthread_t thread
volatile bool finished

Detailed Description

This class is used to create seperate execution thread.

To create thread, just implement this class in yours and write down your own run() function. This will be code executed in your thread.

To run thread use start() function.


Constructor & Destructor Documentation

StThread::StThread (  ) 

virtual StThread::~StThread (  )  [inline, virtual]


Member Function Documentation

bool StThread::hasFinished (  )  const [inline]

Returns:
true if thread has finished its task.

void StThread::init (  )  [inline, private]

Reimplemented in StApplication, and StUrl.

virtual void StThread::run (  )  [protected, pure virtual]

You must implement this function to make StThread work. Inside should be code that will be executed in thread.

Implemented in StApplication, and StUrl.

void StThread::start (  ) 

Run the thread.

void * StThread::startThread ( void *   )  [static, private]

void StThread::terminate (  ) 

Terminate the thread immediately.


Member Data Documentation

volatile bool StThread::finished [private]

pthread_t StThread::thread [private]


The documentation for this class was generated from the following files:
Generated on Tue Nov 14 21:15:10 2006 for Smart Tools Library by  doxygen 1.4.7