aboutsummaryrefslogtreecommitdiff
path: root/src/rule.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rule.h')
-rw-r--r--src/rule.h63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/rule.h b/src/rule.h
deleted file mode 100644
index b7c0049..0000000
--- a/src/rule.h
+++ /dev/null
@@ -1,63 +0,0 @@
1#ifndef RULE_H
2#define RULE_H
3
4#include <list>
5#include <string>
6#include <stdint.h>
7#include "regexp.h"
8#include "staticstring.h"
9#include "builder.h"
10
11class Perform;
12
13class Rule
14{
15public:
16 enum Matches
17 {
18 matchOne,
19 matchAll
20 };
21
22 enum ePerform
23 {
24 perfCommand
25 };
26
27public:
28 Rule( const char *sName );
29 virtual ~Rule();
30
31 const char *getName()
32 {
33 return sName;
34 }
35
36 void debug();
37
38 void addProduces( const char *sProduces );
39 void setMatches( Matches how, const char *sWhat );
40 void setPerforms( ePerform pwhat, const char *sPerfCmd );
41
42 bool willChain( Rule *pRule );
43
44 std::list<std::string> execute( class Builder &bld, std::list<std::string> lInput, std::list<Perform *> &lPerf, const char *sTarget=NULL );
45
46private:
47 class Perform *buildCommand( class Builder &bld, const char *sCmd, Builder::varmap *vars );
48 std::list<std::string> findTargets( class Builder &bld, std::list<std::string> &lIn, std::string &sMatches, const char *sTarget );
49 StaticString sName;
50 std::list<std::string> lProduces;
51
52 Matches mHow;
53 RegExp rWhat;
54 //StaticString sWhat;
55 //regex_t rWhat;
56
57 ePerform pHow;
58 StaticString sPerfCmd;
59
60 bool bNoProduces;
61};
62
63#endif