diff options
| author | 2016-01-30 17:52:00 +0100 | |
|---|---|---|
| committer | 2016-01-30 17:52:00 +0100 | |
| commit | 530c87f71366810549b718160bc59bda51f876b0 (patch) | |
| tree | 5245554bdb3ea5289f448c270f273ac783c079b2 /node/scalaroperatornode.h | |
| parent | c11896701cdc28e6a363af9242c111164f14e074 (diff) | |
| download | OneRoll-530c87f71366810549b718160bc59bda51f876b0.tar.gz OneRoll-530c87f71366810549b718160bc59bda51f876b0.zip | |
-rework arithmetic operator
Diffstat (limited to 'node/scalaroperatornode.h')
| -rw-r--r-- | node/scalaroperatornode.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/node/scalaroperatornode.h b/node/scalaroperatornode.h index ca6f3ac..a8f930a 100644 --- a/node/scalaroperatornode.h +++ b/node/scalaroperatornode.h @@ -35,11 +35,11 @@ class ScalarOperatorNode : public ExecutionNode { public: - enum ScalarOperator {PLUS,MINUS,DIVIDE,MULTIPLICATION}; + enum ArithmeticOperator {PLUS,MINUS,DIVIDE,MULTIPLICATION}; ScalarOperatorNode(); virtual ~ScalarOperatorNode(); virtual void run(ExecutionNode*); - bool setOperatorChar(QChar c); + void setInternalNode(ExecutionNode* node); virtual QString toString(bool wl)const; @@ -52,6 +52,9 @@ public: */ virtual QMap<ExecutionNode::ERROR_CODE,QString> getExecutionErrorMap(); + ScalarOperatorNode::ArithmeticOperator getArithmeticOperator() const; + void setArithmeticOperator(const ScalarOperatorNode::ArithmeticOperator &arithmeticOperator); + private: static qint64 add(qint64,qint64); static qint64 substract(qint64,qint64); @@ -59,10 +62,9 @@ private: static qint64 multiple(qint64,qint64); private: - ScalarOperator m_operator; + ArithmeticOperator m_arithmeticOperator; ScalarResult* m_scalarResult; ExecutionNode* m_internalNode; - QMap<QChar,ScalarOperator> m_scalarOperationList; }; #endif // SCALAROPERATORNODE_H |