Modified the NodeTree with a unique id used in construction of the DOT representation, so that two different nodes with the same name don't end up as the same on the graph.

This commit is contained in:
Nathan Braswell committed 2013-06-23 05:54:58 -04:00
1 parent a307e1f143
commit ee9b8b8c39
4 files changed
+37 -1

No files matched your search

+7
View File
@@ -5,8 +5,11 @@
#define NULL 0
#endif
#include <util.h>
#include <vector>
#include <string>
#include <iostream>
class NodeTree {
public:
@@ -32,9 +35,13 @@ class NodeTree {
private:
std::string DOTGraphStringHelper();
std::string getDOTName();
std::string name;
NodeTree* parent;
std::vector<NodeTree*> children;
static int idCounter;
int id;
};
#endif
+2
View File
@@ -9,5 +9,7 @@
#include <sstream>
std::string intToString(int theInt);
std::string truncateEnd(std::string to_truncate);
std::string removeBeginning(std::string to_remove);
#endif