aboutsummaryrefslogtreecommitdiff
path: root/src/cache.h
blob: 31da981231c7b68f5d1e023dc1e8a45c10d7f3f2 (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
#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"

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();



private:
	Bu::FString sCacheFile;
	bool bIsLoaded;
	typedef Bu::Hash<Bu::FString, Bu::List<Bu::FString> > ReqHash;
	ReqHash hRequires;
	typedef Bu::Hash<Bu::FString, Variable> VarHash;
	VarHash hVariables;
};

#endif