summaryrefslogtreecommitdiff
path: root/test-code/CSGTextCache.h
blob: 57a69726bad25e51a399b35006ac5f1b75b705cf (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
#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