version 2.14.1
This commit is contained in:
@@ -3,8 +3,8 @@ cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
||||
project(pip)
|
||||
set(pip_MAJOR 2)
|
||||
set(pip_MINOR 14)
|
||||
set(pip_REVISION 0)
|
||||
set(pip_SUFFIX beta)
|
||||
set(pip_REVISION 1)
|
||||
set(pip_SUFFIX )
|
||||
set(pip_COMPANY SHS)
|
||||
set(pip_DOMAIN org.SHS)
|
||||
|
||||
|
||||
@@ -330,8 +330,10 @@ void PIEvaluator::makeOutput(PIString & string) {
|
||||
void PIEvaluator::findUnknownVariables() {
|
||||
PIString cvar;
|
||||
unknownVars.clear();
|
||||
usedVars.clear();
|
||||
for (int i = 0; i < currentString.length(); i++) {
|
||||
if (elements[i].var_num == -666) cvar += currentString[i];
|
||||
if (elements[i].var_num >= 0) usedVars << content.variable(elements[i].var_num).name;
|
||||
else if (elements[i].var_num == -666) cvar += currentString[i];
|
||||
else {
|
||||
if (cvar.length() == 0) continue;
|
||||
unknownVars << cvar;
|
||||
@@ -340,6 +342,7 @@ void PIEvaluator::findUnknownVariables() {
|
||||
}
|
||||
if (cvar.length() > 0) unknownVars << cvar;
|
||||
unknownVars.removeDuplicates();
|
||||
usedVars.removeDuplicates();
|
||||
}
|
||||
|
||||
|
||||
@@ -1196,7 +1199,7 @@ complexd PIEvaluator::evaluate() {
|
||||
|
||||
PIByteArray PIEvaluator::save() const {
|
||||
PIByteArray ret;
|
||||
ret << content << currentVariables << unknownVars << instructions << currentString << lastError << out << correct;
|
||||
ret << content << currentVariables << unknownVars << instructions << currentString << lastError << out << correct << usedVars;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1204,5 +1207,6 @@ PIByteArray PIEvaluator::save() const {
|
||||
void PIEvaluator::load(PIByteArray ba) {
|
||||
if (ba.size() <= 4) return;
|
||||
ba >> content >> currentVariables >> unknownVars >> instructions >> currentString >> lastError >> out >> correct;
|
||||
if (ba.size() >= 4) ba >> usedVars;
|
||||
variables = currentVariables;
|
||||
}
|
||||
|
||||
@@ -176,6 +176,9 @@ public:
|
||||
//! Returns all unknown variables founded in last expression passed to \a check() function
|
||||
const PIStringList & unknownVariables() const {return unknownVars;}
|
||||
|
||||
//! Returns all used variables founded in last expression passed to \a check() function
|
||||
const PIStringList & usedVariables() const {return usedVars;}
|
||||
|
||||
//! Returns processed last expression passed to \a check() function
|
||||
const PIString & expression() const {return currentString;}
|
||||
|
||||
@@ -220,7 +223,7 @@ private:
|
||||
PIDeque<PIEvaluatorTypes::Element> elements;
|
||||
PIVector<PIEvaluatorTypes::Variable> currentVariables, variables, tmpvars, * kvars;
|
||||
PIVector<PIEvaluatorTypes::Instruction> instructions;
|
||||
PIStringList unknownVars;
|
||||
PIStringList unknownVars, usedVars;
|
||||
PIString currentString, lastError;
|
||||
complexd out;
|
||||
bool correct;
|
||||
|
||||
Reference in New Issue
Block a user