Skip to content

Commit

Permalink
Merge branch 'dev' into testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hfedcba committed Aug 23, 2018
2 parents 612b281 + e656b4f commit 8c5441e
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions src/Variable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,28 +101,28 @@ bool Variable::operator==(const Variable& rhs)
{
if(type != rhs.type) return false;
if(type == VariableType::tBoolean) return booleanValue == rhs.booleanValue;
if(type == VariableType::tInteger) return integerValue == rhs.integerValue;
if(type == VariableType::tInteger64) return integerValue64 == rhs.integerValue64;
if(type == VariableType::tString) return stringValue == rhs.stringValue;
if(type == VariableType::tFloat) return floatValue == rhs.floatValue;
if(type == VariableType::tArray)
else if(type == VariableType::tInteger) return integerValue == rhs.integerValue;
else if(type == VariableType::tInteger64) return integerValue64 == rhs.integerValue64;
else if(type == VariableType::tString) return stringValue == rhs.stringValue;
else if(type == VariableType::tFloat) return floatValue == rhs.floatValue;
else if(type == VariableType::tArray)
{
if(arrayValue->size() != rhs.arrayValue->size()) return false;
for(std::pair<Array::iterator, Array::iterator> i(arrayValue->begin(), rhs.arrayValue->begin()); i.first != arrayValue->end(); ++i.first, ++i.second)
{
if(*(i.first) != *(i.second)) return false;
}
}
if(type == VariableType::tStruct)
else if(type == VariableType::tStruct)
{
if(structValue->size() != rhs.structValue->size()) return false;
for(std::pair<Struct::iterator, Struct::iterator> i(structValue->begin(), rhs.structValue->begin()); i.first != structValue->end(); ++i.first, ++i.second)
{
if(i.first->first != i.first->first || *(i.second->second) != *(i.second->second)) return false;
}
}
if(type == VariableType::tBase64) return stringValue == rhs.stringValue;
if(type == VariableType::tBinary)
else if(type == VariableType::tBase64) return stringValue == rhs.stringValue;
else if(type == VariableType::tBinary)
{
if(binaryValue.size() != rhs.binaryValue.size()) return false;
if(binaryValue.empty()) return true;
Expand All @@ -140,76 +140,76 @@ bool Variable::operator==(const Variable& rhs)
bool Variable::operator<(const Variable& rhs)
{
if(type == VariableType::tBoolean) return booleanValue < rhs.booleanValue;
if(type == VariableType::tInteger) return integerValue < rhs.integerValue;
if(type == VariableType::tInteger64) return integerValue64 < rhs.integerValue64;
if(type == VariableType::tString) return stringValue < rhs.stringValue;
if(type == VariableType::tFloat) return floatValue < rhs.floatValue;
if(type == VariableType::tArray)
else if(type == VariableType::tInteger) return integerValue < rhs.integerValue;
else if(type == VariableType::tInteger64) return integerValue64 < rhs.integerValue64;
else if(type == VariableType::tString) return stringValue < rhs.stringValue;
else if(type == VariableType::tFloat) return floatValue < rhs.floatValue;
else if(type == VariableType::tArray)
{
if(arrayValue->size() < rhs.arrayValue->size()) return true; else return false;
}
if(type == VariableType::tStruct)
else if(type == VariableType::tStruct)
{
if(structValue->size() < rhs.structValue->size()) return true; else return false;
}
if(type == VariableType::tBase64) return stringValue < rhs.stringValue;
else if(type == VariableType::tBase64) return stringValue < rhs.stringValue;
return false;
}

bool Variable::operator<=(const Variable& rhs)
{
if(type == VariableType::tBoolean) return booleanValue <= rhs.booleanValue;
if(type == VariableType::tInteger) return integerValue <= rhs.integerValue;
if(type == VariableType::tInteger64) return integerValue64 <= rhs.integerValue64;
if(type == VariableType::tString) return stringValue <= rhs.stringValue;
if(type == VariableType::tFloat) return floatValue <= rhs.floatValue;
if(type == VariableType::tArray)
else if(type == VariableType::tInteger) return integerValue <= rhs.integerValue;
else if(type == VariableType::tInteger64) return integerValue64 <= rhs.integerValue64;
else if(type == VariableType::tString) return stringValue <= rhs.stringValue;
else if(type == VariableType::tFloat) return floatValue <= rhs.floatValue;
else if(type == VariableType::tArray)
{
if(arrayValue->size() <= rhs.arrayValue->size()) return true; else return false;
}
if(type == VariableType::tStruct)
else if(type == VariableType::tStruct)
{
if(structValue->size() <= rhs.structValue->size()) return true; else return false;
}
if(type == VariableType::tBase64) return stringValue <= rhs.stringValue;
else if(type == VariableType::tBase64) return stringValue <= rhs.stringValue;
return false;
}

bool Variable::operator>(const Variable& rhs)
{
if(type == VariableType::tBoolean) return booleanValue > rhs.booleanValue;
if(type == VariableType::tInteger) return integerValue > rhs.integerValue;
if(type == VariableType::tInteger64) return integerValue64 > rhs.integerValue64;
if(type == VariableType::tString) return stringValue > rhs.stringValue;
if(type == VariableType::tFloat) return floatValue > rhs.floatValue;
if(type == VariableType::tArray)
else if(type == VariableType::tInteger) return integerValue > rhs.integerValue;
else if(type == VariableType::tInteger64) return integerValue64 > rhs.integerValue64;
else if(type == VariableType::tString) return stringValue > rhs.stringValue;
else if(type == VariableType::tFloat) return floatValue > rhs.floatValue;
else if(type == VariableType::tArray)
{
if(arrayValue->size() > rhs.arrayValue->size()) return true; else return false;
}
if(type == VariableType::tStruct)
else if(type == VariableType::tStruct)
{
if(structValue->size() > rhs.structValue->size()) return true; else return false;
}
if(type == VariableType::tBase64) return stringValue > rhs.stringValue;
else if(type == VariableType::tBase64) return stringValue > rhs.stringValue;
return false;
}

bool Variable::operator>=(const Variable& rhs)
{
if(type == VariableType::tBoolean) return booleanValue >= rhs.booleanValue;
if(type == VariableType::tInteger) return integerValue >= rhs.integerValue;
if(type == VariableType::tInteger64) return integerValue64 >= rhs.integerValue64;
if(type == VariableType::tString) return stringValue >= rhs.stringValue;
if(type == VariableType::tFloat) return floatValue >= rhs.floatValue;
if(type == VariableType::tArray)
else if(type == VariableType::tInteger) return integerValue >= rhs.integerValue;
else if(type == VariableType::tInteger64) return integerValue64 >= rhs.integerValue64;
else if(type == VariableType::tString) return stringValue >= rhs.stringValue;
else if(type == VariableType::tFloat) return floatValue >= rhs.floatValue;
else if(type == VariableType::tArray)
{
if(arrayValue->size() >= rhs.arrayValue->size()) return true; else return false;
}
if(type == VariableType::tStruct)
else if(type == VariableType::tStruct)
{
if(structValue->size() >= rhs.structValue->size()) return true; else return false;
}
if(type == VariableType::tBase64) return stringValue >= rhs.stringValue;
else if(type == VariableType::tBase64) return stringValue >= rhs.stringValue;
return false;
}

Expand Down

0 comments on commit 8c5441e

Please sign in to comment.