Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
1309 runge 1
/*
2
 * Thread.h
3
 *
4
 *  Created on: Apr 26, 2009
5
 *      Author: Mattias Runge
6
 */
7
 
8
#ifndef THREAD_H_
9
#define THREAD_H_
10
 
11
#include <boost/thread.hpp>
12
 
13
namespace atom {
14
namespace utils {
15
 
16
class Thread
17
{
18
public:
19
    Thread();
20
    virtual ~Thread();
21
 
22
    void start();
23
    void stop();
24
    boost::thread::id getId();
25
    bool isRunning();
26
 
27
 
28
protected:
29
    virtual void run();
30
 
31
private:
32
    boost::thread _thread;
33
    bool _running;
34
 
35
    void runBase();
36
};
37
 
38
}
39
}
40
 
41
#endif /* THREAD_H_ */