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