Fixed some more DOT generation stuff.
This commit is contained in:
@@ -225,10 +225,10 @@ template<class T>
|
||||
std::string NodeTree<T>::getDOTName() {
|
||||
std::string DOTName = "";
|
||||
if (data != NULL)
|
||||
DOTName = "\"" + name + "-" + data->toString() + "_" + intToString(id) + "\""; //Note that terminals already have a quote in the front of their name, so we don't need to add one
|
||||
DOTName = "\"" + replaceExEscape(name + "-" + data->toString(), "\"", "\\\"") + "_" + intToString(id) + "\""; //Note that terminals already have a quote in the front of their name, so we don't need to add one
|
||||
else
|
||||
DOTName = "\"" + name + "_" + intToString(id) + "\"";
|
||||
return(replace(DOTName, "\n", "\\n"));
|
||||
DOTName = "\"" + replaceExEscape(name, "\"", " \\\"") + "_" + intToString(id) + "\"";
|
||||
return(replaceExEscape(DOTName, "\n", "\\n"));
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -5,13 +5,13 @@
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
//#include <iostream>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
std::string intToString(int theInt);
|
||||
std::string truncateEnd(std::string to_truncate);
|
||||
std::string removeBeginning(std::string to_remove);
|
||||
std::string replace(std::string first, std::string search, std::string replace);
|
||||
std::string replaceExEscape(std::string first, std::string search, std::string replace);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user