In file ..\..\src\Pegasus\Common\CIMDateTime.h:

class PEGASUS_COMMON_LINKAGE CIMDateTime

The CIMDateTime class represents the CIM datetime data type as a C++ class CIMDateTime.

Documentation

The CIMDateTime class represents the CIM datetime data type as a C++ class CIMDateTime. A CIM datetime may contain a date or an interval. CIMDateTime is an intrinsic CIM data type which represents the time as a formated fixedplength string.

    A date has the following form:
	yyyymmddhhmmss.mmmmmmsutc

Where

yyyy = year (0-1999) mm = month (1-12) dd = day (1-31) hh = hour (0-23) mm = minute (0-59) ss = second (0-59) mmmmmm = microseconds. s = '+' or '-' to represent the UTC sign. utc = UTC offset (same as GMT offset).

An interval has the following form:

ddddddddhhmmss.mmmmmm:000

Where

dddddddd = days hh = hours mm = minutes ss = seconds mmmmmm = microseconds

Note that intervals always end in ":000" (this is how they are distinguished from dates).

Intervals are really durations since they do not specify a start and end time (as one expects when speaking about an interval). It is better to think of an interval as specifying time elapsed since some event.

CIMDateTime objects are constructed from C character strings or from other CIMDateTime objects. These character strings must be exactly twenty-five characters and conform to one of the forms idententified above.

CIMDateTime objects which are not explicitly initialized will be implicitly initialized with the null time interval:

00000000000000.000000:000

Instances can be tested for nullness with the isNull() method.

ATTN: Add inequalities.


Inheritance:


Public Fields

[more]const CIMDateTime& x

Public Methods

[more] CIMDateTime ()
CIMDateTime CIMMethod
[more] CIMDateTime (const char* str)
CIMDateTime CIMMethod creates the CIM CIMDateTime from a string constant representing the CIM DateTime formatted datetime
[more] CIMDateTime (const CIMDateTime& x)
CIMDateTime CIMMethod - Creates the CIMDateTime instance from another CIMDateTime object
[more] ~CIMDateTime ()
Destructor.
[more]CIMDateTime& operator= (const CIMDateTime& x)
assign CIMDateTime
[more]Boolean isNull () const
CIMDateTime isNull method - Tests for an all zero date time
 	CIMDateTime dt; 	dtclear();     	assert(dtisNull());     	
[more]const char* getString () const
method getString
[more]void set (const char* str)
method set - Sets the date time.
[more]void clear ()
clear - Clears the datetime class instance

o CIMDateTime()
CIMDateTime CIMMethod

o CIMDateTime(const char* str)
CIMDateTime CIMMethod creates the CIM CIMDateTime from a string constant representing the CIM DateTime formatted datetime
Parameters:
str - String object containing the CIM DateTime formatted string

o CIMDateTime(const CIMDateTime& x)
CIMDateTime CIMMethod - Creates the CIMDateTime instance from another CIMDateTime object
Parameters:
- x CIMDateTime object to be copied.

o ~CIMDateTime()
Destructor.

oCIMDateTime& operator=(const CIMDateTime& x)
assign CIMDateTime

oBoolean isNull() const
CIMDateTime isNull method - Tests for an all zero date time
	CIMDateTime dt;
	dtclear();
    	assert(dtisNull());
    	
Returns:
This method returns true of the contents are "00000000000000.000000:000". Else it returns false

oconst char* getString() const
method getString

ovoid set(const char* str)
method set - Sets the date time. Creates the CIMDateTime instance from the input string constant which must be in the datetime format.

	    CIMDateTime dt;
	    dt.set("19991224120000.000000+360");
	    

Throws:
Throws exception BadDateTimeFormat on format error.
Returns:
On format error, CIMDateTime set throws the exception BadDateTimeFormat

ovoid clear()
clear - Clears the datetime class instance

oconst CIMDateTime& x


This class has no child classes.
Friends:
Boolean operator==(

Alphabetic index HTML hierarchy of classes or Java