File indexing completed on 2024-05-12 05:39:32
0001 #include "testnode.h" 0002 #include "die.h" 0003 0004 TestNode::TestNode() {} 0005 0006 TestNode::~TestNode() 0007 { 0008 m_nextNode= nullptr; 0009 m_result= nullptr; 0010 } 0011 void TestNode::run(ExecutionNode* previous) 0012 { 0013 Q_UNUSED(previous) 0014 if(nullptr != m_nextNode) 0015 { 0016 m_nextNode->run(this); 0017 } 0018 } 0019 0020 QString TestNode::toString(bool wl) const 0021 { 0022 if(wl) 0023 { 0024 return QStringLiteral("%1 [label=\"TestNode \"]").arg(m_id); 0025 } 0026 else 0027 { 0028 return m_id; 0029 } 0030 } 0031 qint64 TestNode::getPriority() const 0032 { 0033 qint64 priority= 4; 0034 return priority; 0035 } 0036 ExecutionNode* TestNode::getCopy() const 0037 { 0038 TestNode* node= new TestNode(); 0039 if(nullptr != m_nextNode) 0040 { 0041 node->setNextNode(m_nextNode->getCopy()); 0042 } 0043 return node; 0044 } 0045 0046 void TestNode::setResult(Result* result) 0047 { 0048 m_result= result; 0049 }