aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorobiwankennedy <renaud@rolisteam.org>2014-01-20 10:22:05 +0100
committerobiwankennedy <renaud@rolisteam.org>2014-01-20 10:22:05 +0100
commitd38950f415abf80bc3006245f9cb3a629107ca5e (patch)
treef2076422fffe3813d24f1479e88438cb15de4da3
parentef6fb1dd0cc7908a98f7ff37e4e6a66903b1d9b9 (diff)
downloadOneRoll-d38950f415abf80bc3006245f9cb3a629107ca5e.tar.gz
OneRoll-d38950f415abf80bc3006245f9cb3a629107ca5e.zip
Create parsingtoolbox.h
parsing tool library
-rw-r--r--parsingtoolbox.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/parsingtoolbox.h b/parsingtoolbox.h
new file mode 100644
index 0000000..b4bd8bc
--- /dev/null
+++ b/parsingtoolbox.h
@@ -0,0 +1,31 @@
+#ifndef PARSINGTOOLBOX_H
+#define PARSINGTOOLBOX_H
+
+#include <QMap>
+
+#include "node/executionnode.h"
+#include "booleancondition.h"
+#include "range.h"
+
+class ParsingToolBox
+{
+public:
+ ParsingToolBox();
+ ExecutionNode* addSort(ExecutionNode* e,bool b);
+ bool readLogicOperator(QString& str,BooleanCondition::LogicOperator& op);
+ Validator* readValidator(QString& str);
+
+
+ /**
+ * @brief readNumber read number in the given str and remove from the string the read character.
+ * @param str the command line
+ * @param myNumber reference to the found number
+ * @return true, succeed to read number, false otherwise.
+ */
+ bool readNumber(QString& str, int& myNumber);
+
+private:
+ QMap<QString,BooleanCondition::LogicOperator>* m_logicOp;
+};
+
+#endif // PARSINGTOOLBOX_H