]> git.tdb.fi Git - builder.git/blob - source/externalaction.h
6df268fd4c25e325fff5976da97ba9aab1f372c4
[builder.git] / source / externalaction.h
1 /* $Id$
2
3 This file is part of builder
4 Copyright © 2006-2009  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef EXTERNALACTION_H_
9 #define EXTERNALACTION_H_
10
11 #include <list>
12 #include <string>
13 #include "action.h"
14 #include "misc.h"
15
16 /**
17 Base class for Actions that want to execute an external program.
18 */
19 class ExternalAction: public Action
20 {
21 protected:
22         StringList argv;
23         Msp::FS::Path work_dir;
24         int pid;
25         int exit_code;
26         
27         ExternalAction(Builder &b): Action(b), pid(0), exit_code(0) { }
28
29         /** Starts the external program.  Fill in argv before calling this. */
30         void launch();
31
32 public:
33         virtual int check();
34 };
35
36 #endif