00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ******************************************************************************* 00005 * Copyright (C) 2009-2010, Google, International Business Machines Corporation and * 00006 * others. All Rights Reserved. * 00007 ******************************************************************************* 00008 */ 00009 00010 #ifndef __TMUTAMT_H__ 00011 #define __TMUTAMT_H__ 00012 00013 00019 #include "unicode/measure.h" 00020 #include "unicode/tmunit.h" 00021 00022 #if !UCONFIG_NO_FORMATTING 00023 00024 U_NAMESPACE_BEGIN 00025 00026 00033 class U_I18N_API TimeUnitAmount: public Measure { 00034 public: 00047 TimeUnitAmount(const Formattable& number, 00048 TimeUnit::UTimeUnitFields timeUnitField, 00049 UErrorCode& status); 00050 00063 TimeUnitAmount(double amount, TimeUnit::UTimeUnitFields timeUnitField, 00064 UErrorCode& status); 00065 00066 00071 TimeUnitAmount(const TimeUnitAmount& other); 00072 00073 00078 TimeUnitAmount& operator=(const TimeUnitAmount& other); 00079 00080 00086 virtual UObject* clone() const; 00087 00088 00093 virtual ~TimeUnitAmount(); 00094 00095 00102 virtual UBool operator==(const UObject& other) const; 00103 00104 00111 UBool operator!=(const UObject& other) const; 00112 00113 00125 static UClassID U_EXPORT2 getStaticClassID(void); 00126 00127 00139 virtual UClassID getDynamicClassID(void) const; 00140 00141 00147 const TimeUnit& getTimeUnit() const; 00148 00154 TimeUnit::UTimeUnitFields getTimeUnitField() const; 00155 }; 00156 00157 00158 00159 inline UBool 00160 TimeUnitAmount::operator!=(const UObject& other) const { 00161 return !operator==(other); 00162 } 00163 00164 U_NAMESPACE_END 00165 00166 #endif /* #if !UCONFIG_NO_FORMATTING */ 00167 00168 #endif // __TMUTAMT_H__ 00169 //eof 00170 //
1.6.1