version 1.57, 2006/11/07 21:30:36
|
version 1.58, 2006/11/10 18:14:57
|
|
|
catch (Exception&) | catch (Exception&) |
{ | { |
// 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; | 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; | break; |
case CIMKeyBinding::NUMERIC: | case CIMKeyBinding::NUMERIC: |
// Note: This comparison assumes XML syntax for integers | // Note: This comparison assumes XML syntax for 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; | break; |
default: // CIMKeyBinding::STRING | default: // CIMKeyBinding::STRING |
return (String::equal(x.getValue(), y.getValue())); |
return String::equal(x.getValue(), y.getValue()); |
break; | break; |
} | } |
| |
|
|
// If a non-digit is encountered, set "all-numeric" | // If a non-digit is encountered, set "all-numeric" |
// flag to false | // flag to false |
if (isalpha(hostname[i]) || (hostname[i] == '-') || | if (isalpha(hostname[i]) || (hostname[i] == '-') || |
(hostname[i] == '_')) { |
(hostname[i] == '_')) |
|
{ |
hostSegmentIsNumeric = false; | hostSegmentIsNumeric = false; |
} | } |
i++; | i++; |
|
|
} | } |
// If the last Host Segment is all numeric, then return false. | // If the last Host Segment is all numeric, then return false. |
// RFC 1123 says "highest-level component label will be alphabetic". | // RFC 1123 says "highest-level component label will be alphabetic". |
if (hostSegmentIsNumeric) { |
if (hostSegmentIsNumeric) |
|
{ |
return false; | return false; |
} | } |
} | } |