blob: 0cb9c0b76d6f3a189de92576f8f9a75843bda04e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#include "executionnode.h"
ExecutionNode::ExecutionNode()
: m_nextNode(NULL),m_result(NULL),m_previousNode(NULL)
{
}
ExecutionNode::~ExecutionNode()
{
if(NULL!=m_result)
{
delete m_result;
m_result = NULL;
}
if(NULL!=m_nextNode)
{
delete m_nextNode;
m_nextNode = NULL;
}
}
Result* ExecutionNode::getResult()
{
return m_result;
}
void ExecutionNode::setNextNode(ExecutionNode* node)
{
m_nextNode = node;
}
ExecutionNode* ExecutionNode::getNextNode()
{
return m_nextNode;
}
QList<ExecutionNode::ERROR_CODE> ExecutionNode::getErrorList()
{
return m_errors;
}
QString ExecutionNode::getHelp()
{
return QString();
}
ExecutionNode* ExecutionNode::getPreviousNode() const
{
return m_previousNode;
}
void ExecutionNode::generateDotTree(QString& s)
{
s.append(toString());
if(NULL!=m_nextNode)
{
s.append(" -> ");
s.append(m_nextNode->toString());
s.append(" [label=\"nextNode\"];\n");
m_nextNode->generateDotTree(s);
}
else
{
s.append(" -> ");
s.append("NULL");
s.append(" [label=\"nextNode\"];\n");
m_result->generateDotTree(s);
}
}
|