YANE-Framework Tutorial 1.1.0
Public Member Functions | Protected Member Functions | Private Attributes

ComputationThread Class Reference

ComputationThread class. More...

#include <computationthread.h>

Inheritance diagram for ComputationThread:
[legend]
Collaboration diagram for ComputationThread:
[legend]

List of all members.

Public Member Functions

 ComputationThread (const std::string &name, yane::Utils::DebugMaster *dm, yane::Utils::Mutex *mutex, int *sum, int *iter)
 Constructor.
 ~ComputationThread ()
 Destructor.

Protected Member Functions

virtual void run ()
 Computation function.

Private Attributes

yane::Utils::Mutex_mutex

Detailed Description

This class extends thread and creates a thread to compute.

Definition at line 31 of file computationthread.h.


Constructor & Destructor Documentation

ComputationThread::ComputationThread ( const std::string &  name,
yane::Utils::DebugMaster dm,
yane::Utils::Mutex mutex,
int *  sum,
int *  iter 
)

Create new computationthread object.

Parameters:
nameName of the thread
dmDebugmaster which is used.
mutexMutex that locks the sum and iter variable.
sumPointer to a int-variable the thread is working on.
iterPointer to a int-variable the thread is working on.

Definition at line 22 of file computationthread.cpp.

ComputationThread::~ComputationThread ( )

Called when deleting the object.

Definition at line 33 of file computationthread.cpp.


Member Function Documentation

void ComputationThread::run ( ) [protected, virtual]

This function is called when a new thread is started.

Implements yane::Utils::Thread.

Definition at line 38 of file computationthread.cpp.

Here is the call graph for this function:


Member Data Documentation

< Variables needed for the computation.

Definition at line 62 of file computationthread.h.