#include <vector>
#include "misc.h"
-class ComponentTreeTest;
-
class ComponentTree {
public:
struct Node {
Component _comp;
std::vector<Node*> _children;
};
+
+ /**
+ * Creates a component tree from a list of components.
+ */
ComponentTree(const std::vector<Component>& components);
~ComponentTree();
+ /**
+ * Transforms the tree into the minimal tree containing all unoriented componentes.
+ * \todo come up with a better name
+ */
+ void makeUnoriented();
+
private:
//Disable these, at least for now.
void operator=(const ComponentTree&){};
ComponentTree(const ComponentTree&): _root(0,Component()){};
+ void removeOriented(Node* n);
+
Node _root;
+
friend class ComponentTreeTest;
};