ICU 56.1: dtrule.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

dtrule.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * Copyright (C) 2007-2008, International Business Machines Corporation and *
4 * others. All Rights Reserved. *
5 *******************************************************************************
6 */
7 #ifndef DTRULE_H
8 #define DTRULE_H
9
10 #include "unicode/utypes.h"
11
17 #if !UCONFIG_NO_FORMATTING
18
19 #include "unicode/uobject.h"
20
21 U_NAMESPACE_BEGIN
29 class U_I18N_API DateTimeRule : public UObject {
30 public:
31
36 enum DateRuleType {
37 DOM = 0,
39 DOW,
41 DOW_GEQ_DOM,
43 DOW_LEQ_DOM
45 };
46
51 enum TimeRuleType {
52 WALL_TIME = 0,
53 STANDARD_TIME,
54 UTC_TIME
55 };
56
69 DateTimeRule(int32_t month, int32_t dayOfMonth,
70 int32_t millisInDay, TimeRuleType timeType);
71
87 DateTimeRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek,
88 int32_t millisInDay, TimeRuleType timeType);
89
105 DateTimeRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, UBool after,
106 int32_t millisInDay, TimeRuleType timeType);
107
113 DateTimeRule(const DateTimeRule& source);
114
119 ~DateTimeRule();
120
127 DateTimeRule* clone(void) const;
128
134 DateTimeRule& operator=(const DateTimeRule& right);
135
143 UBool operator==(const DateTimeRule& that) const;
144
152 UBool operator!=(const DateTimeRule& that) const;
153
159 DateRuleType getDateRuleType(void) const;
160
167 TimeRuleType getTimeRuleType(void) const;
168
174 int32_t getRuleMonth(void) const;
175
182 int32_t getRuleDayOfMonth(void) const;
183
190 int32_t getRuleDayOfWeek(void) const;
191
199 int32_t getRuleWeekInMonth(void) const;
200
206 int32_t getRuleMillisInDay(void) const;
207
208 private:
209 int32_t fMonth;
210 int32_t fDayOfMonth;
211 int32_t fDayOfWeek;
212 int32_t fWeekInMonth;
213 int32_t fMillisInDay;
214 DateRuleType fDateRuleType;
215 TimeRuleType fTimeRuleType;
216
217 public:
229 static UClassID U_EXPORT2 getStaticClassID(void);
230
242 virtual UClassID getDynamicClassID(void) const;
243 };
244
245 U_NAMESPACE_END
246
247 #endif /* #if !UCONFIG_NO_FORMATTING */
248
249 #endif // DTRULE_H
250 //eof
icu::DateTimeRule::TimeRuleType
TimeRuleType
Time rule type constants.
Definition: dtrule.h:51
icu::UObject::getDynamicClassID
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
icu::operator==
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:91
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
Definition: utypes.h:358
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
icu::operator!=
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
Definition: stringpiece.h:218
uobject.h
C++ API: Common ICU base class UObject.
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
icu::DateTimeRule::DateRuleType
DateRuleType
Date rule type constants.
Definition: dtrule.h:36
icu::DateTimeRule
DateTimeRule is a class representing a time in a year by a rule specified by month, day of month, day of week and time in the day.
Definition: dtrule.h:29
icu::DateTimeRule::STANDARD_TIME
The local standard time.
Definition: dtrule.h:53
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:221
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234