aboutsummaryrefslogtreecommitdiff
path: root/src/cache.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-05 00:04:34 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-05 00:04:34 +0000
commit8dd79b7b5a0309f9bc1185019a4af16b3b52aece (patch)
treea703325cb9bc074179aeaf38f4851a4c38ebfd87 /src/cache.h
parent13bda5d4f77ca469bbbe0d9b1f268682a9f0ec71 (diff)
downloadbuild-8dd79b7b5a0309f9bc1185019a4af16b3b52aece.tar.gz
build-8dd79b7b5a0309f9bc1185019a4af16b3b52aece.tar.bz2
build-8dd79b7b5a0309f9bc1185019a4af16b3b52aece.tar.xz
build-8dd79b7b5a0309f9bc1185019a4af16b3b52aece.zip
Build now uses a cachefile for all of it's requires that are generated from
other means (running other programs). It's really fast, and seems to work pretty well.
Diffstat (limited to 'src/cache.h')
-rw-r--r--src/cache.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cache.h b/src/cache.h
new file mode 100644
index 0000000..944aa24
--- /dev/null
+++ b/src/cache.h
@@ -0,0 +1,33 @@
1#ifndef CACHE_H
2#define CACHE_H
3
4#include <stdint.h>
5#include <time.h>
6#include "serializable.h"
7#include <list>
8#include <map>
9#include <string>
10
11class Cache : public Serializable
12{
13public:
14 Cache();
15 virtual ~Cache();
16
17 virtual void serialize( class Serializer &ar );
18
19 class Entry
20 {
21 public:
22 int tCreated;
23 std::list<std::string> lData;
24 };
25
26 Entry *get( const std::string &id );
27 void put( const std::string &id, Entry *data );
28
29private:
30 std::map<std::string, Entry *> mCache;
31};
32
33#endif