TimeZoneTransition Class Reference

TimeZoneTransition is a class representing a time zone transition. More...

#include <tztrans.h>

Inheritance diagram for TimeZoneTransition:

UObject UMemory

Public Member Functions

 TimeZoneTransition (UDate time, const TimeZoneRule &from, const TimeZoneRule &to)
 Constructs a TimeZoneTransition with the time and the rules before/after the transition.
 TimeZoneTransition ()
 Constructs an empty TimeZoneTransition.
 TimeZoneTransition (const TimeZoneTransition &source)
 Copy constructor.
 ~TimeZoneTransition ()
 Destructor.
TimeZoneTransitionclone (void) const
 Clone this TimeZoneTransition object polymorphically.
TimeZoneTransitionoperator= (const TimeZoneTransition &right)
 Assignment operator.
UBool operator== (const TimeZoneTransition &that) const
 Return true if the given TimeZoneTransition objects are semantically equal.
UBool operator!= (const TimeZoneTransition &that) const
 Return true if the given TimeZoneTransition objects are semantically unequal.
UDate getTime (void) const
 Returns the time of transition in milliseconds.
void setTime (UDate time)
 Sets the time of transition in milliseconds.
const TimeZoneRulegetFrom (void) const
 Returns the rule used before the transition.
void setFrom (const TimeZoneRule &from)
 Sets the rule used before the transition.
void adoptFrom (TimeZoneRule *from)
 Adopts the rule used before the transition.
void setTo (const TimeZoneRule &to)
 Sets the rule used after the transition.
void adoptTo (TimeZoneRule *to)
 Adopts the rule used after the transition.
const TimeZoneRulegetTo (void) const
 Returns the rule used after the transition.
virtual UClassID getDynamicClassID (void) const
 Returns a unique class ID POLYMORPHICALLY.

Static Public Member Functions

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

Detailed Description

TimeZoneTransition is a class representing a time zone transition.

An instance has a time of transition and rules for both before and after the transition.

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

Definition at line 31 of file tztrans.h.


Constructor & Destructor Documentation

TimeZoneTransition::TimeZoneTransition ( UDate  time,
const TimeZoneRule from,
const TimeZoneRule to 
)

Constructs a TimeZoneTransition with the time and the rules before/after the transition.

Parameters:
time The time of transition in milliseconds since the base time.
from The time zone rule used before the transition.
to The time zone rule used after the transition.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

TimeZoneTransition::TimeZoneTransition (  ) 

Constructs an empty TimeZoneTransition.

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

TimeZoneTransition::TimeZoneTransition ( const TimeZoneTransition source  ) 

Copy constructor.

Parameters:
source The TimeZoneTransition object to be copied.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

TimeZoneTransition::~TimeZoneTransition (  ) 

Destructor.

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


Member Function Documentation

TimeZoneTransition* TimeZoneTransition::clone ( void   )  const

Clone this TimeZoneTransition object polymorphically.

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

Returns:
A copy of the object.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

TimeZoneTransition& TimeZoneTransition::operator= ( const TimeZoneTransition right  ) 

Assignment operator.

Parameters:
right The object to be copied.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

UBool TimeZoneTransition::operator== ( const TimeZoneTransition that  )  const

Return true if the given TimeZoneTransition objects are semantically equal.

Objects of different subclasses are considered unequal.

Parameters:
that The object to be compared with.
Returns:
true if the given TimeZoneTransition objects are semantically equal.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

UBool TimeZoneTransition::operator!= ( const TimeZoneTransition that  )  const

Return true if the given TimeZoneTransition objects are semantically unequal.

Objects of different subclasses are considered unequal.

Parameters:
that The object to be compared with.
Returns:
true if the given TimeZoneTransition objects are semantically unequal.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

UDate TimeZoneTransition::getTime ( void   )  const

Returns the time of transition in milliseconds.

Returns:
The time of the transition in milliseconds since the 1970 Jan 1 epoch time.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

void TimeZoneTransition::setTime ( UDate  time  ) 

Sets the time of transition in milliseconds.

Parameters:
time The time of the transition in milliseconds since the 1970 Jan 1 epoch time.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

const TimeZoneRule* TimeZoneTransition::getFrom ( void   )  const

Returns the rule used before the transition.

Returns:
The time zone rule used after the transition.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

void TimeZoneTransition::setFrom ( const TimeZoneRule from  ) 

Sets the rule used before the transition.

The caller remains responsible for deleting the TimeZoneRule object.

Parameters:
from The time zone rule used before the transition.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

void TimeZoneTransition::adoptFrom ( TimeZoneRule from  ) 

Adopts the rule used before the transition.

The caller must not delete the TimeZoneRule object passed in.

Parameters:
from The time zone rule used before the transition.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

void TimeZoneTransition::setTo ( const TimeZoneRule to  ) 

Sets the rule used after the transition.

The caller remains responsible for deleting the TimeZoneRule object.

Parameters:
to The time zone rule used after the transition.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

void TimeZoneTransition::adoptTo ( TimeZoneRule to  ) 

Adopts the rule used after the transition.

The caller must not delete the TimeZoneRule object passed in.

Parameters:
to The time zone rule used after the transition.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

const TimeZoneRule* TimeZoneTransition::getTo ( void   )  const

Returns the rule used after the transition.

Returns:
The time zone rule used after the transition.
Draft:
This API may be changed in the future versions and was introduced in ICU 3.8

static UClassID TimeZoneTransition::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 3.8

virtual UClassID TimeZoneTransition::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 3.8

Implements UObject.


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

Generated on Sun Jan 22 01:54:10 2012 for ICU 3.8.1 by  doxygen 1.5.6