00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __TMUNIT_H__
00011 #define __TMUNIT_H__
00012
00013
00020 #include "unicode/measunit.h"
00021
00022 #if !UCONFIG_NO_FORMATTING
00023
00024 U_NAMESPACE_BEGIN
00025
00032 class U_I18N_API TimeUnit: public MeasureUnit {
00033 public:
00038 enum UTimeUnitFields {
00039 UTIMEUNIT_YEAR,
00040 UTIMEUNIT_MONTH,
00041 UTIMEUNIT_DAY,
00042 UTIMEUNIT_WEEK,
00043 UTIMEUNIT_HOUR,
00044 UTIMEUNIT_MINUTE,
00045 UTIMEUNIT_SECOND,
00046 #ifndef U_HIDE_DEPRECATED_API
00047
00051 UTIMEUNIT_FIELD_COUNT
00052 #endif // U_HIDE_DEPRECATED_API
00053 };
00054
00065 static TimeUnit* U_EXPORT2 createInstance(UTimeUnitFields timeUnitField,
00066 UErrorCode& status);
00067
00068
00073 virtual UObject* clone() const;
00074
00079 TimeUnit(const TimeUnit& other);
00080
00085 TimeUnit& operator=(const TimeUnit& other);
00086
00095 virtual UClassID getDynamicClassID() const;
00096
00103 static UClassID U_EXPORT2 getStaticClassID();
00104
00105
00111 UTimeUnitFields getTimeUnitField() const;
00112
00117 virtual ~TimeUnit();
00118
00119 private:
00120 UTimeUnitFields fTimeUnitField;
00121
00126 TimeUnit(UTimeUnitFields timeUnitField);
00127
00128 };
00129
00130
00131 U_NAMESPACE_END
00132
00133 #endif
00134
00135 #endif // __TMUNIT_H__
00136
00137