MetriVis Overview | Download | User Manual | Development
Reference Overview | Design Documentation | Reference Backend | Reference Frontend

MyThread Class Reference

An implementation of a Thread. More...

Inheritance diagram for MyThread:

metrivis::Thread

Public Member Functions

virtual int Init ()
 Initializes the Thread. Default implementation sets internal state.
virtual int Uninit ()
 Initializes the Thread. Default implementation sets internal state.
int count () const

Protected Member Functions

virtual void Run ()
 Threading code. Will be run after thread start.

Private Attributes

int count_

Detailed Description

An implementation of a Thread.

Member Function Documentation

virtual int MyThread::Init (  )  [inline, virtual]

Initializes the Thread. Default implementation sets internal state.

Initializes the Thread.

Initializes the Thread class. The default implementation of this function just sets internal state informations to the initialized state. Call this function always or set the Thread::internal_state_ manually to INITIALIZED.

Attention:
See header file for overview.

Reimplemented from metrivis::Thread.

virtual int MyThread::Uninit (  )  [inline, virtual]

Initializes the Thread. Default implementation sets internal state.

Uninitializes the Thread.

Uninitializes the Thread class. The default implementation of this function just sets internal state informations to the initialized state. Call this function always or set the Thread::internal_state_ manually to

UNUSED 
.

Attention:
See header file for overview.

Reimplemented from metrivis::Thread.

virtual void MyThread::Run (  )  [inline, protected, virtual]

Threading code. Will be run after thread start.

Is executed threaded after call to Thread::Start. The function should contain non blocking functions so that the thread may terminate after Thread::Stop is called. A typical main loop may look like this:

 while( running_) {
  //do some stuff
 }
The Thread::is_running_ variable will be set by Thread::Start rsp. Thread::Stop function.

Implements metrivis::Thread.


The documentation for this class was generated from the following file:
Generated on Fri Feb 29 16:47:20 2008 for MetriVis by  doxygen 1.5.3