From 13e297604b00615d47352538e3c82ea1ac700d4c Mon Sep 17 00:00:00 2001 From: Renaud G Date: Mon, 28 Nov 2016 00:36:15 +0100 Subject: -Add API for copying a branch of execution node. -Allow to use if node several times. --- parsingtoolbox.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'parsingtoolbox.cpp') diff --git a/parsingtoolbox.cpp b/parsingtoolbox.cpp index f792d7a..8bd52b7 100644 --- a/parsingtoolbox.cpp +++ b/parsingtoolbox.cpp @@ -24,6 +24,7 @@ #include "parsingtoolbox.h" #include "node/sortresult.h" + QHash* ParsingToolBox::m_variableHash = NULL; ParsingToolBox::ParsingToolBox() @@ -199,6 +200,22 @@ Validator* ParsingToolBox::readValidator(QString& str) } return returnVal; } +IfNode::ConditionType ParsingToolBox::readConditionType(QString& str) +{ + IfNode::ConditionType type = IfNode::OnEach; + if(str.startsWith('.')) + { + str=str.remove(0,1); + type = IfNode::OneOfThem; + } + else if(str.startsWith('*')) + { + str=str.remove(0,1); + type = IfNode::AllOfThem; + } + return type; +} + Validator* ParsingToolBox::readCompositeValidator(QString& str) { bool expectSquareBrasket=false; -- cgit v1.2.3-70-g09d2