1 martin 1.54 //%LICENSE////////////////////////////////////////////////////////////////
2 //
3 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
16 //
17 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 martin 1.54 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 karl 1.41 //
|
28 martin 1.54 //////////////////////////////////////////////////////////////////////////
|
29 mike 1.10 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
|
32 mike 1.51 #ifndef Pegasus_CIMDateTime_h
33 #define Pegasus_CIMDateTime_h
|
34 mike 1.10
35 #include <Pegasus/Common/Config.h>
|
36 kumpf 1.48 #include <Pegasus/Common/Array.h>
|
37 kumpf 1.29 #include <Pegasus/Common/Linkage.h>
|
38 kumpf 1.14
|
39 mike 1.10 PEGASUS_NAMESPACE_BEGIN
40
|
41 w.white 1.46 class CIMDateTimeRep;
|
42 kumpf 1.24
|
43 mike 1.10 /**
|
44 karl 1.36 The CIMDateTime class represents the CIM datetime data type as a C++ class
|
45 kumpf 1.48 CIMDateTime. A CIM datetime may contain a time stamp or an interval.
46 CIMDateTime is an intrinsic CIM data type that represents the time as a
47 string with a fixed length.
|
48 mike 1.10
49 <PRE>
|
50 w.white 1.42 A time stamp has the following form:
|
51 karl 1.36 yyyymmddhhmmss.mmmmmmsutc
|
52 mike 1.10
53 Where
54
|
55 karl 1.36 yyyy = year (1-9999)
56 mm = month (1-12)
57 dd = day (1-31)
58 hh = hour (0-23)
59 mm = minute (0-59)
60 ss = second (0-59)
61 mmmmmm = microseconds
62 s = '+' or '-' to represent the Coordinated Universal Time (UTC) sign
63 utc = offset from Coordinated Universal Time (UTC)
64 (same as Greenwich Mean Time(GMT) offset)
|
65 mike 1.10
66 An interval has the following form:
67
|
68 karl 1.36 ddddddddhhmmss.mmmmmm:000
|
69 mike 1.10
70 Where
71
|
72 karl 1.36 dddddddd = days
73 hh = hours (0-23)
74 mm = minutes (0-59)
75 ss = seconds (0-59)
76 mmmmmm = microseconds
|
77 mike 1.10 </PRE>
78
|
79 kumpf 1.48 Note: Intervals always end in ":000". This distinguishes intervals from
80 time stamps.
|
81 mike 1.10
|
82 kumpf 1.31 CIMDateTime objects are constructed from String objects or from
|
83 karl 1.36 other CIMDateTime objects. Character strings must be exactly
|
84 kumpf 1.48 twenty-five characters in length and conform to either the time stamp
85 or interval format.
|
86 mike 1.10
|
87 kumpf 1.31 CIMDateTime objects that are not explicitly initialized will be
88 implicitly initialized with a zero time interval:
|
89 mike 1.10
|
90 karl 1.36 00000000000000.000000:000
|
91 mike 1.10
|
92 w.white 1.42
|
93 kumpf 1.48 The following table shows what arithmetic operations are allowed
94 between CIMDateTime types. The entries in the last four columns define
95 the type of the result when the operation, specified in the column header,
96 is performed on operands, of the types specified in the first two columns.
|
97 w.white 1.42
|
98 kumpf 1.48 <PRE>
99 LHS - left hand side TS - time stamp int - integer
100 RHS - right hand side IV - interval
101 X - operation not allowed between types
102
103 LHS RHS + - * /
104 _____________________________________________
105 TS TS X IV X X
106 TS IV TS TS X X
107 TS int X X X X
108 IV IV IV IV X int
109 IV TS X X X X
110 IV int X X IV IV
111 int TS X X X X
112 int IV X X X X
113 </PRE>
114
115 The relational operators may only operate on two operands of the same type,
116 i.e. two time stamps or two intervals.
|
117 mike 1.10 */
118 class PEGASUS_COMMON_LINKAGE CIMDateTime
119 {
120 public:
121
|
122 mike 1.51 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
123
124 /** Wildcard parameter for component-based initializer member functions.
125 */
126 static const Uint32 WILDCARD;
127
128 #endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */
129
|
130 kumpf 1.34 /** Creates a new CIMDateTime object with a zero interval value.
|
131 karl 1.12 */
|
132 mike 1.10 CIMDateTime();
133
|
134 mike 1.51 /** Creates a CIMDateTime object from another CIMDateTime object.
135 @param x Specifies the name of the CIMDateTime object to copy.
136 */
137 CIMDateTime(const CIMDateTime& x);
138
|
139 karl 1.36 /** Creates a new CIMDateTime object from a string constant representing
|
140 w.white 1.42 the CIM DateTime formatted datetime.
|
141 kumpf 1.31 See the class documentation for CIMDateTime for the definition of the
|
142 karl 1.12 input string for absolute and interval datetime.
|
143 kumpf 1.48 @param str String object containing the CIMDateTime formatted string.
|
144 karl 1.36 This must contain twenty-five characters.
|
145 kumpf 1.48 @exception InvalidDateTimeFormatException If the input string is not
146 formatted correctly.
|
147 mike 1.10 */
|
148 mike 1.51 CIMDateTime(const String& str);
|
149 mike 1.10
|
150 w.white 1.42 /** Creates a CIMDateTime object from an integer.
|
151 kumpf 1.53 @param usec For a time stamp, the number of microseconds since
|
152 kumpf 1.48 the epoch 0/0/0000 (12 am Jan 1, 1BCE); For an interval, the number
153 of microseconds in the interval.
|
154 kumpf 1.53 @param isInterval Specifies whether the CIMDateTime object is to be
|
155 kumpf 1.48 created as an interval value (true) or a time stamp (false).
156 @exception DateTimeOutOfRangeException If the microSec value is too
157 large (greater than 317,455,200,000,000,000 for a time stamps or
158 8,640,000,000,000,000,000 for an interval).
159 @exception InvalidDateTimeFormatException If the CIMDateTime object is
160 not formed correctly.
161 */
|
162 mike 1.51 CIMDateTime(Uint64 usec, Boolean isInterval);
163
164 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
165
166 /** Create datetime time stamp from components.
167 @param year zero-based year number (or CIMDateTime::WILDCARD)
168 @param month number from 1 to 12 (or CIMDateTime::WILDCARD)
169 @param day one-based day of the month (or CIMDateTime::WILDCARD)
170 @param hours a number from 0 to 23 (or CIMDateTime::WILDCARD)
171 @param minutes a number from 0 to 59 (or CIMDateTime::WILDCARD)
172 @param seconds a number from 0 to 59 (or CIMDateTime::WILDCARD)
173 @param microseconds a number from 0 to 999999
174 @param numSignificantMicrosecondDigits the number of decimal digits of
175 the microseconds parameter (from left to right) that are
176 significant (all others are wildcarded) or six if they are all
177 significant.
178 @param UTF offset in minutes (negative or positive).
179 @exception DateTimeOutOfRangeException.
180 */
181 CIMDateTime(
182 Uint32 year,
183 mike 1.51 Uint32 month,
184 Uint32 day,
185 Uint32 hours,
186 Uint32 minutes,
187 Uint32 seconds,
188 Uint32 microseconds,
189 Uint32 numSignificantMicrosecondDigits,
190 Sint32 utcOffset);
191
192 /** Create datetime interval from components.
193 @param days a number from 0 to 99999999 (or CIMDateTime::WILDCARD)
194 @param hours a number from 0 to 23 (or CIMDateTime::WILDCARD)
195 @param minutes a number from 0 to 59 (or CIMDateTime::WILDCARD)
196 @param seconds a number from 0 to 59 (or CIMDateTime::WILDCARD)
197 @param microseconds a number from 0 to 999999
198 @param numSignificantMicrosecondDigits the number of decimal digits of
199 the microseconds parameter (from left to right) that are
200 significant (all others are wildcarded) or six if they are all
201 significant.
202 @exception DateTimeOutOfRangeException.
203 */
204 mike 1.51 CIMDateTime(
205 Uint32 days,
206 Uint32 hours,
207 Uint32 minutes,
208 Uint32 seconds,
209 Uint32 microseconds,
210 Uint32 numSignificantMicrosecondDigits);
211
212 #endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */
|
213 w.white 1.42
|
214 a.arora 1.39 /** CIMDateTime destructor. */
215 ~CIMDateTime();
216
|
217 karl 1.36 /** Assigns one instance of the CIMDateTime object to another.
218 @param x The CIMDateTime Object to assign to the CIMDateTime object.
219 For example, you can assign the d1 CIMDateTime instance to the d2
220 CIMDateTime instance.
|
221 kumpf 1.34 <PRE>
222 CIMDateTime d1;
223 CIMDateTime d2 = "00000000000000.000000:000";
|
224 karl 1.36 d1 = d2;
|
225 kumpf 1.34 </PRE>
|
226 kumpf 1.52 Therefore, d1 is assigned the same "00000000000000.000000:000" value
|
227 mike 1.51 as d2.
|
228 mike 1.10 */
229 CIMDateTime& operator=(const CIMDateTime& x);
230
|
231 kumpf 1.34 /** Returns a string representing the DateTime value of the
|
232 karl 1.36 CIMDateTime object.
|
233 kumpf 1.34 @return String representing the DateTime value.
|
234 karl 1.12 */
|
235 kumpf 1.48 String toString() const;
|
236 mike 1.10
|
237 kumpf 1.48 /** Sets the datetime value from the input parameter.
238 @param str String containing the new value in the datetime format
239 (specified in the CIMDateTime class description). For example, the
240 following sets the date to December 24, 1999 and time to 12:00 P.M.
241 EST.
|
242 mike 1.10
|
243 karl 1.36 <PRE>
244 CIMDateTime dt;
|
245 kumpf 1.48 dt.set("19991224120000.000000-300");
|
246 karl 1.36 </PRE>
|
247 mike 1.10
|
248 kumpf 1.48 @exception InvalidDateTimeFormatException If the datetime String is not
249 formatted correctly.
|
250 mike 1.10 */
|
251 kumpf 1.31 void set(const String & str);
|
252 mike 1.10
|
253 mike 1.51 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
254
255 /** Sets the datetime timestamp from individual components.
256 @param year zero-based year number (or CIMDateTime::WILDCARD)
257 @param month number from 1 to 12 (or CIMDateTime::WILDCARD)
258 @param day one-based day of the month (or CIMDateTime::WILDCARD)
259 @param hours a number from 0 to 23 (or CIMDateTime::WILDCARD)
260 @param minutes a number from 0 to 59 (or CIMDateTime::WILDCARD)
261 @param seconds a number from 0 to 59 (or CIMDateTime::WILDCARD)
262 @param microseconds a number from 0 to 999999
263 @param UTF offset in minutes (negative or positive).
264 @param numSignificantMicrosecondDigits the number of decimal digits of
265 the microseconds parameter (from left to right) that are
266 significant (all others are wildcarded) or six if they are all
267 significant.
268 @exception DateTimeOutOfRangeException.
269 */
270 void setTimeStamp(
271 Uint32 year,
272 Uint32 month,
273 Uint32 day,
274 mike 1.51 Uint32 hours,
275 Uint32 minutes,
276 Uint32 seconds,
277 Uint32 microseconds,
278 Uint32 numSignificantMicrosecondDigits,
279 Sint32 utcOffset);
280
281 /** Create datetime interval from components.
282 @param days a number from 0 to 99999999
283 @param hours a number from 0 to 23 (or CIMDateTime::WILDCARD)
284 @param minutes a number from 0 to 59 (or CIMDateTime::WILDCARD)
285 @param seconds a number from 0 to 59 (or CIMDateTime::WILDCARD)
286 @param microseconds a number from 0 to 999999
287 @param numSignificantMicrosecondDigits the number of decimal digits of
288 the microseconds parameter (from left to right) that are
289 significant (all others are wildcarded) or six if they are all
290 significant.
291 @exception DateTimeOutOfRangeException.
292 */
293 void setInterval(
294 Uint32 days,
295 mike 1.51 Uint32 hours,
296 Uint32 minutes,
297 Uint32 seconds,
298 Uint32 microseconds,
299 Uint32 numSignificantMicrosecondDigits);
300
301 #endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */
302
|
303 karl 1.36 /** Clears the datetime class object. The date time is set to
|
304 kumpf 1.34 a zero interval value.
|
305 karl 1.12 */
|
306 mike 1.10 void clear();
307
|
308 kumpf 1.48 /** Returns the current local time in a CIMDateTime object.
309 @return CIMDateTime object containing the current local date and time.
|
310 kumpf 1.14 */
311 static CIMDateTime getCurrentDateTime();
312
|
313 kumpf 1.48 /** Computes the difference in microseconds between two CIMDateTime time
314 stamps or two CIMDateTime intervals.
|
315 kumpf 1.34 @param startTime Contains the start datetime.
316 @param finishTime Contains the finish datetime.
|
317 kumpf 1.48 @return An integer that contains the difference between the two
318 datetime values (in microseconds).
|
319 w.white 1.42 @exception InvalidDateTimeFormatException If arguments are not the same
320 type of CIMDateTime.
|
321 kumpf 1.14 */
|
322 kumpf 1.48 static Sint64 getDifference(CIMDateTime startTime, CIMDateTime finishTime);
323
324 /** Checks whether the datetime is an interval.
325 @return True if the datetime is an interval value, false otherwise.
326 */
|
327 kumpf 1.49 Boolean isInterval() const;
|
328 kumpf 1.53
329 /** Checks whether the datetime is an interval. (This non-const form is
330 maintained for compatibility.)
331 @return True if the datetime is an interval value, false otherwise.
332 */
|
333 kumpf 1.48 Boolean isInterval();
|
334 karl 1.36
|
335 mike 1.51 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
336
337 /** Checks whether the datetime is a timestamp.
338 @return True if so.
339 */
340 Boolean isTimeStamp() const;
341
342 #endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */
343
|
344 karl 1.36 /** Compares the CIMDateTime object to another CIMDateTime object for
|
345 kumpf 1.34 equality.
346 @param x CIMDateTime object to be compared.
|
347 kumpf 1.48 @return true if the two CIMDateTime objects are equal, false otherwise
|
348 w.white 1.42 @exception TypeMismatchException If arguments are of different types.
|
349 kumpf 1.31 */
|
350 mike 1.51 Boolean equal(const CIMDateTime& x) const;
|
351 kumpf 1.31
|
352 w.white 1.42 /** Converts a CIMDateTime object to its microsecond representation.
|
353 kumpf 1.48 @return Number of microseconds since the epoch (for time stamps) or
354 in a span of time (for intervals).
355 @exception DateTimeOutOfRangeException If conversion to UTC (an
356 internal operation) causes an overflow condition.
|
357 w.white 1.42 */
|
358 w.white 1.47 Uint64 toMicroSeconds() const;
|
359 w.white 1.42
|
360 kumpf 1.48 /** Adds two CIMDateTime objects and returns a CIMDateTime object that
361 represents the sum.
|
362 mike 1.51 @param x operand on the RHS of the operator
|
363 kumpf 1.48 @return A CIMDateTime object that is the result of adding the calling
364 object to the RHS operand
365 @exception DateTimeOutOfRangeException If the operation causes an
366 overflow condition.
367 @exception TypeMismatchException If the operands are not type
368 compatible (see table of operations).
|
369 w.white 1.42 */
|
370 mike 1.51 CIMDateTime operator+(const CIMDateTime& x) const;
|
371 w.white 1.42
372 /** Adds two CIMDateTime objects, returns the sum and changes
373 the value of the calling CIMDateTime object to match the return value.
|
374 mike 1.51 @param x operand on the RHS of the operator
|
375 kumpf 1.48 @return A CIMDateTime object that is the result of adding the calling
376 object to the RHS operand
377 @exception DateTimeOutOfRangeException If the operation causes an
378 overflow condition.
379 @exception TypeMismatchException If the operands are not type
380 compatible (see table of operations).
|
381 w.white 1.42 */
|
382 mike 1.51 CIMDateTime & operator+=(const CIMDateTime& x);
|
383 w.white 1.42
|
384 kumpf 1.48 /** Subtracts one CIMDateTime object from another and returns a
385 CIMDateTime object that represents the difference.
|
386 mike 1.51 @param x operand on the RHS of the operator
|
387 kumpf 1.48 @return A CIMDateTime object that is the result of subtracting the
|
388 w.white 1.42 the RHS object from the calling.
|
389 kumpf 1.48 @exception DateTimeOutOfRangeException If the operation causes an
390 underflow condition or conversion to UTC (an internal operation)
391 causes an overflow condition.
392 @exception TypeMismatchException If the operands are not type
393 compatible (see table of operations).
394 */
|
395 mike 1.51 CIMDateTime operator-(const CIMDateTime& x) const;
|
396 kumpf 1.48
397 /** Subtracts one CIMDateTime object from another, returns the difference
398 and changes the value of the calling CIMDateTime object to match the
399 return value.
|
400 mike 1.51 @param x operand on the RHS of the operator
|
401 kumpf 1.48 @return A CIMDateTime object that is the result of subtracting the
402 object on the RHS from the calling object.
403 @exception DateTimeOutOfRangeException If the operation causes an
404 underflow condition or conversion to UTC (an internal operation)
405 causes an overflow condition.
406 @exception TypeMismatchException If the operands are not type
407 compatible (see table of operations).
408 */
|
409 mike 1.51 CIMDateTime & operator-=(const CIMDateTime& x);
|
410 kumpf 1.48
411 /** Multiplies a CIMDateTime object by an integer and returns a CIMDateTime
412 object that represents the product.
|
413 kumpf 1.53 @param x integer operand on the RHS of the operator
|
414 kumpf 1.48 @return A CIMDateTime object that is the result of multiplying the
415 calling object by the RHS operand.
416 @exception DateTimeOutOfRangeException If the operation causes an
417 overflow condition.
418 @exception TypeMismatchException If the operands are not type
419 compatible (see table of operations).
|
420 w.white 1.42 */
|
421 mike 1.51 CIMDateTime operator*(Uint64 x) const;
|
422 w.white 1.42
|
423 kumpf 1.48 /** Multiplies a CIMDateTime object by an integer, returns the product
424 and changes the value of the calling object to match the returned
425 product.
|
426 kumpf 1.53 @param x integer operand on the RHS of the operator
|
427 kumpf 1.48 @return A CIMDateTime object that is the result of multiplying the
428 calling object by the RHS operand.
429 @exception DateTimeOutOfRangeException If the operation causes an
430 overflow condition.
431 @exception TypeMismatchException If the operands are not type
432 compatible (see table of operations).
433 */
|
434 mike 1.51 CIMDateTime & operator*=(Uint64 x);
|
435 kumpf 1.48
436 /** Divides a CIMDateTime object by an integer and returns a CIMDateTime
437 object that represents the quotient.
438 @param num integer operand on the RHS of the operator
439 @return A CIMDateTime object that is the result of dividing the calling
440 object by the RHS operand.
441 @exception DateTimeOutOfRangeException If conversion to UTC (an
442 internal operation) causes an overflow condition.
443 @exception TypeMismatchException If the CIMDateTime object does not
444 hold an interval value (see table of operations).
445 @exception Exception if param num is zero.
446 */
|
447 w.white 1.42 CIMDateTime operator/(Uint64 num) const;
448
|
449 kumpf 1.48 /** Divides a CIMDateTime object by an integer, returns the quotient
450 and changes the value of the calling object to match the returned
451 quotient.
452 @param num integer operand on the RHS of the operator
453 @return A CIMDateTime object that is the result of dividing the calling
454 object by the RHS operand.
455 @exception DateTimeOutOfRangeException If conversion to UTC (an
456 internal operation) causes an overflow condition.
457 @exception TypeMismatchException If the CIMDateTime object does not
458 hold an interval value (see table of operations).
459 @exception Exception if param num is zero.
460 */
|
461 w.white 1.42 CIMDateTime & operator/=(Uint64 num);
462
|
463 kumpf 1.48 /** Divides a CIMDateTime object by another CIMDateTime object and returns
464 an integer quotient.
465 @param cdt CIMDateTime object on the RHS of the operator
466 @return An integer that is the result of dividing the number of
467 microseconds represented by the calling CIMDateTime object by the
468 number of microseconds represented by the CIMDateTime object on the
469 RHS of the operator.
470 @exception DateTimeOutOfRangeException If conversion to UTC (an
471 internal operation) causes an overflow condition.
472 @exception TypeMismatchException If the operands are not type
473 compatible (see table of operations).
474 */
475 Uint64 operator/(const CIMDateTime& cdt) const;
476
477 /** Compare two CIMDateTime objects and returns true if the LHS is
478 less than the RHS.
|
479 mike 1.51 @param x operand on the RHS of the operator
|
480 kumpf 1.48 @return true if the LHS is less than the RHS, false otherwise.
481 @exception DateTimeOutOfRangeException If conversion to UTC (an
482 internal operation) causes an overflow condition.
483 @exception TypeMismatchException if operands are not of the same
484 type.
|
485 w.white 1.42 */
|
486 mike 1.51 Boolean operator<(const CIMDateTime& x) const;
|
487 w.white 1.42
|
488 kumpf 1.48 /** Compare two CIMDateTime objects and returns true if the LHS is
489 less than or equal to the RHS.
|
490 mike 1.51 @param x operand on the RHS of the operator
|
491 kumpf 1.48 @return true if the LHS is less than or equal to the RHS, false
492 otherwise.
493 @exception DateTimeOutOfRangeException If conversion to UTC (an
494 internal operation) causes an overflow condition.
495 @exception TypeMismatchException if operands are not of the same
496 type.
497 */
|
498 mike 1.51 Boolean operator<=(const CIMDateTime& x) const;
|
499 kumpf 1.48
500 /** Compare two CIMDateTime objects and returns true if the LHS is
501 greater than the RHS.
|
502 mike 1.51 @param x operand on the RHS of the operator
|
503 kumpf 1.48 @return true if the LHS is greater than the RHS, false otherwise.
504 @exception DateTimeOutOfRangeException If conversion to UTC (an
505 internal operation) causes an overflow condition.
506 @exception TypeMismatchException if operands are not of the same
507 type.
|
508 w.white 1.42 */
|
509 mike 1.51 Boolean operator>(const CIMDateTime & x) const;
|
510 w.white 1.42
|
511 kumpf 1.48 /** Compare two CIMDateTime objects and returns true if the LHS is
512 greater than or equal to the RHS.
|
513 mike 1.51 @param x operand on the RHS of the operator
|
514 kumpf 1.48 @return true if the LHS is greater than or equal to the RHS, false
515 otherwise.
516 @exception DateTimeOutOfRangeException If conversion to UTC (an
517 internal operation) causes an overflow condition.
518 @exception TypeMismatchException if operands are not of the same
519 type.
|
520 w.white 1.42 */
|
521 mike 1.51 Boolean operator>=(const CIMDateTime & x) const;
|
522 w.white 1.42
|
523 kumpf 1.48 /** Compare two CIMDateTime objects and returns true if the LHS is
524 not equal to the RHS.
|
525 mike 1.51 @param x operand on the RHS of the operator
|
526 kumpf 1.48 @return true if the LHS is not equal to RHS, false otherwise.
527 @exception DateTimeOutOfRangeException If conversion to UTC (an
528 internal operation) causes an overflow condition.
529 @exception TypeMismatchException if operands are not of the same
530 type.
|
531 w.white 1.42 */
|
532 mike 1.51 Boolean operator!=(const CIMDateTime & x) const;
|
533 w.white 1.42
|
534 kumpf 1.48 private:
|
535 a.arora 1.39 CIMDateTimeRep* _rep;
|
536 mike 1.51 CIMDateTime(CIMDateTimeRep*);
|
537 mike 1.10 };
|
538 w.white 1.42
|
539 kumpf 1.48 /** Compares two CIMDateTime objects and returns true if they represent the
540 same time or length of time.
541 @param x one of the CIMDateTime objects to be compared
542 @param y one of the CIMDateTime objects to be compared
543 @return true if the two objects passed in represent the same time or
544 length of time, false otherwise.
|
545 w.white 1.42 */
|
546 kumpf 1.48 PEGASUS_COMMON_LINKAGE Boolean operator==(
547 const CIMDateTime& x,
548 const CIMDateTime& y);
|
549 mike 1.10
550 #define PEGASUS_ARRAY_T CIMDateTime
|
551 kumpf 1.25 # include <Pegasus/Common/ArrayInter.h>
|
552 mike 1.10 #undef PEGASUS_ARRAY_T
553
554 PEGASUS_NAMESPACE_END
555
|
556 mike 1.51 #endif /* Pegasus_CIMDateTime_h */
|