diff options
Diffstat (limited to 'tests/CSGTextCache.h')
-rw-r--r-- | tests/CSGTextCache.h | 27 |
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 |