From 07c5f6ec23fcf9237a24e71adcfacabce677f818 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Fri, 29 Apr 2022 10:48:09 +0200 Subject: Change file organization. --- node/valueslistnode.cpp | 62 ------------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 node/valueslistnode.cpp (limited to 'node/valueslistnode.cpp') diff --git a/node/valueslistnode.cpp b/node/valueslistnode.cpp deleted file mode 100644 index 33a347d..0000000 --- a/node/valueslistnode.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include "valueslistnode.h" - -#include "variablenode.h" - -ValuesListNode::ValuesListNode() : m_diceResult(new DiceResult()) -{ - m_result= m_diceResult; -} - -void ValuesListNode::run(ExecutionNode* previous) -{ - m_previousNode= previous; - for(auto node : m_data) - { - node->run(this); - auto result= node->getResult(); - if(!result) - continue; - auto val= result->getResult(Dice::RESULT_TYPE::SCALAR).toInt(); - Die* die= new Die(); - auto dyna= dynamic_cast(node); - if(nullptr != dyna) - dyna->setDisplayed(); - die->insertRollValue(val); - m_diceResult->insertResult(die); - } - - if(nullptr != m_nextNode) - { - m_nextNode->run(this); - } -} - -void ValuesListNode::insertValue(ExecutionNode* value) -{ - m_data.push_back(value); -} -ExecutionNode* ValuesListNode::getCopy() const -{ - ValuesListNode* node= new ValuesListNode(); - if(nullptr != m_nextNode) - { - node->setNextNode(m_nextNode->getCopy()); - } - return node; -} -QString ValuesListNode::toString(bool wl) const -{ - if(wl) - { - return QString("%1 [label=\"ValuesListNode list:\"]").arg(m_id); - } - else - { - return m_id; - } -} -qint64 ValuesListNode::getPriority() const -{ - qint64 priority= 4; - return priority; -} -- cgit v1.2.3-70-g09d2