diff options
author | Marius Kintel <marius@kintel.net> | 2010-04-12 00:16:36 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2010-10-31 00:42:35 (GMT) |
commit | e8e213b3c9ce0580045ea6e7e86b00ab41d4c58b (patch) | |
tree | cb32e67b6334aa1f1dc62aa4a0686a22782e7f77 /src/Tree.h | |
parent | 53a9953b7dc4ab4a366046c91529b32fb6652551 (diff) |
Another refactoring session:
o mk_cache_id() obsoleted by removing the node index from the dump
o node index output removed from each node and make optional in NodeDumper
o The visitors are no longer global, but associated with a tree
o Added Tree class to manage node trees and the (now implicit) dump cache
o Moved PolySet cache into PolySetRenderer
Diffstat (limited to 'src/Tree.h')
-rw-r--r-- | src/Tree.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Tree.h b/src/Tree.h new file mode 100644 index 0000000..9cfef84 --- /dev/null +++ b/src/Tree.h @@ -0,0 +1,29 @@ +#ifndef TREE_H_ +#define TREE_H_ + +#include "nodecache.h" +//#include "cgal.h" + +using std::string; + +class Tree +{ +public: + Tree() { + this->root_node = NULL; + } + ~Tree() {} + + void setRoot(const AbstractNode *root) { this->root_node = root; } + const AbstractNode *root() const { return this->root_node; } + + // FIXME: Really return a reference? + const string &getString(const AbstractNode &node) const; +// CGAL_Nef_polyhedron getCGALMesh(const AbstractNode &node) const; + +private: + const AbstractNode *root_node; + mutable NodeCache nodecache; +}; + +#endif |