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

Diff for /pegasus/src/Pegasus/Common/CIMDateTime.cpp between version 1.39 and 1.40

version 1.39, 2004/05/05 19:43:41 version 1.40, 2004/05/31 10:47:41
Line 30 
Line 30 
 //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) //              Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 //              Carol Ann Krug Graves, Hewlett-Packard Company //              Carol Ann Krug Graves, Hewlett-Packard Company
 //                (carolann_graves@hp.com) //                (carolann_graves@hp.com)
 //              Amit K Arora, IBM (amita@in.ibm.com) for PEP-101  
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 73 
Line 72 
 static const char _NULL_INTERVAL_TYPE_STRING[] = "00000000000000.000000:000"; static const char _NULL_INTERVAL_TYPE_STRING[] = "00000000000000.000000:000";
 static const char _NULL_DATE_TYPE_STRING[] = "00000000000000.000000-000"; static const char _NULL_DATE_TYPE_STRING[] = "00000000000000.000000-000";
  
   class CIMDateTimeRep
   {
   public:
       enum { FORMAT_LENGTH = 25 };
   
       //
       // Length of the string required to store only the date and time without
       // the UTC sign and UTC offset.
       // Format is yyyymmddhhmmss.
       // Note : The size does not include the null byte.
       //
       enum { DATE_TIME_LENGTH = 14 };
   
       //
       // Length of the string required to store the  formatted date and time
       // Format is yyyy:mm:dd:hh:mm:ss.
       //
       enum { FORMATTED_DATE_TIME = 20 };
  
 CIMDateTime::CIMDateTime() :      char data[FORMAT_LENGTH + 1];
        _rep(new CIMDateTimeRep())  };
   
   
   CIMDateTime::CIMDateTime()
 { {
       _rep = new CIMDateTimeRep();
     clear();     clear();
 } }
  
 CIMDateTime::CIMDateTime(const String & str) :  CIMDateTime::CIMDateTime(const String & str)
        _rep(new CIMDateTimeRep())  
 { {
       _rep = new CIMDateTimeRep();
     if (!_set(str))     if (!_set(str))
     {     {
         _rep.reset();          delete _rep;
         throw InvalidDateTimeFormatException();         throw InvalidDateTimeFormatException();
     }     }
 } }
  
   CIMDateTime::CIMDateTime(const CIMDateTime& x)
 CIMDateTime::CIMDateTime(const CIMDateTime& x) :  
        _rep(new CIMDateTimeRep())  
 { {
       _rep = new CIMDateTimeRep();
     memcpy(_rep->data, x._rep->data, sizeof(_rep->data));     memcpy(_rep->data, x._rep->data, sizeof(_rep->data));
 } }
  
Line 105 
Line 125 
     return *this;     return *this;
 } }
  
   CIMDateTime::~CIMDateTime()
   {
       delete _rep;
   }
   
 String CIMDateTime::toString () const String CIMDateTime::toString () const
 { {
     return String (_rep->data);     return String (_rep->data);


Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2