blob: 89320915dabd479d2ee6ea34d3fdd93b9829f075 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef CACHE_H
#define CACHE_H
#include <bu/singleton.h>
#include <bu/fstring.h>
#include <bu/hash.h>
#include <bu/list.h>
#include "variable.h"
#include "types.h"
class Cache : public Bu::Singleton<Cache>
{
friend class Bu::Singleton<Cache>;
private:
Cache();
virtual ~Cache();
public:
void bind( const Bu::FString &sCacheFile );
void load();
void save();
StrList getRequires( const Bu::FString &sOutput );
void setRequires( const Bu::FString &sOutput, StrList lReqs );
private:
bool bCacheChanged;
Bu::FString sCacheFile;
bool bIsLoaded;
typedef Bu::Hash<Bu::FString, StrList> ReqHash;
ReqHash hRequires;
typedef Bu::Hash<Bu::FString, Variable> VarHash;
VarHash hVariables;
};
#endif
|