diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-12-29 01:11:27 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-12-29 01:11:27 +0000 |
commit | 501bac50016628b787906392ce7af8262e561e52 (patch) | |
tree | 3b8746c37f22127c680f4aab5286893e5194437d /src/cache.h | |
parent | ccc30fd28cb3e65195a6cea06ca00f95e16ac9f8 (diff) | |
download | build-501bac50016628b787906392ce7af8262e561e52.tar.gz build-501bac50016628b787906392ce7af8262e561e52.tar.bz2 build-501bac50016628b787906392ce7af8262e561e52.tar.xz build-501bac50016628b787906392ce7af8262e561e52.zip |
Ok, cache stuff is in, and that's good, now we have to use it.
Diffstat (limited to '')
-rw-r--r-- | src/cache.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cache.h b/src/cache.h new file mode 100644 index 0000000..b255e94 --- /dev/null +++ b/src/cache.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef CACHE_H | ||
2 | #define CACHE_H | ||
3 | |||
4 | #include <bu/singleton.h> | ||
5 | #include <bu/fstring.h> | ||
6 | #include <bu/hash.h> | ||
7 | #include <bu/list.h> | ||
8 | |||
9 | #include "variable.h" | ||
10 | |||
11 | class Cache : public Bu::Singleton<Cache> | ||
12 | { | ||
13 | friend class Bu::Singleton<Cache>; | ||
14 | private: | ||
15 | Cache(); | ||
16 | virtual ~Cache(); | ||
17 | |||
18 | public: | ||
19 | void bind( const Bu::FString &sCacheFile ); | ||
20 | |||
21 | void load(); | ||
22 | void save(); | ||
23 | |||
24 | private: | ||
25 | Bu::FString sCacheFile; | ||
26 | bool bIsLoaded; | ||
27 | typedef Bu::Hash<Bu::FString, Bu::List<Bu::FString> > ReqHash; | ||
28 | ReqHash hRequires; | ||
29 | typedef Bu::Hash<Bu::FString, Variable> VarHash; | ||
30 | VarHash hVariables; | ||
31 | }; | ||
32 | |||
33 | #endif | ||