00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __TMUTAMT_H__
00011 #define __TMUTAMT_H__
00012
00013
00019 #include "unicode/utypes.h"
00020
00021 #if U_SHOW_CPLUSPLUS_API
00022
00023 #if !UCONFIG_NO_FORMATTING
00024
00025 #include "unicode/measure.h"
00026 #include "unicode/tmunit.h"
00027
00028 U_NAMESPACE_BEGIN
00029
00030
00037 class U_I18N_API TimeUnitAmount: public Measure {
00038 public:
00051 TimeUnitAmount(const Formattable& number,
00052 TimeUnit::UTimeUnitFields timeUnitField,
00053 UErrorCode& status);
00054
00067 TimeUnitAmount(double amount, TimeUnit::UTimeUnitFields timeUnitField,
00068 UErrorCode& status);
00069
00070
00075 TimeUnitAmount(const TimeUnitAmount& other);
00076
00077
00082 TimeUnitAmount& operator=(const TimeUnitAmount& other);
00083
00084
00090 virtual TimeUnitAmount* clone() const;
00091
00092
00097 virtual ~TimeUnitAmount();
00098
00099
00106 virtual UBool operator==(const UObject& other) const;
00107
00108
00115 UBool operator!=(const UObject& other) const;
00116
00117
00129 static UClassID U_EXPORT2 getStaticClassID(void);
00130
00131
00143 virtual UClassID getDynamicClassID(void) const;
00144
00145
00151 const TimeUnit& getTimeUnit() const;
00152
00158 TimeUnit::UTimeUnitFields getTimeUnitField() const;
00159 };
00160
00161
00162
00163 inline UBool
00164 TimeUnitAmount::operator!=(const UObject& other) const {
00165 return !operator==(other);
00166 }
00167
00168 U_NAMESPACE_END
00169
00170 #endif
00171
00172 #endif
00173
00174 #endif // __TMUTAMT_H__
00175
00176