(file) Return to CIMValue.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/CIMValue.cpp between version 1.22 and 1.24

version 1.22, 2002/03/22 01:42:01 version 1.24, 2002/04/01 19:06:03
Line 246 
Line 246 
 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;
 } }
  
Line 594 
Line 594 
                 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:
Line 789 
Line 789 
                 break;                 break;
  
             case CIMType::STRING:             case CIMType::STRING:
                 ((String*)_u._stringValue)->~String();                  delete _u._stringValue;
                 break;                 break;
  
             case CIMType::DATETIME:             case CIMType::DATETIME:
Line 967 
Line 967 
                 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:
Line 1124 
Line 1124 
                 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:
Line 1250 
Line 1250 
 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;
 } }
Line 1513 
Line 1513 
     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
Line 1781 
Line 1781 
                 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;
Line 2083 
Line 2081 
                 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:


Legend:
Removed from v.1.22  
changed lines
  Added in v.1.24

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2