(file) Return to CIMDateTime.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  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.53         @param usec For a time stamp, the number of microseconds since
154 kumpf   1.48         the epoch 0/0/0000 (12 am Jan 1, 1BCE); For an interval, the number
155                      of microseconds in the interval.
156 kumpf   1.53         @param isInterval Specifies whether the CIMDateTime object is to be
157 kumpf   1.48         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.53 
331                  /** Checks whether the datetime is an interval.  (This non-const form is
332                      maintained for compatibility.)
333                      @return True if the datetime is an interval value, false otherwise.
334                  */
335 kumpf   1.48     Boolean isInterval();
336 karl    1.36 
337 mike    1.51 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
338              
339                  /** Checks whether the datetime is a timestamp.
340                      @return True if so.
341                  */
342                  Boolean isTimeStamp() const;
343              
344              #endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */
345              
346 karl    1.36     /** Compares the CIMDateTime object to another CIMDateTime object for
347 kumpf   1.34         equality.
348                      @param x  CIMDateTime object to be compared.
349 kumpf   1.48         @return true if the two CIMDateTime objects are equal, false otherwise
350 w.white 1.42         @exception TypeMismatchException If arguments are of different types.
351 kumpf   1.31     */
352 mike    1.51     Boolean equal(const CIMDateTime& x) const;
353 kumpf   1.31 
354 w.white 1.42     /** Converts a CIMDateTime object to its microsecond representation.
355 kumpf   1.48         @return Number of microseconds since the epoch (for time stamps) or
356                      in a span of time (for intervals).
357                      @exception DateTimeOutOfRangeException If conversion to UTC (an
358                      internal operation) causes an overflow condition.
359 w.white 1.42     */
360 w.white 1.47     Uint64 toMicroSeconds() const;
361 w.white 1.42 
362 kumpf   1.48     /** Adds two CIMDateTime objects and returns a CIMDateTime object that
363                      represents the sum.
364 mike    1.51         @param x operand on the RHS of the operator
365 kumpf   1.48         @return A CIMDateTime object that is the result of adding the calling
366                      object to the RHS operand
367                      @exception DateTimeOutOfRangeException If the operation causes an
368                      overflow condition.
369                      @exception TypeMismatchException If the operands are not type
370                      compatible (see table of operations).
371 w.white 1.42     */
372 mike    1.51     CIMDateTime operator+(const CIMDateTime& x) const;
373 w.white 1.42 
374                  /** Adds two CIMDateTime objects, returns the sum and changes
375                      the value of the calling CIMDateTime object to match the return value.
376 mike    1.51         @param x operand on the RHS of the operator
377 kumpf   1.48         @return A CIMDateTime object that is the result of adding the calling
378                      object to the RHS operand
379                      @exception DateTimeOutOfRangeException If the operation causes an
380                      overflow condition.
381                      @exception TypeMismatchException If the operands are not type
382                      compatible (see table of operations).
383 w.white 1.42     */
384 mike    1.51     CIMDateTime & operator+=(const CIMDateTime& x);
385 w.white 1.42 
386 kumpf   1.48     /** Subtracts one CIMDateTime object from another and returns a
387                      CIMDateTime object that represents the difference.
388 mike    1.51         @param x operand on the RHS of the operator
389 kumpf   1.48         @return A CIMDateTime object that is the result of subtracting the
390 w.white 1.42         the RHS object from the calling.
391 kumpf   1.48         @exception DateTimeOutOfRangeException If the operation causes an
392                      underflow condition or conversion to UTC (an internal operation)
393                      causes an overflow condition.
394                      @exception TypeMismatchException If the operands are not type
395                      compatible (see table of operations).
396                  */
397 mike    1.51     CIMDateTime operator-(const CIMDateTime& x) const;
398 kumpf   1.48 
399                  /** Subtracts one CIMDateTime object from another, returns the difference
400                      and changes the value of the calling CIMDateTime object to match the
401                      return value.
402 mike    1.51         @param x operand on the RHS of the operator
403 kumpf   1.48         @return A CIMDateTime object that is the result of subtracting the
404                      object on the RHS from the calling object.
405                      @exception DateTimeOutOfRangeException If the operation causes an
406                      underflow condition or conversion to UTC (an internal operation)
407                      causes an overflow condition.
408                      @exception TypeMismatchException If the operands are not type
409                      compatible (see table of operations).
410                  */
411 mike    1.51     CIMDateTime & operator-=(const CIMDateTime& x);
412 kumpf   1.48 
413                  /** Multiplies a CIMDateTime object by an integer and returns a CIMDateTime
414                      object that represents the product.
415 kumpf   1.53         @param x integer operand on the RHS of the operator
416 kumpf   1.48         @return A CIMDateTime object that is the result of multiplying the
417                      calling object by the RHS operand.
418                      @exception DateTimeOutOfRangeException If the operation causes an
419                      overflow condition.
420                      @exception TypeMismatchException If the operands are not type
421                      compatible (see table of operations).
422 w.white 1.42     */
423 mike    1.51     CIMDateTime operator*(Uint64 x) const;
424 w.white 1.42 
425 kumpf   1.48     /** Multiplies a CIMDateTime object by an integer, returns the product
426                      and changes the value of the calling object to match the returned
427                      product.
428 kumpf   1.53         @param x integer operand on the RHS of the operator
429 kumpf   1.48         @return A CIMDateTime object that is the result of multiplying the
430                      calling object by the RHS operand.
431                      @exception DateTimeOutOfRangeException If the operation causes an
432                      overflow condition.
433                      @exception TypeMismatchException If the operands are not type
434                      compatible (see table of operations).
435                  */
436 mike    1.51     CIMDateTime & operator*=(Uint64 x);
437 kumpf   1.48 
438                  /** Divides a CIMDateTime object by an integer and returns a CIMDateTime
439                      object that represents the quotient.
440                      @param num integer operand on the RHS of the operator
441                      @return A CIMDateTime object that is the result of dividing the calling
442                      object by the RHS operand.
443                      @exception DateTimeOutOfRangeException If conversion to UTC (an
444                      internal operation) causes an overflow condition.
445                      @exception TypeMismatchException If the CIMDateTime object does not
446                      hold an interval value (see table of operations).
447                      @exception Exception if param num is zero.
448                  */
449 w.white 1.42     CIMDateTime operator/(Uint64 num) const;
450              
451 kumpf   1.48     /** Divides a CIMDateTime object by an integer, returns the quotient
452                      and changes the value of the calling object to match the returned
453                      quotient.
454                      @param num integer operand on the RHS of the operator
455                      @return A CIMDateTime object that is the result of dividing the calling
456                      object by the RHS operand.
457                      @exception DateTimeOutOfRangeException If conversion to UTC (an
458                      internal operation) causes an overflow condition.
459                      @exception TypeMismatchException If the CIMDateTime object does not
460                      hold an interval value (see table of operations).
461                      @exception Exception if param num is zero.
462                  */
463 w.white 1.42     CIMDateTime & operator/=(Uint64 num);
464              
465 kumpf   1.48     /** Divides a CIMDateTime object by another CIMDateTime object and returns
466                      an integer quotient.
467                      @param cdt CIMDateTime object on the RHS of the operator
468                      @return An integer that is the result of dividing the number of
469                      microseconds represented by the calling CIMDateTime object by the
470                      number of microseconds represented by the CIMDateTime object on the
471                      RHS of the operator.
472                      @exception DateTimeOutOfRangeException If conversion to UTC (an
473                      internal operation) causes an overflow condition.
474                      @exception TypeMismatchException If the operands are not type
475                      compatible (see table of operations).
476                  */
477                  Uint64 operator/(const CIMDateTime& cdt) const;
478              
479                  /** Compare two CIMDateTime objects and returns true if the LHS is
480                      less than the RHS.
481 mike    1.51         @param x operand on the RHS of the operator
482 kumpf   1.48         @return true if the LHS is less than the RHS, false otherwise.
483                      @exception DateTimeOutOfRangeException If conversion to UTC (an
484                      internal operation) causes an overflow condition.
485                      @exception TypeMismatchException if operands are not of the same
486                      type.
487 w.white 1.42      */
488 mike    1.51     Boolean operator<(const CIMDateTime& x) const;
489 w.white 1.42 
490 kumpf   1.48     /** Compare two CIMDateTime objects and returns true if the LHS is
491                      less than or equal to the RHS.
492 mike    1.51         @param x operand on the RHS of the operator
493 kumpf   1.48         @return true if the LHS is less than or equal to the RHS, false
494                      otherwise.
495                      @exception DateTimeOutOfRangeException If conversion to UTC (an
496                      internal operation) causes an overflow condition.
497                      @exception TypeMismatchException if operands are not of the same
498                      type.
499                  */
500 mike    1.51     Boolean operator<=(const CIMDateTime& x) const;
501 kumpf   1.48 
502                  /** Compare two CIMDateTime objects and returns true if the LHS is
503                      greater than the RHS.
504 mike    1.51         @param x operand on the RHS of the operator
505 kumpf   1.48         @return true if the LHS is greater than the RHS, false otherwise.
506                      @exception DateTimeOutOfRangeException If conversion to UTC (an
507                      internal operation) causes an overflow condition.
508                      @exception TypeMismatchException if operands are not of the same
509                      type.
510 w.white 1.42     */
511 mike    1.51     Boolean operator>(const CIMDateTime & x) const;
512 w.white 1.42 
513 kumpf   1.48     /** Compare two CIMDateTime objects and returns true if the LHS is
514                      greater than or equal to the RHS.
515 mike    1.51         @param x operand on the RHS of the operator
516 kumpf   1.48         @return true if the LHS is greater than or equal to the RHS, false
517                      otherwise.
518                      @exception DateTimeOutOfRangeException If conversion to UTC (an
519                      internal operation) causes an overflow condition.
520                      @exception TypeMismatchException if operands are not of the same
521                      type.
522 w.white 1.42     */
523 mike    1.51     Boolean operator>=(const CIMDateTime & x) const;
524 w.white 1.42 
525 kumpf   1.48     /** Compare two CIMDateTime objects and returns true if the LHS is
526                      not equal to the RHS.
527 mike    1.51         @param x operand on the RHS of the operator
528 kumpf   1.48         @return true if the LHS is not equal to RHS, false otherwise.
529                      @exception DateTimeOutOfRangeException If conversion to UTC (an
530                      internal operation) causes an overflow condition.
531                      @exception TypeMismatchException if operands are not of the same
532                      type.
533 w.white 1.42     */
534 mike    1.51     Boolean operator!=(const CIMDateTime & x) const;
535 w.white 1.42 
536 kumpf   1.48 private:
537 a.arora 1.39     CIMDateTimeRep* _rep;
538 mike    1.51     CIMDateTime(CIMDateTimeRep*);
539 mike    1.10 };
540 w.white 1.42 
541 kumpf   1.48 /** Compares two CIMDateTime objects and returns true if they represent the
542                  same time or length of time.
543                  @param x one of the CIMDateTime objects to be compared
544                  @param y one of the CIMDateTime objects to be compared
545                  @return true if the two objects passed in represent the same time or
546                  length of time, false otherwise.
547 w.white 1.42 */
548 kumpf   1.48 PEGASUS_COMMON_LINKAGE Boolean operator==(
549                  const CIMDateTime& x,
550                  const CIMDateTime& y);
551 mike    1.10 
552              #define PEGASUS_ARRAY_T CIMDateTime
553 kumpf   1.25 # include <Pegasus/Common/ArrayInter.h>
554 mike    1.10 #undef PEGASUS_ARRAY_T
555              
556              PEGASUS_NAMESPACE_END
557              
558 mike    1.51 #endif /* Pegasus_CIMDateTime_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2