summaryrefslogtreecommitdiff
path: root/test-code/CSGTextRenderer.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2010-04-12 04:57:02 (GMT)
committerMarius Kintel <marius@kintel.net>2010-10-31 00:42:35 (GMT)
commit1caf80e561819832092e67bd15ceba5d6f9a02f8 (patch)
treeac144b7659840529155c762794508bea018b2be3 /test-code/CSGTextRenderer.h
parente8e213b3c9ce0580045ea6e7e86b00ab41d4c58b (diff)
Added CSGTextCache for experimenting with cache-tree organization
Diffstat (limited to 'test-code/CSGTextRenderer.h')
-rw-r--r--test-code/CSGTextRenderer.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/test-code/CSGTextRenderer.h b/test-code/CSGTextRenderer.h
index 236f900..4085e60 100644
--- a/test-code/CSGTextRenderer.h
+++ b/test-code/CSGTextRenderer.h
@@ -1,26 +1,20 @@
#ifndef CSGTEXTRENDERER_H_
#define CSGTEXTRENDERER_H_
-#include <qglobal.h>
-#include <string>
-extern uint qHash(const std::string &);
+#include "visitor.h"
+#include "CSGTextCache.h"
#include <map>
#include <list>
-#include <QHash>
-#include "visitor.h"
-#include "Tree.h"
using std::string;
using std::map;
using std::list;
-using std::pair;
class CSGTextRenderer : public Visitor
{
public:
- CSGTextRenderer(QHash<string, string> &cache, const Tree &tree) :
- cache(cache), tree(tree) {}
+ CSGTextRenderer(CSGTextCache &cache) : cache(cache) {}
virtual ~CSGTextRenderer() {}
virtual Response visit(const State &state, const AbstractNode &node);
@@ -37,11 +31,10 @@ private:
void applyToChildren(const AbstractNode &node, CSGTextRenderer::CsgOp op);
string currindent;
- typedef list<pair<const AbstractNode *, string> > ChildList;
+ typedef list<const AbstractNode *> ChildList;
map<int, ChildList> visitedchildren;
- QHash<string, string> &cache;
- const Tree &tree;
+ CSGTextCache &cache;
};
#endif
contact: Jan Huwald // Impressum