]> git.tdb.fi Git - builder.git/blob - source/internalaction.h
Add class InternalAction for actions that use a thread to do their work
[builder.git] / source / internalaction.h
1 /* $Id$
2
3 This file is part of builder
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef INTERNALACTION_H_
9 #define INTERNALACTION_H_
10
11 #include <msp/core/thread.h>
12 #include "action.h"
13
14 class InternalAction: public Action
15 {
16 public:
17         virtual ~InternalAction();
18
19         virtual int check();
20 protected:
21         class Worker: public Msp::Thread
22         {
23         public:
24                 bool get_done() const  { return done; }
25                 bool get_error() const { return error; }
26         protected:
27                 bool done;
28                 bool error;
29
30                 Worker();
31         };
32
33         Worker *worker;
34
35         InternalAction(Builder &);
36 };
37
38 #endif