version 1.75, 2008/12/16 18:55:59
|
version 1.76, 2009/12/15 11:39:33
|
|
|
#include "CIMName.h" | #include "CIMName.h" |
#include "CIMValue.h" | #include "CIMValue.h" |
#include "XmlReader.h" | #include "XmlReader.h" |
|
#include <Pegasus/Common/StringConversion.h> |
#include "ArrayInternal.h" | #include "ArrayInternal.h" |
#include "HostLocator.h" | #include "HostLocator.h" |
#include "System.h" | #include "System.h" |
|
|
{ | { |
Uint64 xValue; | Uint64 xValue; |
Uint64 yValue; | Uint64 yValue; |
if (XmlReader::stringToUnsignedInteger( |
if (StringConversion::stringToUnsignedInteger( |
x.getValue().getCString(), xValue) && | x.getValue().getCString(), xValue) && |
XmlReader::stringToUnsignedInteger( |
StringConversion::stringToUnsignedInteger( |
y.getValue().getCString(), yValue)) | y.getValue().getCString(), yValue)) |
{ | { |
return (xValue == yValue); | return (xValue == yValue); |
|
|
{ | { |
Sint64 xValue; | Sint64 xValue; |
Sint64 yValue; | Sint64 yValue; |
if (XmlReader::stringToSignedInteger( |
if (StringConversion::stringToSignedInteger( |
x.getValue().getCString(), xValue) && | x.getValue().getCString(), xValue) && |
XmlReader::stringToSignedInteger( |
StringConversion::stringToSignedInteger( |
y.getValue().getCString(), yValue)) | y.getValue().getCString(), yValue)) |
{ | { |
return (xValue == yValue); | return (xValue == yValue); |
|
|
if (*p == '-') | if (*p == '-') |
{ | { |
Sint64 x; | Sint64 x; |
if (!XmlReader::stringToSignedInteger(p, x)) |
if (!StringConversion::stringToSignedInteger(p, x)) |
throw MalformedObjectNameException(objectName); | throw MalformedObjectNameException(objectName); |
} | } |
else | else |
{ | { |
Uint64 x; | Uint64 x; |
if (!XmlReader::stringToUnsignedInteger(p, x)) |
if (!StringConversion::stringToUnsignedInteger(p, x)) |
throw MalformedObjectNameException(objectName); | throw MalformedObjectNameException(objectName); |
} | } |
| |
|
|
Uint64 uValue; | Uint64 uValue; |
Sint64 sValue; | Sint64 sValue; |
// First try converting to unsigned integer | // First try converting to unsigned integer |
if (XmlReader::stringToUnsignedInteger( |
if (StringConversion::stringToUnsignedInteger( |
ref._rep->_keyBindings[i]._rep->_value.getCString(), | ref._rep->_keyBindings[i]._rep->_value.getCString(), |
uValue)) | uValue)) |
{ | { |
|
|
ref._rep->_keyBindings[i]._rep->_value = String(buffer); | ref._rep->_keyBindings[i]._rep->_value = String(buffer); |
} | } |
// Next try converting to signed integer | // Next try converting to signed integer |
else if (XmlReader::stringToSignedInteger( |
else if (StringConversion::stringToSignedInteger( |
ref._rep->_keyBindings[i]._rep->_value.getCString(), | ref._rep->_keyBindings[i]._rep->_value.getCString(), |
sValue)) | sValue)) |
{ | { |