diff options
Diffstat (limited to 'node/executionnode.cpp')
| -rw-r--r-- | node/executionnode.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/node/executionnode.cpp b/node/executionnode.cpp index dba56fc..abcb7cf 100644 --- a/node/executionnode.cpp +++ b/node/executionnode.cpp @@ -1,13 +1,14 @@ #include "executionnode.h" +#include <QUuid> + ExecutionNode::ExecutionNode() - : m_nextNode(NULL),m_result(NULL),m_previousNode(NULL) + : m_nextNode(NULL),m_result(NULL),m_previousNode(NULL),m_id(QString("\"%1\"").arg(QUuid::createUuid().toString())) { } ExecutionNode::~ExecutionNode() { - if(NULL!=m_result) { delete m_result; @@ -53,19 +54,29 @@ ExecutionNode* ExecutionNode::getPreviousNode() const } void ExecutionNode::generateDotTree(QString& s) { - s.append(toString()); + s.append(toString(true)); + s.append(";\n"); + if(NULL!=m_nextNode) { + s.append(toString(false)); s.append(" -> "); - s.append(m_nextNode->toString()); - s.append(" [label=\"nextNode\"];\n"); + s.append(m_nextNode->toString(false)); + s.append(";\n"); +// s.append(" [label=\"nextNode\"];\n"); m_nextNode->generateDotTree(s); } else { + s.append(toString(false)); s.append(" -> "); - s.append("NULL"); - s.append(" [label=\"nextNode\"];\n"); + s.append("NULL;\n"); + + + s.append(toString(false)); + s.append(" ->"); + s.append(m_result->toString(false)); + s.append(" [label=\"Result\"];\n"); m_result->generateDotTree(s); } |