aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/parsingtoolbox.h
blob: 9855c1aa946da16534fd98a4e77587d48909a7a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#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);


    bool readOpenParentheses(QString& str);
    bool readCloseParentheses(QString& str);

private:
        QMap<QString,BooleanCondition::LogicOperator>* m_logicOp;
};

#endif // PARSINGTOOLBOX_H