DateInterval Class Reference

This class represents a date interval. More...

#include <dtintrv.h>

Inheritance diagram for DateInterval:

UObject UMemory

Public Member Functions

 DateInterval (UDate fromDate, UDate toDate)
 Construct a DateInterval given a from date and a to date.
virtual ~DateInterval ()
 destructor
UDate getFromDate () const
 Get the from date.
UDate getToDate () const
 Get the to date.
virtual UClassID getDynamicClassID (void) const
 Returns a unique class ID POLYMORPHICALLY.
 DateInterval (const DateInterval &other)
 Copy constructor.
DateIntervaloperator= (const DateInterval &)
 Default assignment operator.
virtual UBool operator== (const DateInterval &other) const
 Equality operator.
UBool operator!= (const DateInterval &other) const
 Non-equality operator.
virtual DateIntervalclone () const
 clone this object.

Static Public Member Functions

static UClassID getStaticClassID (void)
 Return the class ID for this class.

Detailed Description

This class represents a date interval.

It is a pair of UDate representing from UDate 1 to UDate 2.

Draft:
This API may be changed in the future versions and was introduced in ICU 4.0

Definition at line 32 of file dtintrv.h.


Constructor & Destructor Documentation

DateInterval::DateInterval ( UDate  fromDate,
UDate  toDate 
)

Construct a DateInterval given a from date and a to date.

Parameters:
fromDate The from date in date interval.
toDate The to date in date interval.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.0

virtual DateInterval::~DateInterval (  )  [virtual]

destructor

Draft:
This API may be changed in the future versions and was introduced in ICU 4.0

DateInterval::DateInterval ( const DateInterval other  ) 

Copy constructor.

Draft:
This API may be changed in the future versions and was introduced in ICU 4.0


Member Function Documentation

virtual DateInterval* DateInterval::clone (  )  const [virtual]

clone this object.

The caller owns the result and should delete it when done.

Returns:
a cloned DateInterval
Draft:
This API may be changed in the future versions and was introduced in ICU 4.0

virtual UClassID DateInterval::getDynamicClassID ( void   )  const [virtual]

Returns a unique class ID POLYMORPHICALLY.

Pure virtual override. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic operator==() and clone() methods call this method.

Returns:
The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.0

Implements UObject.

UDate DateInterval::getFromDate (  )  const [inline]

Get the from date.

Returns:
the from date in dateInterval.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.0

Definition at line 140 of file dtintrv.h.

static UClassID DateInterval::getStaticClassID ( void   )  [static]

Return the class ID for this class.

This is useful only for comparing to a return value from getDynamicClassID(). For example:

 .   Base* polymorphic_pointer = createPolymorphicObject();
 .   if (polymorphic_pointer->getDynamicClassID() ==
 .       erived::getStaticClassID()) ...
 
Returns:
The class ID for all objects of this class.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.0

UDate DateInterval::getToDate (  )  const [inline]

Get the to date.

Returns:
the to date in dateInterval.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.0

Definition at line 146 of file dtintrv.h.

UBool DateInterval::operator!= ( const DateInterval other  )  const [inline]

Non-equality operator.

Returns:
TRUE if the two DateIntervals are not the same
Draft:
This API may be changed in the future versions and was introduced in ICU 4.0

Definition at line 152 of file dtintrv.h.

DateInterval& DateInterval::operator= ( const DateInterval  ) 

Default assignment operator.

Draft:
This API may be changed in the future versions and was introduced in ICU 4.0

virtual UBool DateInterval::operator== ( const DateInterval other  )  const [virtual]

Equality operator.

Returns:
TRUE if the two DateIntervals are the same
Draft:
This API may be changed in the future versions and was introduced in ICU 4.0


The documentation for this class was generated from the following file:

Generated on Wed Feb 25 01:54:33 2009 for ICU 4.0.1 by  doxygen 1.5.8