[an error occurred while processing this directive]
[an error occurred while processing this directive] [an error occurred while processing this directive]

Pegasus CIM Object Broker Documentation

[an error occurred while processing this directive]


[an error occurred while processing this directive]

 

Contents

o Introduction
o Objectives
o Overview
o Credits
o Pegasus Architecture
   o Design Goals
   o The Broker
   o Pegasus Providers.
   o Extension Services
   o Pegasus Clients.
   o Functional Flow
o Pegasus Components
   o Component Descriptions
   o Pegasus Directory Structure
o Pegasus Utilization
   o Pegasus Availability
   o Pegasus Installation
   o Pegasus Operation
   o Pegasus CIM Clients
   o Pegasus Providers
   o Pegasus MOF Compiler
o Programming Pegasus
   o CIM Objects in Pegasus
   o CIM Object Table
   o Class Definitions
o Pegasus Interfaces
   o CIM Operations over HTTP
   o Pegasus Client Interfaces
   o Pegasus Provider Interfaces
   o Pegasus Service Extension Interfaces
   o Repository Interfaces
o Writing Providers.
o Glossary
o Pegasus Code Examples
   o Client Examples
   o Client Coding Examples
   o Provider Coding Examples
o Document References
o Pegausus FAQ
o
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 time stamp or an interval. CIMDateTime is an intrinsic CIM data type that represents the time as a string with a fixed length.

    A time stamp has the following form:
    yyyymmddhhmmss.mmmmmmsutc

Where

yyyy = year (1-9999) 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 Coordinated Universal Time (UTC) sign utc = offset from Coordinated Universal Time (UTC) (same as Greenwich Mean Time(GMT) offset)

An interval has the following form:

ddddddddhhmmss.mmmmmm:000

Where

dddddddd = days hh = hours (0-23) mm = minutes (0-59) ss = seconds (0-59) mmmmmm = microseconds

Note: Intervals always end in ":000". This distinguishes intervals from time stamps.

CIMDateTime objects are constructed from String objects or from other CIMDateTime objects. Character strings must be exactly twenty-five characters in length and conform to either the time stamp or interval format.

CIMDateTime objects that are not explicitly initialized will be implicitly initialized with a zero time interval:

00000000000000.000000:000

The following table shows what arithmetic operations are allowed between CIMDateTime types. The entries in the last four columns define the type of the result when the operation, specified in the column header, is performed on operands, of the types specified in the first two columns.

    LHS - left hand side    TS - time stamp  int - integer
    RHS - right hand side   IV - interval
    X - operation not allowed between types

LHS RHS + - * / _____________________________________________ TS TS X IV X X TS IV TS TS X X TS int X X X X IV IV IV IV X int IV TS X X X X IV int X X IV IV int TS X X X X int IV X X X X

The relational operators may only operate on two operands of the same type, i.e. two time stamps or two intervals.


Inheritance:


Public Fields

[more]static const Uint32 WILDCARD
Wildcard parameter for component-based initializer member functions

Public Methods

[more] CIMDateTime ()
Creates a new CIMDateTime object with a zero interval value
[more] CIMDateTime (const CIMDateTime& x)
Creates a CIMDateTime object from another CIMDateTime object.
[more] CIMDateTime (const String& str)
Creates a new CIMDateTime object from a string constant representing the CIM DateTime formatted datetime.
[more] CIMDateTime (Uint64 usec, Boolean isInterval)
Creates a CIMDateTime object from an integer.
[more] CIMDateTime ( Uint32 year, Uint32 month, Uint32 day, Uint32 hours, Uint32 minutes, Uint32 seconds, Uint32 microseconds, Uint32 numSignificantMicrosecondDigits, Sint32 utcOffset)
Create datetime time stamp from components.
[more] CIMDateTime ( Uint32 days, Uint32 hours, Uint32 minutes, Uint32 seconds, Uint32 microseconds, Uint32 numSignificantMicrosecondDigits)
Create datetime interval from components.
[more] ~CIMDateTime ()
CIMDateTime destructor.
[more]CIMDateTime& operator= (const CIMDateTime& x)
Assigns one instance of the CIMDateTime object to another.
[more]String toString () const
Returns a string representing the DateTime value of the CIMDateTime object.
[more]void set (const String & str)
Sets the datetime value from the input parameter.
[more]void setTimeStamp ( Uint32 year, Uint32 month, Uint32 day, Uint32 hours, Uint32 minutes, Uint32 seconds, Uint32 microseconds, Uint32 numSignificantMicrosecondDigits, Sint32 utcOffset)
Sets the datetime timestamp from individual components.
[more]void setInterval ( Uint32 days, Uint32 hours, Uint32 minutes, Uint32 seconds, Uint32 microseconds, Uint32 numSignificantMicrosecondDigits)
Create datetime interval from components.
[more]void clear ()
Clears the datetime class object.
[more]static CIMDateTime getCurrentDateTime ()
Returns the current local time in a CIMDateTime object.
[more]static Sint64 getDifference (CIMDateTime startTime, CIMDateTime finishTime)
Computes the difference in microseconds between two CIMDateTime time stamps or two CIMDateTime intervals.
[more]Boolean isInterval ()
Checks whether the datetime is an interval.Checks whether the datetime is an interval.
[more]Boolean isTimeStamp () const
Checks whether the datetime is a timestamp.
[more]Boolean equal (const CIMDateTime& x) const
Compares the CIMDateTime object to another CIMDateTime object for equality.
[more]Uint64 toMicroSeconds () const
Converts a CIMDateTime object to its microsecond representation.
[more]CIMDateTime operator+ (const CIMDateTime& x) const
Adds two CIMDateTime objects and returns a CIMDateTime object that represents the sum.
[more]CIMDateTime& operator+= (const CIMDateTime& x)
Adds two CIMDateTime objects, returns the sum and changes the value of the calling CIMDateTime object to match the return value.
[more]CIMDateTime operator- (const CIMDateTime& x) const
Subtracts one CIMDateTime object from another and returns a CIMDateTime object that represents the difference.
[more]CIMDateTime& operator-= (const CIMDateTime& x)
Subtracts one CIMDateTime object from another, returns the difference and changes the value of the calling CIMDateTime object to match the return value.
[more]CIMDateTime operator* (Uint64 x) const
Multiplies a CIMDateTime object by an integer and returns a CIMDateTime object that represents the product.
[more]CIMDateTime& operator*= (Uint64 x)
Multiplies a CIMDateTime object by an integer, returns the product and changes the value of the calling object to match the returned product.
[more]CIMDateTime operator/ (Uint64 num) const
Divides a CIMDateTime object by an integer and returns a CIMDateTime object that represents the quotient.
[more]CIMDateTime& operator/= (Uint64 num)
Divides a CIMDateTime object by an integer, returns the quotient and changes the value of the calling object to match the returned quotient.
[more]Uint64 operator/ (const CIMDateTime& cdt) const
Divides a CIMDateTime object by another CIMDateTime object and returns an integer quotient.
[more]Boolean operator< (const CIMDateTime& x) const
Compare two CIMDateTime objects and returns true if the LHS is less than the RHS.
[more]Boolean operator<= (const CIMDateTime& x) const
Compare two CIMDateTime objects and returns true if the LHS is less than or equal to the RHS.
[more]Boolean operator> (const CIMDateTime & x) const
Compare two CIMDateTime objects and returns true if the LHS is greater than the RHS.
[more]Boolean operator>= (const CIMDateTime & x) const
Compare two CIMDateTime objects and returns true if the LHS is greater than or equal to the RHS.
[more]Boolean operator!= (const CIMDateTime & x) const
Compare two CIMDateTime objects and returns true if the LHS is not equal to the RHS.

ostatic const Uint32 WILDCARD
Wildcard parameter for component-based initializer member functions

o CIMDateTime()
Creates a new CIMDateTime object with a zero interval value

o CIMDateTime(const CIMDateTime& x)
Creates a CIMDateTime object from another CIMDateTime object.
Parameters:
x - Specifies the name of the CIMDateTime object to copy.

o CIMDateTime(const String& str)
Creates a new CIMDateTime object from a string constant representing the CIM DateTime formatted datetime. See the class documentation for CIMDateTime for the definition of the input string for absolute and interval datetime.
Throws:
InvalidDateTimeFormatException If the input string is not formatted correctly.
Parameters:
str - String object containing the CIMDateTime formatted string. This must contain twenty-five characters.

o CIMDateTime(Uint64 usec, Boolean isInterval)
Creates a CIMDateTime object from an integer.
Throws:
DateTimeOutOfRangeException If the microSec value is too large (greater than 317,455,200,000,000,000 for a time stamps or 8,640,000,000,000,000,000 for an interval).
InvalidDateTimeFormatException If the CIMDateTime object is not formed correctly.
Parameters:
usec - For a time stamp, the number of microseconds since the epoch 0/0/0000 (12 am Jan 1, 1BCE); For an interval, the number of microseconds in the interval.
- isInterval Specifies whether the CIMDateTime object is to be created as an interval value (true) or a time stamp (false).

o CIMDateTime( Uint32 year, Uint32 month, Uint32 day, Uint32 hours, Uint32 minutes, Uint32 seconds, Uint32 microseconds, Uint32 numSignificantMicrosecondDigits, Sint32 utcOffset)
Create datetime time stamp from components.
Throws:
DateTimeOutOfRangeException.
Parameters:
year - zero-based year number (or CIMDateTime::WILDCARD)
month - number from 1 to 12 (or CIMDateTime::WILDCARD)
day - one-based day of the month (or CIMDateTime::WILDCARD)
hours - a number from 0 to 23 (or CIMDateTime::WILDCARD)
minutes - a number from 0 to 59 (or CIMDateTime::WILDCARD)
seconds - a number from 0 to 59 (or CIMDateTime::WILDCARD)
microseconds - a number from 0 to 999999
numSignificantMicrosecondDigits - the number of decimal digits of the microseconds parameter (from left to right) that are significant (all others are wildcarded) or six if they are all significant.
UTF - offset in minutes (negative or positive).

o CIMDateTime( Uint32 days, Uint32 hours, Uint32 minutes, Uint32 seconds, Uint32 microseconds, Uint32 numSignificantMicrosecondDigits)
Create datetime interval from components.
Throws:
DateTimeOutOfRangeException.
Parameters:
days - a number from 0 to 99999999 (or CIMDateTime::WILDCARD)
hours - a number from 0 to 23 (or CIMDateTime::WILDCARD)
minutes - a number from 0 to 59 (or CIMDateTime::WILDCARD)
seconds - a number from 0 to 59 (or CIMDateTime::WILDCARD)
microseconds - a number from 0 to 999999
numSignificantMicrosecondDigits - the number of decimal digits of the microseconds parameter (from left to right) that are significant (all others are wildcarded) or six if they are all significant.

o ~CIMDateTime()
CIMDateTime destructor.

oCIMDateTime& operator=(const CIMDateTime& x)
Assigns one instance of the CIMDateTime object to another.
Parameters:
x - The CIMDateTime Object to assign to the CIMDateTime object. For example, you can assign the d1 CIMDateTime instance to the d2 CIMDateTime instance.
CIMDateTime d1;
CIMDateTime d2 = "00000000000000.000000:000";
d1 = d2;
Therefore, d1 is assigned the same "00000000000000.000000:000" value as d2.

oString toString() const
Returns a string representing the DateTime value of the CIMDateTime object.
Returns:
String representing the DateTime value.

ovoid set(const String & str)
Sets the datetime value from the input parameter.
Throws:
InvalidDateTimeFormatException If the datetime String is not formatted correctly.
Parameters:
str - String containing the new value in the datetime format (specified in the CIMDateTime class description). For example, the following sets the date to December 24, 1999 and time to 12:00 P.M. EST.
CIMDateTime dt;
dt.set("19991224120000.000000-300");

ovoid setTimeStamp( Uint32 year, Uint32 month, Uint32 day, Uint32 hours, Uint32 minutes, Uint32 seconds, Uint32 microseconds, Uint32 numSignificantMicrosecondDigits, Sint32 utcOffset)
Sets the datetime timestamp from individual components.
Throws:
DateTimeOutOfRangeException.
Parameters:
year - zero-based year number (or CIMDateTime::WILDCARD)
month - number from 1 to 12 (or CIMDateTime::WILDCARD)
day - one-based day of the month (or CIMDateTime::WILDCARD)
hours - a number from 0 to 23 (or CIMDateTime::WILDCARD)
minutes - a number from 0 to 59 (or CIMDateTime::WILDCARD)
seconds - a number from 0 to 59 (or CIMDateTime::WILDCARD)
microseconds - a number from 0 to 999999
UTF - offset in minutes (negative or positive).
numSignificantMicrosecondDigits - the number of decimal digits of the microseconds parameter (from left to right) that are significant (all others are wildcarded) or six if they are all significant.

ovoid setInterval( Uint32 days, Uint32 hours, Uint32 minutes, Uint32 seconds, Uint32 microseconds, Uint32 numSignificantMicrosecondDigits)
Create datetime interval from components.
Throws:
DateTimeOutOfRangeException.
Parameters:
days - a number from 0 to 99999999
hours - a number from 0 to 23 (or CIMDateTime::WILDCARD)
minutes - a number from 0 to 59 (or CIMDateTime::WILDCARD)
seconds - a number from 0 to 59 (or CIMDateTime::WILDCARD)
microseconds - a number from 0 to 999999
numSignificantMicrosecondDigits - the number of decimal digits of the microseconds parameter (from left to right) that are significant (all others are wildcarded) or six if they are all significant.

ovoid clear()
Clears the datetime class object. The date time is set to a zero interval value.

ostatic CIMDateTime getCurrentDateTime()
Returns the current local time in a CIMDateTime object.
Returns:
CIMDateTime object containing the current local date and time.

ostatic Sint64 getDifference(CIMDateTime startTime, CIMDateTime finishTime)
Computes the difference in microseconds between two CIMDateTime time stamps or two CIMDateTime intervals.
Throws:
InvalidDateTimeFormatException If arguments are not the same type of CIMDateTime.
Parameters:
startTime - Contains the start datetime.
finishTime - Contains the finish datetime.
Returns:
An integer that contains the difference between the two datetime values (in microseconds).

oBoolean isInterval()
Checks whether the datetime is an interval. (This non-const form is maintained for compatibility.) Checks whether the datetime is an interval.
Returns:
True if the datetime is an interval value, false otherwise.
True if the datetime is an interval value, false otherwise.

oBoolean isTimeStamp() const
Checks whether the datetime is a timestamp.
Returns:
True if so.

oBoolean equal(const CIMDateTime& x) const
Compares the CIMDateTime object to another CIMDateTime object for equality.
Throws:
TypeMismatchException If arguments are of different types.
Parameters:
x - CIMDateTime object to be compared.
Returns:
true if the two CIMDateTime objects are equal, false otherwise

oUint64 toMicroSeconds() const
Converts a CIMDateTime object to its microsecond representation.
Throws:
DateTimeOutOfRangeException If conversion to UTC (an internal operation) causes an overflow condition.
Returns:
Number of microseconds since the epoch (for time stamps) or in a span of time (for intervals).

oCIMDateTime operator+(const CIMDateTime& x) const
Adds two CIMDateTime objects and returns a CIMDateTime object that represents the sum.
Throws:
DateTimeOutOfRangeException If the operation causes an overflow condition.
TypeMismatchException If the operands are not type compatible (see table of operations).
Parameters:
x - operand on the RHS of the operator
Returns:
A CIMDateTime object that is the result of adding the calling object to the RHS operand

oCIMDateTime& operator+=(const CIMDateTime& x)
Adds two CIMDateTime objects, returns the sum and changes the value of the calling CIMDateTime object to match the return value.
Throws:
DateTimeOutOfRangeException If the operation causes an overflow condition.
TypeMismatchException If the operands are not type compatible (see table of operations).
Parameters:
x - operand on the RHS of the operator
Returns:
A CIMDateTime object that is the result of adding the calling object to the RHS operand

oCIMDateTime operator-(const CIMDateTime& x) const
Subtracts one CIMDateTime object from another and returns a CIMDateTime object that represents the difference.
Throws:
DateTimeOutOfRangeException If the operation causes an underflow condition or conversion to UTC (an internal operation) causes an overflow condition.
TypeMismatchException If the operands are not type compatible (see table of operations).
Parameters:
x - operand on the RHS of the operator
Returns:
A CIMDateTime object that is the result of subtracting the the RHS object from the calling.

oCIMDateTime& operator-=(const CIMDateTime& x)
Subtracts one CIMDateTime object from another, returns the difference and changes the value of the calling CIMDateTime object to match the return value.
Throws:
DateTimeOutOfRangeException If the operation causes an underflow condition or conversion to UTC (an internal operation) causes an overflow condition.
TypeMismatchException If the operands are not type compatible (see table of operations).
Parameters:
x - operand on the RHS of the operator
Returns:
A CIMDateTime object that is the result of subtracting the object on the RHS from the calling object.

oCIMDateTime operator*(Uint64 x) const
Multiplies a CIMDateTime object by an integer and returns a CIMDateTime object that represents the product.
Throws:
DateTimeOutOfRangeException If the operation causes an overflow condition.
TypeMismatchException If the operands are not type compatible (see table of operations).
Parameters:
x - integer operand on the RHS of the operator
Returns:
A CIMDateTime object that is the result of multiplying the calling object by the RHS operand.

oCIMDateTime& operator*=(Uint64 x)
Multiplies a CIMDateTime object by an integer, returns the product and changes the value of the calling object to match the returned product.
Throws:
DateTimeOutOfRangeException If the operation causes an overflow condition.
TypeMismatchException If the operands are not type compatible (see table of operations).
Parameters:
x - integer operand on the RHS of the operator
Returns:
A CIMDateTime object that is the result of multiplying the calling object by the RHS operand.

oCIMDateTime operator/(Uint64 num) const
Divides a CIMDateTime object by an integer and returns a CIMDateTime object that represents the quotient.
Throws:
DateTimeOutOfRangeException If conversion to UTC (an internal operation) causes an overflow condition.
TypeMismatchException If the CIMDateTime object does not hold an interval value (see table of operations).
Exception if param num is zero.
Parameters:
num - integer operand on the RHS of the operator
Returns:
A CIMDateTime object that is the result of dividing the calling object by the RHS operand.

oCIMDateTime& operator/=(Uint64 num)
Divides a CIMDateTime object by an integer, returns the quotient and changes the value of the calling object to match the returned quotient.
Throws:
DateTimeOutOfRangeException If conversion to UTC (an internal operation) causes an overflow condition.
TypeMismatchException If the CIMDateTime object does not hold an interval value (see table of operations).
Exception if param num is zero.
Parameters:
num - integer operand on the RHS of the operator
Returns:
A CIMDateTime object that is the result of dividing the calling object by the RHS operand.

oUint64 operator/(const CIMDateTime& cdt) const
Divides a CIMDateTime object by another CIMDateTime object and returns an integer quotient.
Throws:
DateTimeOutOfRangeException If conversion to UTC (an internal operation) causes an overflow condition.
TypeMismatchException If the operands are not type compatible (see table of operations).
Parameters:
cdt - CIMDateTime object on the RHS of the operator
Returns:
An integer that is the result of dividing the number of microseconds represented by the calling CIMDateTime object by the number of microseconds represented by the CIMDateTime object on the RHS of the operator.

oBoolean operator<(const CIMDateTime& x) const
Compare two CIMDateTime objects and returns true if the LHS is less than the RHS.
Throws:
DateTimeOutOfRangeException If conversion to UTC (an internal operation) causes an overflow condition.
TypeMismatchException if operands are not of the same type.
Parameters:
x - operand on the RHS of the operator
Returns:
true if the LHS is less than the RHS, false otherwise.

oBoolean operator<=(const CIMDateTime& x) const
Compare two CIMDateTime objects and returns true if the LHS is less than or equal to the RHS.
Throws:
DateTimeOutOfRangeException If conversion to UTC (an internal operation) causes an overflow condition.
TypeMismatchException if operands are not of the same type.
Parameters:
x - operand on the RHS of the operator
Returns:
true if the LHS is less than or equal to the RHS, false otherwise.

oBoolean operator>(const CIMDateTime & x) const
Compare two CIMDateTime objects and returns true if the LHS is greater than the RHS.
Throws:
DateTimeOutOfRangeException If conversion to UTC (an internal operation) causes an overflow condition.
TypeMismatchException if operands are not of the same type.
Parameters:
x - operand on the RHS of the operator
Returns:
true if the LHS is greater than the RHS, false otherwise.

oBoolean operator>=(const CIMDateTime & x) const
Compare two CIMDateTime objects and returns true if the LHS is greater than or equal to the RHS.
Throws:
DateTimeOutOfRangeException If conversion to UTC (an internal operation) causes an overflow condition.
TypeMismatchException if operands are not of the same type.
Parameters:
x - operand on the RHS of the operator
Returns:
true if the LHS is greater than or equal to the RHS, false otherwise.

oBoolean operator!=(const CIMDateTime & x) const
Compare two CIMDateTime objects and returns true if the LHS is not equal to the RHS.
Throws:
DateTimeOutOfRangeException If conversion to UTC (an internal operation) causes an overflow condition.
TypeMismatchException if operands are not of the same type.
Parameters:
x - operand on the RHS of the operator
Returns:
true if the LHS is not equal to RHS, false otherwise.


This class has no child classes.
Friends:
class CIMBuffer
class SCMOClass
class SCMODump
class SCMOInstance
class CMPISCMOUtilities

Alphabetic index HTML hierarchy of classes or Java


[an error occurred while processing this directive]