version 1.16, 2002/04/19 12:09:26
|
version 1.17, 2002/05/01 05:15:06
|
|
|
// Author: Mike Brasher (mbrasher@bmc.com) | // Author: Mike Brasher (mbrasher@bmc.com) |
// | // |
// Modified By: Karl Schopmeyer(k.schopmeyer@opengroup.org) | // Modified By: Karl Schopmeyer(k.schopmeyer@opengroup.org) |
// |
// Sushma Fernandes, Hewlett Packard Company |
// Modified By: Sushma Fernandes, Hewlett Packard Company |
|
// (sushma_fernandes@hp.com) | // (sushma_fernandes@hp.com) |
|
// Roger Kumpf, Hewlett Packard Company (roger_kumpf@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/Array.h> | #include <Pegasus/Common/Array.h> |
|
#ifdef PEGASUS_INTERNALONLY |
#include <iostream> | #include <iostream> |
|
#endif |
#include <time.h> |
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
{ | { |
public: | public: |
| |
enum { FORMAT_LENGTH = 25 }; |
|
/** Create a new CIMDateTime object with NULL DateTime definition. | /** Create a new CIMDateTime object with NULL DateTime definition. |
*/ | */ |
CIMDateTime(); | CIMDateTime(); |
|
|
CIMDateTime(const CIMDateTime& x); | CIMDateTime(const CIMDateTime& x); |
| |
/** DateTime Destructor. */ | /** DateTime Destructor. */ |
~CIMDateTime() { } |
~CIMDateTime(); |
| |
/** Assign one DateTime object to another | /** Assign one DateTime object to another |
@param - The DateTime Object to assign | @param - The DateTime Object to assign |
|
|
*/ | */ |
Boolean isInterval(); | Boolean isInterval(); |
| |
/** CIMDateTime - ATTN: Friend operator Test for CIMDateTime |
#ifdef PEGASUS_INTERNALONLY |
equality |
|
*/ |
|
PEGASUS_COMMON_LINKAGE friend Boolean operator==( |
|
const CIMDateTime& x, |
|
const CIMDateTime& y); |
|
|
|
private: | private: |
| |
|
enum { FORMAT_LENGTH = 25 }; |
|
|
// | // |
// Length of the string required to store only the date and time without | // Length of the string required to store only the date and time without |
// the UTC sign and UTC offset. | // the UTC sign and UTC offset. |
|
|
@param tm Contains the tm structure to be updated. | @param tm Contains the tm structure to be updated. |
*/ | */ |
static void formatDateTime(char* dateTime, tm* tm); | static void formatDateTime(char* dateTime, tm* tm); |
|
#endif |
|
|
|
/** CIMDateTime - ATTN: Friend operator Test for CIMDateTime |
|
equality |
|
*/ |
|
PEGASUS_COMMON_LINKAGE friend Boolean operator==( |
|
const CIMDateTime& x, |
|
const CIMDateTime& y); |
}; | }; |
| |
PEGASUS_COMMON_LINKAGE Boolean operator==( | PEGASUS_COMMON_LINKAGE Boolean operator==( |
const CIMDateTime& x, | const CIMDateTime& x, |
const CIMDateTime& y); | const CIMDateTime& y); |
| |
|
#ifdef PEGASUS_INTERNALONLY |
PEGASUS_COMMON_LINKAGE PEGASUS_STD(ostream)& operator<<( | PEGASUS_COMMON_LINKAGE PEGASUS_STD(ostream)& operator<<( |
PEGASUS_STD(ostream)& os, | PEGASUS_STD(ostream)& os, |
const CIMDateTime& x); | const CIMDateTime& x); |
|
#endif |
| |
#define PEGASUS_ARRAY_T CIMDateTime | #define PEGASUS_ARRAY_T CIMDateTime |
# include "ArrayInter.h" | # include "ArrayInter.h" |