From 8e2f96053a4fb57f82a59fffbfa4178168455e9f Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 18 Mar 2018 17:46:44 +0100 Subject: -get scalar result. --- node/executionnode.cpp | 6 ++++++ node/executionnode.h | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/node/executionnode.cpp b/node/executionnode.cpp index fadc9fb..588f4f5 100644 --- a/node/executionnode.cpp +++ b/node/executionnode.cpp @@ -89,3 +89,9 @@ void ExecutionNode::generateDotTree(QString& s) } } +qint64 ExecutionNode::getScalarResult() +{ + if(m_result == nullptr) + return 0; + return m_result->getResult(Result::SCALAR).toInt(); +} diff --git a/node/executionnode.h b/node/executionnode.h index 6fe8c62..a84bef0 100644 --- a/node/executionnode.h +++ b/node/executionnode.h @@ -80,11 +80,13 @@ public: */ virtual ExecutionNode* getCopy() const = 0; + virtual qint64 getScalarResult(); + protected: /** * @brief m_nextNode */ - ExecutionNode* m_previousNode; + ExecutionNode* m_previousNode= nullptr; /** * @brief m_result */ @@ -92,7 +94,7 @@ protected: /** * @brief m_nextNode */ - ExecutionNode* m_nextNode; + ExecutionNode* m_nextNode = nullptr; /** * @brief m_errors */ -- cgit v1.2.3-70-g09d2