MetriVis | Overview | Download | User Manual | Development |
Reference | Overview | Design Documentation | Reference Backend | Reference Frontend |
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_ |
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
.
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
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 }
Implements metrivis::Thread.