version 1.1.2.12, 2004/10/15 14:37:02
|
version 1.1.2.13, 2004/10/15 19:25:46
|
|
|
} | } |
else if(x._valueType == Real_type) | else if(x._valueType == Real_type) |
{ | { |
if(_theValue._U64 == x._theValue._R64) |
Real64 temp; |
|
memcpy(&temp, &_theValue._U64, sizeof(temp)); |
|
if(temp == x._theValue._R64) |
{ | { |
return true; | return true; |
} | } |
|
|
} | } |
else if(x._valueType == Uint64_type) | else if(x._valueType == Uint64_type) |
{ | { |
if(_theValue._R64 == x._theValue._U64) |
Real64 temp; |
|
memcpy(&temp, &x._theValue._U64, sizeof(temp)); |
|
if(_theValue._R64 == temp) |
{ | { |
return true; | return true; |
} | } |
|
|
throw(Exception(String("CQLValueRep::operator<="))); | throw(Exception(String("CQLValueRep::operator<="))); |
} | } |
| |
if(x._valueType == Null_type || |
if (this->operator<(x) || this->operator==(x)) |
_valueType == Null_type) |
|
{ |
|
throw(Exception(String("CQLValueRep::operator<="))); |
|
} |
|
|
|
switch(_valueType) |
|
{ |
|
case Boolean_type: |
|
{ |
|
if(x._valueType == Boolean_type) |
|
{ |
|
if(_theValue._B <= x._theValue._B) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
} |
|
case Sint64_type: |
|
if(x._valueType == Sint64_type) |
|
{ |
|
if(_theValue._S64 <= x._theValue._S64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Uint64_type) |
|
{ |
|
if(_theValue._S64 <= (Sint64)x._theValue._U64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Real_type) |
|
{ |
|
if(_theValue._S64 <= x._theValue._R64) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
case Uint64_type: |
|
if(x._valueType == Sint64_type) |
|
{ |
|
if((Sint64)_theValue._U64 <= x._theValue._S64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Uint64_type) |
|
{ |
|
if(_theValue._U64 <= x._theValue._U64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Real_type) |
|
{ |
|
if(_theValue._U64 <= x._theValue._R64) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
case Real_type: |
|
if(x._valueType == Sint64_type) |
|
{ |
|
if(_theValue._R64 <= x._theValue._S64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Uint64_type) |
|
{ |
|
if(_theValue._R64 <= x._theValue._U64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Real_type) |
|
{ |
|
if(_theValue._R64 <= x._theValue._R64) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
case String_type: |
|
if(*_theValue._S <= *x._theValue._S) |
|
{ |
|
return true; | return true; |
} |
|
break; |
|
case CIMDateTime_type: |
|
throw(Exception(String("CQLValueRep::operator<="))); |
|
break; |
|
case CIMReference_type: |
|
throw(Exception(String("CQLValueRep::operator<="))); |
|
break; |
|
case CIMInstance_type: |
|
throw(Exception(String("CQLValueRep::operator<="))); |
|
break; |
|
case CQLIdentifier_type: |
|
throw(Exception(String("CQLValueRep::operator<="))); |
|
break; |
|
|
|
default: |
|
throw(Exception(String("CQLValueRep::operator<="))); |
|
break; |
|
} |
|
return false; | return false; |
} | } |
| |
|
|
{ | { |
throw(Exception(String("CQLValueRep::operator>="))); | throw(Exception(String("CQLValueRep::operator>="))); |
} | } |
|
return !(this->operator<(x)); |
if(x._valueType == Null_type || |
|
_valueType == Null_type) |
|
{ |
|
throw(Exception(String("CQLValueRep::operator>="))); |
|
} |
|
|
|
switch(_valueType) |
|
{ |
|
case Boolean_type: |
|
{ |
|
if(x._valueType == Boolean_type) |
|
{ |
|
if(_theValue._B >= x._theValue._B) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
} |
|
case Sint64_type: |
|
if(x._valueType == Sint64_type) |
|
{ |
|
if(_theValue._S64 >= x._theValue._S64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Uint64_type) |
|
{ |
|
if(_theValue._S64 >= (Sint64)x._theValue._U64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Real_type) |
|
{ |
|
if(_theValue._S64 >= x._theValue._R64) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
case Uint64_type: |
|
if(x._valueType == Sint64_type) |
|
{ |
|
if((Sint64)_theValue._U64 >= x._theValue._S64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Uint64_type) |
|
{ |
|
if(_theValue._U64 >= x._theValue._U64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Real_type) |
|
{ |
|
if(_theValue._U64 >= x._theValue._R64) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
case Real_type: |
|
if(x._valueType == Sint64_type) |
|
{ |
|
if(_theValue._R64 >= x._theValue._S64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Uint64_type) |
|
{ |
|
if(_theValue._R64 >= x._theValue._U64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Real_type) |
|
{ |
|
if(_theValue._R64 >= x._theValue._R64) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
case String_type: |
|
if(*_theValue._S >= *x._theValue._S) |
|
{ |
|
return true; |
|
} |
|
break; |
|
case CIMDateTime_type: |
|
throw(Exception(String("CQLValueRep::operator>="))); |
|
break; |
|
case CIMReference_type: |
|
throw(Exception(String("CQLValueRep::operator>="))); |
|
break; |
|
case CIMInstance_type: |
|
throw(Exception(String("CQLValueRep::operator>="))); |
|
break; |
|
case CQLIdentifier_type: |
|
throw(Exception(String("CQLValueRep::operator>="))); |
|
break; |
|
|
|
default: |
|
throw(Exception(String("CQLValueRep::operator>="))); |
|
break; |
|
} |
|
return false; |
|
} | } |
| |
| |
|
|
} | } |
else if(x._valueType == Real_type) | else if(x._valueType == Real_type) |
{ | { |
if(_theValue._U64 < x._theValue._R64) |
Real64 temp; |
|
memcpy(&temp, &_theValue._U64, sizeof(temp)); |
|
if(temp < x._theValue._R64) |
{ | { |
return true; | return true; |
} | } |
|
|
} | } |
else if(x._valueType == Uint64_type) | else if(x._valueType == Uint64_type) |
{ | { |
if(_theValue._R64 < x._theValue._U64) |
Real64 temp; |
|
memcpy(&temp, &x._theValue._U64, sizeof(temp)); |
|
if(_theValue._R64 < temp) |
{ | { |
return true; | return true; |
} | } |
|
|
{ | { |
throw(Exception(String("CQLValueRep::operator>"))); | throw(Exception(String("CQLValueRep::operator>"))); |
} | } |
|
if (this->operator<(x) || this->operator==(x)) |
if(x._valueType == Null_type || |
|
_valueType == Null_type) |
|
{ |
|
throw(Exception(String("CQLValueRep::operator>"))); |
|
} |
|
|
|
switch(_valueType) |
|
{ |
|
case Boolean_type: |
|
{ |
|
if(x._valueType == Boolean_type) |
|
{ |
|
if(_theValue._B > x._theValue._B) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
} |
|
case Sint64_type: |
|
if(x._valueType == Sint64_type) |
|
{ |
|
if(_theValue._S64 > x._theValue._S64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Uint64_type) |
|
{ |
|
if(_theValue._S64 > (Sint64)x._theValue._U64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Real_type) |
|
{ |
|
if(_theValue._S64 > x._theValue._R64) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
case Uint64_type: |
|
if(x._valueType == Sint64_type) |
|
{ |
|
if((Sint64)_theValue._U64 > x._theValue._S64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Uint64_type) |
|
{ |
|
if(_theValue._U64 > x._theValue._U64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Real_type) |
|
{ |
|
if(_theValue._U64 > x._theValue._R64) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
case Real_type: |
|
if(x._valueType == Sint64_type) |
|
{ |
|
if(_theValue._R64 > x._theValue._S64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Uint64_type) |
|
{ |
|
if(_theValue._R64 > x._theValue._U64) |
|
{ |
|
return true; |
|
} |
|
} |
|
else if(x._valueType == Real_type) |
|
{ |
|
if(_theValue._R64 > x._theValue._R64) |
|
{ |
|
return true; |
|
} |
|
} |
|
break; |
|
case String_type: |
|
if(*_theValue._S > *x._theValue._S) |
|
{ |
|
return true; |
|
} |
|
break; |
|
case CIMDateTime_type: |
|
throw(Exception(String("CQLValueRep::operator>"))); |
|
break; |
|
case CIMReference_type: |
|
throw(Exception(String("CQLValueRep::operator>"))); |
|
break; |
|
case CIMInstance_type: |
|
throw(Exception(String("CQLValueRep::operator>"))); |
|
break; |
|
case CQLIdentifier_type: |
|
throw(Exception(String("CQLValueRep::operator>"))); |
|
break; |
|
|
|
default: |
|
throw(Exception(String("CQLValueRep::operator>"))); |
|
break; |
|
} |
|
return false; | return false; |
|
return true; |
} | } |
| |
| |
|
|
} | } |
else if(x._valueType == Real_type) | else if(x._valueType == Real_type) |
{ | { |
return CQLValueRep(_theValue._U64 + x._theValue._R64); |
Real64 temp; |
|
memcpy(&temp, &_theValue._U64, sizeof(temp)); |
|
return CQLValueRep(temp + x._theValue._R64); |
} | } |
break; | break; |
case Real_type: | case Real_type: |
|
|
} | } |
else if(x._valueType == Uint64_type) | else if(x._valueType == Uint64_type) |
{ | { |
return CQLValueRep(_theValue._R64 + x._theValue._U64); |
Real64 temp; |
|
memcpy(&temp, &x._theValue._U64, sizeof(temp)); |
|
return CQLValueRep(_theValue._R64 + temp); |
} | } |
else if(x._valueType == Real_type) | else if(x._valueType == Real_type) |
{ | { |
|
|
} | } |
else if(x._valueType == Real_type) | else if(x._valueType == Real_type) |
{ | { |
return CQLValueRep(_theValue._U64 - x._theValue._R64); |
Real64 temp; |
|
memcpy(&temp, &_theValue._U64, sizeof(temp)); |
|
return CQLValueRep(temp - x._theValue._R64); |
} | } |
break; | break; |
case Real_type: | case Real_type: |
|
|
} | } |
else if(x._valueType == Uint64_type) | else if(x._valueType == Uint64_type) |
{ | { |
return CQLValueRep(_theValue._R64 - x._theValue._U64); |
Real64 temp; |
|
memcpy(&temp, &x._theValue._U64, sizeof(temp)); |
|
return CQLValueRep(_theValue._R64 - temp); |
} | } |
else if(x._valueType == Real_type) | else if(x._valueType == Real_type) |
{ | { |
|
|
} | } |
else if(x._valueType == Real_type) | else if(x._valueType == Real_type) |
{ | { |
return CQLValueRep(_theValue._U64 * x._theValue._R64); |
Real64 temp; |
|
memcpy(&temp, &_theValue._U64, sizeof(temp)); |
|
return CQLValueRep(temp * x._theValue._R64); |
} | } |
break; | break; |
case Real_type: | case Real_type: |
|
|
} | } |
else if(x._valueType == Uint64_type) | else if(x._valueType == Uint64_type) |
{ | { |
return CQLValueRep(_theValue._R64 * x._theValue._U64); |
Real64 temp; |
|
memcpy(&temp, &x._theValue._U64, sizeof(temp)); |
|
return CQLValueRep(_theValue._R64 * temp); |
} | } |
else if(x._valueType == Real_type) | else if(x._valueType == Real_type) |
{ | { |
|
|
} | } |
else if(x._valueType == Real_type) | else if(x._valueType == Real_type) |
{ | { |
return CQLValueRep(_theValue._U64 / x._theValue._R64); |
Real64 temp; |
|
memcpy(&temp, &_theValue._U64, sizeof(temp)); |
|
return CQLValueRep(temp / x._theValue._R64); |
} | } |
break; | break; |
case Real_type: | case Real_type: |
|
|
} | } |
else if(x._valueType == Uint64_type) | else if(x._valueType == Uint64_type) |
{ | { |
return CQLValueRep(_theValue._R64 / x._theValue._U64); |
Real64 temp; |
|
memcpy(&temp, &x._theValue._U64, sizeof(temp)); |
|
return CQLValueRep(_theValue._R64 / temp); |
} | } |
else if(x._valueType == Real_type) | else if(x._valueType == Real_type) |
{ | { |
|
|
| |
void CQLValueRep::applyContext(QueryContext& _ctx, | void CQLValueRep::applyContext(QueryContext& _ctx, |
CQLChainedIdentifier& inCid) | CQLChainedIdentifier& inCid) |
{cout << "CQLValueRep::applyContext 0" << endl; |
{ |
|
printf("CQLValueRep::applyContext 0\n"); |
if(inCid.size() != 0 && _CQLChainId.size() == 1) | if(inCid.size() != 0 && _CQLChainId.size() == 1) |
{ | { |
| |