From 9311cabe959739e74b62e46563bace3ebc63e15d Mon Sep 17 00:00:00 2001 From: Renaud Guezennec Date: Wed, 13 Apr 2016 16:23:48 +0200 Subject: Add management for variable in DiceParser. --- parsingtoolbox.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'parsingtoolbox.h') diff --git a/parsingtoolbox.h b/parsingtoolbox.h index 4aeb16e..efe7acd 100644 --- a/parsingtoolbox.h +++ b/parsingtoolbox.h @@ -95,7 +95,13 @@ public: */ static bool readNumber(QString& str, qint64& myNumber); - + /** + * @brief readVariable + * @param str + * @param myNumber + * @return + */ + static bool readVariable(QString& str,qint64& myNumber); /** * @brief readOpenParentheses * @param str @@ -154,11 +160,19 @@ public: bool readArithmeticOperator(QString& str, ScalarOperatorNode::ArithmeticOperator& op); static void readPainterParameter(PainterNode *painter, QString &str); + + static QHash *getVariableHash(); + static void setVariableHash(QHash *variableHash); + private: - QMap* m_logicOp; - QMap* m_logicOperation; + + QMap* m_logicOp; + QMap* m_logicOperation; QMap* m_conditionOperation; QHash* m_arithmeticOperation; + + + static QHash* m_variableHash; }; #endif // PARSINGTOOLBOX_H -- cgit v1.2.3-70-g09d2