Movatterモバイル変換


[0]ホーム

URL:


ICU 78.1  78.1
Public Member Functions |Static Public Member Functions
icu::TimeArrayTimeZoneRule Class Reference

TimeArrayTimeZoneRule represents a time zone rule whose start times are defined by an array of milliseconds since the standard base time.More...

#include <tzrule.h>

Inheritance diagram for icu::TimeArrayTimeZoneRule:

Public Member Functions

 TimeArrayTimeZoneRule (constUnicodeString &name, int32_t rawOffset, int32_t dstSavings, constUDate *startTimes, int32_t numStartTimes,DateTimeRule::TimeRuleType timeRuleType)
 Constructs aTimeArrayTimeZoneRule with the name, the GMT offset of its standard time, the amount of daylight saving offset adjustment and the array of times when this rule takes effect.More...
 
 TimeArrayTimeZoneRule (constTimeArrayTimeZoneRule &source)
 Copy constructor.More...
 
virtual ~TimeArrayTimeZoneRule ()
 Destructor.More...
 
virtualTimeArrayTimeZoneRuleclone () const override
 Clone thisTimeArrayTimeZoneRule object polymorphically.More...
 
TimeArrayTimeZoneRuleoperator= (constTimeArrayTimeZoneRule &right)
 Assignment operator.More...
 
virtual bool operator== (constTimeZoneRule &that) const override
 Return true if the givenTimeZoneRule objects are semantically equal.More...
 
virtual bool operator!= (constTimeZoneRule &that) const override
 Return true if the givenTimeZoneRule objects are semantically unequal.More...
 
DateTimeRule::TimeRuleType getTimeType () const
 Gets the time type of the start times used by this rule.More...
 
UBool getStartTimeAt (int32_t index,UDate &result) const
 Gets a start time at the index stored in this rule.More...
 
int32_t countStartTimes () const
 Returns the number of start times stored in this rule.More...
 
virtualUBool isEquivalentTo (constTimeZoneRule &that) const override
 Returns if this rule represents the same rule and offsets as another.More...
 
virtualUBool getFirstStart (int32_t prevRawOffset, int32_t prevDSTSavings,UDate &result) const override
 Gets the very first time when this rule takes effect.More...
 
virtualUBool getFinalStart (int32_t prevRawOffset, int32_t prevDSTSavings,UDate &result) const override
 Gets the final time when this rule takes effect.More...
 
virtualUBool getNextStart (UDate base, int32_t prevRawOffset, int32_t prevDSTSavings,UBool inclusive,UDate &result) const override
 Gets the first time when this rule takes effect after the specified time.More...
 
virtualUBool getPreviousStart (UDate base, int32_t prevRawOffset, int32_t prevDSTSavings,UBool inclusive,UDate &result) const override
 Gets the most recent time when this rule takes effect before the specified time.More...
 
virtualUClassID getDynamicClassID () const override
 Returns a unique class ID POLYMORPHICALLY.More...
 
- Public Member Functions inherited fromicu::TimeZoneRule
virtual ~TimeZoneRule ()
 Destructor.More...
 
UnicodeStringgetName (UnicodeString &name) const
 Fills in "name" with the name of this time zone.More...
 
int32_t getRawOffset () const
 Gets the standard time offset.More...
 
int32_t getDSTSavings () const
 Gets the amount of daylight saving delta time from the standard time.More...
 
- Public Member Functions inherited fromicu::UObject
virtual ~UObject ()
 Destructor.More...
 

Static Public Member Functions

staticUClassID getStaticClassID ()
 Return the class ID for this class.More...
 

Additional Inherited Members

- Protected Member Functions inherited fromicu::TimeZoneRule
 TimeZoneRule (constUnicodeString &name, int32_t rawOffset, int32_t dstSavings)
 Constructs aTimeZoneRule with the name, the GMT offset of its standard time and the amount of daylight saving offset adjustment.More...
 
 TimeZoneRule (constTimeZoneRule &source)
 Copy constructor.More...
 
TimeZoneRuleoperator= (constTimeZoneRule &right)
 Assignment operator.More...
 

Detailed Description

TimeArrayTimeZoneRule represents a time zone rule whose start times are defined by an array of milliseconds since the standard base time.

Stable:
ICU 3.8

Definition at line606 of filetzrule.h.

Constructor & Destructor Documentation

◆ TimeArrayTimeZoneRule()[1/2]

icu::TimeArrayTimeZoneRule::TimeArrayTimeZoneRule(constUnicodeStringname,
int32_t rawOffset,
int32_t dstSavings,
constUDatestartTimes,
int32_t numStartTimes,
DateTimeRule::TimeRuleType timeRuleType 
)

Constructs aTimeArrayTimeZoneRule with the name, the GMT offset of its standard time, the amount of daylight saving offset adjustment and the array of times when this rule takes effect.

Parameters
nameThe time zone name.
rawOffsetThe UTC offset of its standard time in milliseconds.
dstSavingsThe amount of daylight saving offset adjustment in milliseconds. If this ia a rule for standard time, the value of this argument is 0.
startTimesThe array start times in milliseconds since the base time (January 1, 1970, 00:00:00).
numStartTimesThe number of elements in the parameter "startTimes"
timeRuleTypeThe time type of the start times, which is one ofDataTimeRule::WALL_TIME,STANDARD_TIME andUTC_TIME.
Stable:
ICU 3.8

◆ TimeArrayTimeZoneRule()[2/2]

icu::TimeArrayTimeZoneRule::TimeArrayTimeZoneRule(constTimeArrayTimeZoneRulesource)

Copy constructor.

Parameters
sourceTheTimeArrayTimeZoneRule object to be copied.
Stable:
ICU 3.8

◆ ~TimeArrayTimeZoneRule()

virtual icu::TimeArrayTimeZoneRule::~TimeArrayTimeZoneRule()
virtual

Destructor.

Stable:
ICU 3.8

Member Function Documentation

◆ clone()

virtualTimeArrayTimeZoneRule* icu::TimeArrayTimeZoneRule::clone() const
overridevirtual

Clone thisTimeArrayTimeZoneRule object polymorphically.

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

Returns
A copy of the object.
Stable:
ICU 3.8

Implementsicu::TimeZoneRule.

◆ countStartTimes()

int32_t icu::TimeArrayTimeZoneRule::countStartTimes() const

Returns the number of start times stored in this rule.

Returns
The number of start times.
Stable:
ICU 3.8

◆ getDynamicClassID()

virtualUClassID icu::TimeArrayTimeZoneRule::getDynamicClassID() const
overridevirtual

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. Polymorphicoperator==() andclone() 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.
Stable:
ICU 3.8

Reimplemented fromicu::UObject.

◆ getFinalStart()

virtualUBool icu::TimeArrayTimeZoneRule::getFinalStart(int32_t prevRawOffset,
int32_t prevDSTSavings,
UDateresult 
) const
overridevirtual

Gets the final time when this rule takes effect.

Parameters
prevRawOffsetThe standard time offset from UTC before this rule takes effect in milliseconds.
prevDSTSavingsThe amount of daylight saving offset from the standard time.
resultReceives the final time when this rule takes effect.
Returns
true if the start time is available. When false is returned, output parameter "result" is unchanged.
Stable:
ICU 3.8

Implementsicu::TimeZoneRule.

◆ getFirstStart()

virtualUBool icu::TimeArrayTimeZoneRule::getFirstStart(int32_t prevRawOffset,
int32_t prevDSTSavings,
UDateresult 
) const
overridevirtual

Gets the very first time when this rule takes effect.

Parameters
prevRawOffsetThe standard time offset from UTC before this rule takes effect in milliseconds.
prevDSTSavingsThe amount of daylight saving offset from the standard time.
resultReceives the very first time when this rule takes effect.
Returns
true if the start time is available. When false is returned, output parameter "result" is unchanged.
Stable:
ICU 3.8

Implementsicu::TimeZoneRule.

◆ getNextStart()

virtualUBool icu::TimeArrayTimeZoneRule::getNextStart(UDate base,
int32_t prevRawOffset,
int32_t prevDSTSavings,
UBool inclusive,
UDateresult 
) const
overridevirtual

Gets the first time when this rule takes effect after the specified time.

Parameters
baseThe first start time after this base time will be returned.
prevRawOffsetThe standard time offset from UTC before this rule takes effect in milliseconds.
prevDSTSavingsThe amount of daylight saving offset from the standard time.
inclusiveWhether the base time is inclusive or not.
resultReceives The first time when this rule takes effect after the specified base time.
Returns
true if the start time is available. When false is returned, output parameter "result" is unchanged.
Stable:
ICU 3.8

Implementsicu::TimeZoneRule.

◆ getPreviousStart()

virtualUBool icu::TimeArrayTimeZoneRule::getPreviousStart(UDate base,
int32_t prevRawOffset,
int32_t prevDSTSavings,
UBool inclusive,
UDateresult 
) const
overridevirtual

Gets the most recent time when this rule takes effect before the specified time.

Parameters
baseThe most recent time before this base time will be returned.
prevRawOffsetThe standard time offset from UTC before this rule takes effect in milliseconds.
prevDSTSavingsThe amount of daylight saving offset from the standard time.
inclusiveWhether the base time is inclusive or not.
resultReceives The most recent time when this rule takes effect before the specified base time.
Returns
true if the start time is available. When false is returned, output parameter "result" is unchanged.
Stable:
ICU 3.8

Implementsicu::TimeZoneRule.

◆ getStartTimeAt()

UBool icu::TimeArrayTimeZoneRule::getStartTimeAt(int32_t index,
UDateresult 
) const

Gets a start time at the index stored in this rule.

Parameters
indexThe index of start times
resultReceives the start time at the index
Returns
true if the index is within the valid range and and the result is set. When false, the output parameger "result" is unchanged.
Stable:
ICU 3.8

◆ getStaticClassID()

staticUClassID icu::TimeArrayTimeZoneRule::getStaticClassID()
static

Return the class ID for this class.

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

.   Base* polymorphic_pointer = createPolymorphicObject();.   if (polymorphic_pointer->getDynamicClassID() ==.       erived::getStaticClassID()) ...
Returns
The class ID for all objects of this class.
Stable:
ICU 3.8

◆ getTimeType()

DateTimeRule::TimeRuleType icu::TimeArrayTimeZoneRule::getTimeType() const

Gets the time type of the start times used by this rule.

The return value is eitherDateTimeRule::WALL_TIME orSTANDARD_TIME orUTC_TIME.

Returns
The time type used of the start times used by this rule.
Stable:
ICU 3.8

◆ isEquivalentTo()

virtualUBool icu::TimeArrayTimeZoneRule::isEquivalentTo(constTimeZoneRulethat) const
overridevirtual

Returns if this rule represents the same rule and offsets as another.

When twoTimeZoneRule objects differ only its names, this method returns true.

Parameters
thatTheTimeZoneRule object to be compared with.
Returns
true if the otherTimeZoneRule is equivalent to this one.
Stable:
ICU 3.8

Reimplemented fromicu::TimeZoneRule.

◆ operator!=()

virtual bool icu::TimeArrayTimeZoneRule::operator!=(constTimeZoneRulethat) const
overridevirtual

Return true if the givenTimeZoneRule objects are semantically unequal.

Objects of different subclasses are considered unequal.

Parameters
thatThe object to be compared with.
Returns
true if the givenTimeZoneRule objects are semantically unequal.
Stable:
ICU 3.8

Reimplemented fromicu::TimeZoneRule.

◆ operator=()

TimeArrayTimeZoneRule& icu::TimeArrayTimeZoneRule::operator=(constTimeArrayTimeZoneRuleright)

Assignment operator.

Parameters
rightThe object to be copied.
Stable:
ICU 3.8

◆ operator==()

virtual bool icu::TimeArrayTimeZoneRule::operator==(constTimeZoneRulethat) const
overridevirtual

Return true if the givenTimeZoneRule objects are semantically equal.

Objects of different subclasses are considered unequal.

Parameters
thatThe object to be compared with.
Returns
true if the givenTimeZoneRule objects are semantically equal.
Stable:
ICU 3.8

Reimplemented fromicu::TimeZoneRule.


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

Generated by doxygen 1.9.1
[8]ページ先頭

©2009-2025 Movatter.jp