version 1.22, 2002/03/22 01:42:01
|
version 1.24, 2002/04/01 19:06:03
|
|
|
void _toString(Array<Sint8>& out, Real64 x) | void _toString(Array<Sint8>& out, Real64 x) |
{ | { |
char buffer[128]; | char buffer[128]; |
// %g gives '[-]m.dddddd[e+/-xx]', which seems compatible with CIM/XML spec |
// %e gives '[-]m.dddddde+/-xx', which seems compatible with CIM/XML spec |
sprintf(buffer, "%g", x); |
sprintf(buffer, "%e", x); |
out << buffer; | out << buffer; |
} | } |
| |
|
|
break; | break; |
| |
case CIMType::STRING: | case CIMType::STRING: |
new(_u._stringValue) String(*((String*)x._u._stringValue)); |
_u._stringValue = new String(*(x._u._stringValue)); |
break; | break; |
| |
case CIMType::DATETIME: | case CIMType::DATETIME: |
|
|
break; | break; |
| |
case CIMType::STRING: | case CIMType::STRING: |
((String*)_u._stringValue)->~String(); |
delete _u._stringValue; |
break; | break; |
| |
case CIMType::DATETIME: | case CIMType::DATETIME: |
|
|
break; | break; |
| |
case CIMType::STRING: | case CIMType::STRING: |
_toXml(out, *((String*)_u._stringValue)); |
_toXml(out, *_u._stringValue); |
break; | break; |
| |
case CIMType::DATETIME: | case CIMType::DATETIME: |
|
|
break; | break; |
| |
case CIMType::STRING: | case CIMType::STRING: |
_toMof(out, *((String*)_u._stringValue)); |
_toMof(out, *_u._stringValue); |
break; | break; |
| |
case CIMType::DATETIME: | case CIMType::DATETIME: |
|
|
void CIMValue::set(const String& x) | void CIMValue::set(const String& x) |
{ | { |
clear(); | clear(); |
new(_u._stringValue) String(x); |
_u._stringValue = new String(x); |
_type = CIMType::STRING; | _type = CIMType::STRING; |
_isNull = false; | _isNull = false; |
} | } |
|
|
if (_type != CIMType::STRING || _isArray) | if (_type != CIMType::STRING || _isArray) |
throw TypeMismatch(); | throw TypeMismatch(); |
| |
x = *((String*)_u._stringValue); |
x = *_u._stringValue; |
} | } |
| |
void CIMValue::get(CIMDateTime& x) const | void CIMValue::get(CIMDateTime& x) const |
|
|
return x._u._char16Value == y._u._char16Value; | return x._u._char16Value == y._u._char16Value; |
| |
case CIMType::STRING: | case CIMType::STRING: |
return String::equal( |
return String::equal(*x._u._stringValue, *y._u._stringValue); |
*((String*)x._u._stringValue), |
|
*((String*)y._u._stringValue)); |
|
| |
case CIMType::DATETIME: | case CIMType::DATETIME: |
return *x._u._dateTimeValue == *y._u._dateTimeValue; | return *x._u._dateTimeValue == *y._u._dateTimeValue; |
|
|
break; | break; |
| |
case CIMType::STRING: | case CIMType::STRING: |
_toString(out, *((String*)_u._stringValue)); |
_toString(out, *_u._stringValue); |
break; | break; |
| |
case CIMType::DATETIME: | case CIMType::DATETIME: |