]> git.tdb.fi Git - builder.git/blob - source/task.h
Document a lot of classes and functions
[builder.git] / source / task.h
1 #ifndef TASK_H_
2 #define TASK_H_
3
4 #include <string>
5 #include <sigc++/signal.h>
6
7 /**
8 Tasks are used to manage other programs and worker threads involved in the
9 build process.  They are run asynchronously.
10 */
11 class Task
12 {
13 public:
14         enum Status
15         {
16                 RUNNING,
17                 SUCCESS,
18                 ERROR
19         };
20
21         sigc::signal<void, bool> signal_finished;
22
23 protected:
24         Task() { }
25 public:
26         virtual ~Task() { }
27
28         virtual std::string get_command() const = 0;
29         virtual void start() = 0;
30         virtual Status check() = 0;
31 };
32
33 #endif