summaryrefslogtreecommitdiff
path: root/tests/CSGTextCache.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2010-08-30 22:52:39 (GMT)
committerMarius Kintel <marius@kintel.net>2010-10-31 00:42:39 (GMT)
commit728f4ac7901c8cfe1724b90effc96bd15ffb3fd0 (patch)
tree4cfc679debe8c42584f159052aefc66073aa273c /tests/CSGTextCache.h
parent067bc0ab31be36961a53a56a317c5c939f7cf11a (diff)
Moved more tests from test-code to tests
Diffstat (limited to 'tests/CSGTextCache.h')
-rw-r--r--tests/CSGTextCache.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/CSGTextCache.h b/tests/CSGTextCache.h
new file mode 100644
index 0000000..57a6972
--- /dev/null
+++ b/tests/CSGTextCache.h
@@ -0,0 +1,27 @@
+#ifndef CSGTEXTCACHE_H_
+#define CSGTEXTCACHE_H_
+
+#include "myqhash.h"
+#include "Tree.h"
+#include <string>
+
+using std::string;
+
+class CSGTextCache
+{
+public:
+ CSGTextCache(const Tree &tree) : tree(tree) {}
+ ~CSGTextCache() {}
+
+ bool contains(const AbstractNode &node) const;
+ string operator[](const AbstractNode &node) const;
+ void insert(const class AbstractNode &node, const string & value);
+ void remove(const class AbstractNode &node);
+ void clear();
+
+private:
+ QHash<string, string> cache;
+ const Tree &tree;
+};
+
+#endif
contact: Jan Huwald // Impressum