00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __TMUNIT_H__
00009 #define __TMUNIT_H__
00010
00011
00018 #include "unicode/measunit.h"
00019
00020 #if !UCONFIG_NO_FORMATTING
00021
00022 U_NAMESPACE_BEGIN
00023
00030 class U_I18N_API TimeUnit: public MeasureUnit {
00031 public:
00036 enum UTimeUnitFields {
00037 UTIMEUNIT_YEAR,
00038 UTIMEUNIT_MONTH,
00039 UTIMEUNIT_DAY,
00040 UTIMEUNIT_WEEK,
00041 UTIMEUNIT_HOUR,
00042 UTIMEUNIT_MINUTE,
00043 UTIMEUNIT_SECOND,
00044 UTIMEUNIT_FIELD_COUNT
00045 };
00046
00057 static TimeUnit* U_EXPORT2 createInstance(UTimeUnitFields timeUnitField,
00058 UErrorCode& status);
00059
00060
00065 virtual UObject* clone() const;
00066
00071 TimeUnit(const TimeUnit& other);
00072
00077 TimeUnit& operator=(const TimeUnit& other);
00078
00087 virtual UClassID getDynamicClassID() const;
00088
00095 static UClassID U_EXPORT2 getStaticClassID();
00096
00097
00103 UTimeUnitFields getTimeUnitField() const;
00104
00109 virtual ~TimeUnit();
00110
00111 private:
00112 UTimeUnitFields fTimeUnitField;
00113
00118 TimeUnit(UTimeUnitFields timeUnitField);
00119
00120 };
00121
00122
00123 U_NAMESPACE_END
00124
00125 #endif
00126
00127 #endif // __TMUNIT_H__
00128
00129