|
ICU 73.2
73.2
|
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/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 override; 00091 00092 00097 virtual ~TimeUnitAmount(); 00098 00099 00106 virtual bool operator==(const UObject& other) const; 00107 00108 00115 bool operator!=(const UObject& other) const; 00116 00117 00129 static UClassID U_EXPORT2 getStaticClassID(void); 00130 00131 00143 virtual UClassID getDynamicClassID(void) const override; 00144 00145 00151 const TimeUnit& getTimeUnit() const; 00152 00158 TimeUnit::UTimeUnitFields getTimeUnitField() const; 00159 }; 00160 00161 00162 00163 inline bool 00164 TimeUnitAmount::operator!=(const UObject& other) const { 00165 return !operator==(other); 00166 } 00167 00168 U_NAMESPACE_END 00169 00170 #endif /* #if !UCONFIG_NO_FORMATTING */ 00171 00172 #endif /* U_SHOW_CPLUSPLUS_API */ 00173 00174 #endif // __TMUTAMT_H__ 00175 //eof 00176 //
1.7.6.1