diff options
Diffstat (limited to 'parsingtoolbox.h')
| -rw-r--r-- | parsingtoolbox.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/parsingtoolbox.h b/parsingtoolbox.h index 5d38919..3d37f7b 100644 --- a/parsingtoolbox.h +++ b/parsingtoolbox.h @@ -27,6 +27,7 @@ #include "node/executionnode.h" #include "node/dicerollernode.h" #include "booleancondition.h" +#include "compositevalidator.h" #include "range.h" /** @@ -36,6 +37,7 @@ class ParsingToolBox { public: + enum LIST_OPERATOR {NONE,UNIQUE}; /** * @brief ParsingToolBox */ @@ -70,7 +72,12 @@ public: * @return */ Validator* readValidator(QString& str); - + /** + * @brief readCompositeValidator + * @param str + * @return + */ + Validator* readCompositeValidator(QString& str); /** * @brief readNumber read number in the given str and remove from the string the read character. @@ -78,7 +85,7 @@ public: * @param myNumber reference to the found number * @return true, succeed to read number, false otherwise. */ - bool readNumber(QString& str, int& myNumber); + bool readNumber(QString& str, qint64& myNumber); /** @@ -100,7 +107,7 @@ public: * @param list * @return */ - bool readList(QString& str,QStringList& list); + bool readList(QString& str,QStringList& list, QList<Range>& ranges); /** * @brief isValidValidator * @param previous @@ -122,10 +129,21 @@ public: * @param end * @return */ - bool readDiceRange(QString& str,int& start, int& end); + bool readDiceRange(QString& str,qint64& start, qint64& end); + /** + * @brief readListOperator + * @param str + * @return + */ + LIST_OPERATOR readListOperator(QString& str); + + void readProbability(QStringList& str,QList<Range>& ranges); + + bool readLogicOperation(QString& str,CompositeValidator::LogicOperation& op); private: QMap<QString,BooleanCondition::LogicOperator>* m_logicOp; + QMap<QString,CompositeValidator::LogicOperation>* m_logicOperation; }; #endif // PARSINGTOOLBOX_H |