summaryrefslogtreecommitdiff
path: root/src/nodecache.h
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-10-31 01:58:50 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-10-31 01:58:50 (GMT)
commite0c5673e1bf965fbb1bbbef2562a54be1a3144a3 (patch)
tree5996824c15ccca985630ff07294a5b79158e4d86 /src/nodecache.h
parentb3f4c98c80acaa414f7bdacc86314d97267acba5 (diff)
Reverted accidental commits
git-svn-id: http://svn.clifford.at/openscad/trunk@573 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src/nodecache.h')
-rw-r--r--src/nodecache.h33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/nodecache.h b/src/nodecache.h
deleted file mode 100644
index c5a5524..0000000
--- a/src/nodecache.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef NODECACHE_H_
-#define NODECACHE_H_
-
-#include <vector>
-#include "node.h"
-
-template <class T>
-class NodeCache
-{
-public:
- NodeCache() { }
- virtual ~NodeCache() { }
-
- const T & operator[](const AbstractNode &node) const {
- if (this->cache.size() > node.index()) return this->cache[node.index()];
- else return nullvalue;
- }
-
- void insert(const class AbstractNode &node, const T & value) {
- this->cache.resize(node.index() + 1);
- this->cache[node.index()] = value;
- }
-
- void remove(const class AbstractNode &node) {
- if (this->cache.size() > node.index()) this->cache[node.index()] = nullvalue;
- }
-
-private:
- std::vector<T> cache;
- T nullvalue;
-};
-
-#endif
contact: Jan Huwald // Impressum