ICU 4.8.1.1  4.8.1.1
dtrule.h
Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 * Copyright (C) 2007-2008, International Business Machines Corporation and         *
00004 * others. All Rights Reserved.                                                *
00005 *******************************************************************************
00006 */
00007 #ifndef DTRULE_H
00008 #define DTRULE_H
00009 
00010 #include "unicode/utypes.h"
00011 
00017 #if !UCONFIG_NO_FORMATTING
00018 
00019 #include "unicode/uobject.h"
00020 
00021 U_NAMESPACE_BEGIN
00029 class U_I18N_API DateTimeRule : public UObject {
00030 public:
00031 
00036     enum DateRuleType {
00037         DOM = 0,        
00039         DOW,            
00041         DOW_GEQ_DOM,    
00043         DOW_LEQ_DOM     
00045     };
00046 
00051     enum TimeRuleType {
00052         WALL_TIME = 0,  
00053         STANDARD_TIME,  
00054         UTC_TIME        
00055     };
00056 
00069     DateTimeRule(int32_t month, int32_t dayOfMonth,
00070         int32_t millisInDay, TimeRuleType timeType);
00071 
00087     DateTimeRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek,
00088         int32_t millisInDay, TimeRuleType timeType);
00089 
00105     DateTimeRule(int32_t month, int32_t dayOfMonth, int32_t dayOfWeek, UBool after,
00106         int32_t millisInDay, TimeRuleType timeType);
00107 
00113     DateTimeRule(const DateTimeRule& source);
00114 
00119     ~DateTimeRule();
00120 
00127     DateTimeRule* clone(void) const;
00128 
00134     DateTimeRule& operator=(const DateTimeRule& right);
00135 
00143     UBool operator==(const DateTimeRule& that) const;
00144 
00152     UBool operator!=(const DateTimeRule& that) const;
00153 
00159     DateRuleType getDateRuleType(void) const;
00160 
00167     TimeRuleType getTimeRuleType(void) const;
00168 
00174     int32_t getRuleMonth(void) const;
00175 
00182     int32_t getRuleDayOfMonth(void) const;
00183 
00190     int32_t getRuleDayOfWeek(void) const;
00191 
00199     int32_t getRuleWeekInMonth(void) const;
00200 
00206     int32_t getRuleMillisInDay(void) const;
00207 
00208 private:
00209     int32_t fMonth;
00210     int32_t fDayOfMonth;
00211     int32_t fDayOfWeek;
00212     int32_t fWeekInMonth;
00213     int32_t fMillisInDay;
00214     DateRuleType fDateRuleType;
00215     TimeRuleType fTimeRuleType;
00216 
00217 public:
00229     static UClassID U_EXPORT2 getStaticClassID(void);
00230 
00242     virtual UClassID getDynamicClassID(void) const;
00243 };
00244 
00245 U_NAMESPACE_END
00246 
00247 #endif /* #if !UCONFIG_NO_FORMATTING */
00248 
00249 #endif // DTRULE_H
00250 //eof
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines