diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-12-21 18:03:28 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-12-21 18:03:28 +0000 |
commit | 51e21a316be6e052251b3dfc7d671061ebd67cee (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /src/build.h | |
parent | ad6f4dfcc671d3f8d458c42b0992956f2a2cf979 (diff) | |
download | build-51e21a316be6e052251b3dfc7d671061ebd67cee.tar.gz build-51e21a316be6e052251b3dfc7d671061ebd67cee.tar.bz2 build-51e21a316be6e052251b3dfc7d671061ebd67cee.tar.xz build-51e21a316be6e052251b3dfc7d671061ebd67cee.zip |
Removed the old trunk contents. About to load up m3
Diffstat (limited to 'src/build.h')
-rw-r--r-- | src/build.h | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/src/build.h b/src/build.h deleted file mode 100644 index 1ffb547..0000000 --- a/src/build.h +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | #ifndef BUILD_H | ||
2 | #define BUILD_H | ||
3 | |||
4 | #include <stdint.h> | ||
5 | |||
6 | #include <map> | ||
7 | #include <string> | ||
8 | |||
9 | #include "bu/exceptionbase.h" | ||
10 | #include "rule.h" | ||
11 | #include "target.h" | ||
12 | #include "action.h" | ||
13 | #include "stringproc.h" | ||
14 | #include "cache.h" | ||
15 | |||
16 | subExceptionDecl( BuildException ); | ||
17 | typedef std::map<std::string, std::string> VarMap; | ||
18 | typedef std::map<std::string, Target *> TargetMap; | ||
19 | typedef std::list<std::string> StringList; | ||
20 | typedef std::map<std::string, StringList> ReqMap; | ||
21 | typedef std::map<std::string, VarMap> ContextMap; | ||
22 | typedef std::map<std::string, Rule *> RuleMap; | ||
23 | typedef std::list<Rule *> RuleList; | ||
24 | typedef std::map<std::string, Action *> ActionMap; | ||
25 | typedef std::list<Target *> TargetList; | ||
26 | typedef std::map<std::string, TargetList> GroupMap; | ||
27 | |||
28 | class Viewer; | ||
29 | |||
30 | class Build | ||
31 | { | ||
32 | public: | ||
33 | Build(); | ||
34 | virtual ~Build(); | ||
35 | |||
36 | void execAction( const std::string &sWhat ); | ||
37 | |||
38 | /** | ||
39 | * Adds a target to the build. If the target already exists, this will | ||
40 | * attempt to merge them as best it can. If there are any conflicts, it | ||
41 | * will throw an exception. | ||
42 | *@param pTarget A pointer to a Target object that Build takes ownership of. | ||
43 | */ | ||
44 | void addTarget( Target *pTarget ); | ||
45 | void addRequires( const std::string &who, const std::string &what ); | ||
46 | void addRule( Rule *pRule ); | ||
47 | void addAction( Action *pAction ); | ||
48 | bool hasAction( const std::string &str ); | ||
49 | void addToGroup( const std::string &sGroup, Target *pTarget ); | ||
50 | |||
51 | void set( const std::string &cont, const std::string &var, const std::string &val ); | ||
52 | void setAdd( const std::string &cont, const std::string &var, const std::string &val ); | ||
53 | void copyContext( const std::string &src, const std::string &dest ); | ||
54 | std::string getVar( const StringList *cont, const std::string &var, VarMap *mExtra ); | ||
55 | |||
56 | Rule *getRule( const std::string &name ); | ||
57 | |||
58 | void debugDump(); | ||
59 | |||
60 | void setStringProc( StringProc *pStrProc ); | ||
61 | std::string replVars( const std::string &sSrc, const StringList *pCont, VarMap *mExtra ); | ||
62 | RuleList findChainRules( Rule *pHead ); | ||
63 | StringList &getRequires( std::string sName ); | ||
64 | |||
65 | Viewer *getView() | ||
66 | { | ||
67 | return pView; | ||
68 | } | ||
69 | |||
70 | TargetMap &getTargetMap() | ||
71 | { | ||
72 | return mTarget; | ||
73 | } | ||
74 | |||
75 | void setView( const std::string &sView ); | ||
76 | |||
77 | void setCache( const std::string &sFileName ); | ||
78 | bool getCached( const std::string &sID, int nTime, StringList &lOut ); | ||
79 | void updateCache( const std::string &sID, FunctionList &lFunc, StringList &lOut ); | ||
80 | |||
81 | void chainTarget( const std::string &sName ); | ||
82 | |||
83 | void printInfo(); | ||
84 | |||
85 | void setMode( Action::eAction nAct ); | ||
86 | |||
87 | private: | ||
88 | TargetMap mTarget; | ||
89 | ReqMap mRequires; | ||
90 | VarMap mVars; | ||
91 | ContextMap mContVars; | ||
92 | RuleMap mRule; | ||
93 | ActionMap mAction; | ||
94 | StringProc *pStrProc; | ||
95 | Viewer *pView; | ||
96 | Cache cRequires; | ||
97 | bool bCacheUpdated; | ||
98 | std::string sCacheName; | ||
99 | GroupMap mGroup; | ||
100 | |||
101 | //std::map<std::string, Rule *> mRule; | ||
102 | //Action *pActDefault; | ||
103 | //std::map<std::string, Action *> mAction; | ||
104 | |||
105 | }; | ||
106 | |||
107 | #endif | ||