version 1.77, 2011/06/01 10:27:42
|
version 1.78, 2011/12/12 05:52:44
|
|
|
case CIMTYPE_INSTANCE: | case CIMTYPE_INSTANCE: |
// From PEP 194: EmbeddedObjects cannot be keys. | // From PEP 194: EmbeddedObjects cannot be keys. |
return false; | return false; |
break; |
|
default: // Numerics | default: // Numerics |
if (getType() != NUMERIC) return false; | if (getType() != NUMERIC) return false; |
kbValue = XmlReader::stringToValue(0, getValue().getCString(), | kbValue = XmlReader::stringToValue(0, getValue().getCString(), |
|
|
// If CIMObjectPath parsing fails, just compare strings | // If CIMObjectPath parsing fails, just compare strings |
return String::equal(x.getValue(), y.getValue()); | return String::equal(x.getValue(), y.getValue()); |
} | } |
break; |
|
case CIMKeyBinding::BOOLEAN: | case CIMKeyBinding::BOOLEAN: |
// Case-insensitive comparison is sufficient for booleans | // Case-insensitive comparison is sufficient for booleans |
return String::equalNoCase(x.getValue(), y.getValue()); | return String::equalNoCase(x.getValue(), y.getValue()); |
break; |
|
case CIMKeyBinding::NUMERIC: | case CIMKeyBinding::NUMERIC: |
// Note: This comparison assumes XML syntax for integers | // Note: This comparison assumes XML syntax for integers |
// First try comparing as unsigned integers | // First try comparing as unsigned integers |
|
|
// Note: Keys may not be real values, so don't try comparing as reals | // Note: Keys may not be real values, so don't try comparing as reals |
// We couldn't parse the numbers, so just compare the strings | // We couldn't parse the numbers, so just compare the strings |
return String::equal(x.getValue(), y.getValue()); | return String::equal(x.getValue(), y.getValue()); |
break; |
|
default: // CIMKeyBinding::STRING | default: // CIMKeyBinding::STRING |
return String::equal(x.getValue(), y.getValue()); | return String::equal(x.getValue(), y.getValue()); |
break; |
|
} | } |
| |
PEGASUS_UNREACHABLE(return false;) | PEGASUS_UNREACHABLE(return false;) |