YANE-Framework Tutorial 1.1.0

examples/thread/src/computationthread.h

00001 /***************************************************************************
00002  *                                                                         *
00003  * Copyright (C) 2011 by www.nonlinearmpc.com                              *
00004  *                                                                         *
00005  * Authors:                                                                *
00006  *  Juergen Pannek <juergen.pannek@googlemail.com>                         *
00007  *  Michael Schamel <michael.schamel@uni-bayreuth.de>                      *
00008  *                                                                         *
00009  ***************************************************************************/
00010 
00011 #ifndef COMPUTATIONTHREAD_H
00012 #define COMPUTATIONTHREAD_H
00013 
00014 #include <yane/utils/thread.h>
00015 
00016 namespace yane
00017 {
00018 
00019         namespace Utils
00020         {
00021 
00022                 class DebugMaster;
00023                 class Mutex;
00024         }
00025 }
00026 
00031 class ComputationThread : public yane::Utils::Thread
00032 {
00033         public:
00043                 ComputationThread ( const std::string & name,
00044                         yane::Utils::DebugMaster *dm, yane::Utils::Mutex *mutex,
00045                         int *sum, int *iter );
00046 
00051                 ~ComputationThread ( );
00052 
00053         protected:
00058                 virtual void run ( );
00059 
00060         private:
00062                 yane::Utils::Mutex * _mutex;
00063                 int * _sum;
00064                 int * _iter;
00065 
00066 };
00067 
00068 #endif