blob: 57df281806c56bfe02c3513a8ebf6c0c9ef7a522 (
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/string.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::String &sCacheFile );
void load();
void save();
StrList getRequires( const Bu::String &sOutput );
void setRequires( const Bu::String &sOutput, StrList lReqs );
private:
bool bCacheChanged;
Bu::String sCacheFile;
bool bIsLoaded;
typedef Bu::Hash<Bu::String, StrList> ReqHash;
ReqHash hRequires;
typedef Bu::Hash<Bu::String, Variable> VarHash;
VarHash hVariables;
};
#endif
|