"Fossies" - the Fresh Open Source Software Archive

Member "tmutamt_8h_source.html" (3 Oct 2019, 22015 Bytes) of package /linux/misc/icu4c-65_1-docs.zip:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the project site itself.

ICU 65.1  65.1
tmutamt.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4  *******************************************************************************
5  * Copyright (C) 2009-2010, Google, International Business Machines Corporation and *
6  * others. All Rights Reserved. *
7  *******************************************************************************
8  */
9 
10 #ifndef __TMUTAMT_H__
11 #define __TMUTAMT_H__
12 
13 
19 #include "unicode/utypes.h"
20 
21 #if U_SHOW_CPLUSPLUS_API
22 
23 #if !UCONFIG_NO_FORMATTING
24 
25 #include "unicode/measure.h"
26 #include "unicode/tmunit.h"
27 
28 U_NAMESPACE_BEGIN
29 
30 
38 public:
51  TimeUnitAmount(const Formattable& number,
52  TimeUnit::UTimeUnitFields timeUnitField,
53  UErrorCode& status);
54 
67  TimeUnitAmount(double amount, TimeUnit::UTimeUnitFields timeUnitField,
68  UErrorCode& status);
69 
70 
75  TimeUnitAmount(const TimeUnitAmount& other);
76 
77 
83 
84 
90  virtual TimeUnitAmount* clone() const;
91 
92 
97  virtual ~TimeUnitAmount();
98 
99 
106  virtual UBool operator==(const UObject& other) const;
107 
108 
115  UBool operator!=(const UObject& other) const;
116 
117 
129  static UClassID U_EXPORT2 getStaticClassID(void);
130 
131 
143  virtual UClassID getDynamicClassID(void) const;
144 
145 
151  const TimeUnit& getTimeUnit() const;
152 
158  TimeUnit::UTimeUnitFields getTimeUnitField() const;
159 };
160 
161 
162 
163 inline UBool
164 TimeUnitAmount::operator!=(const UObject& other) const {
165  return !operator==(other);
166 }
167 
168 U_NAMESPACE_END
169 
170 #endif /* #if !UCONFIG_NO_FORMATTING */
171 
172 #endif /* U_SHOW_CPLUSPLUS_API */
173 
174 #endif // __TMUTAMT_H__
175 //eof
176 //
UTimeUnitFields
Constants for all the time units we supported.
Definition: tmunit.h:41
An amount of a specified unit, consisting of a number and a Unit.
Definition: measure.h:45
UBool operator==(const UObject &other) const
Equality operator.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:96
UBool operator!=(const UObject &other) const
Not-equality operator.
Definition: tmutamt.h:164
C++ API: time unit object.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
Definition: utypes.h:301
virtual Measure * clone() const
Return a polymorphic clone of this object.
Measurement unit for time units.
Definition: tmunit.h:35
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
Definition: stringpiece.h:251
C++ API: MeasureUnit object.
virtual UClassID getDynamicClassID(void) const
Returns a unique class ID POLYMORPHICALLY.
static UClassID getStaticClassID(void)
Return the class ID for this class.
Express a duration as a time unit and number.
Definition: tmutamt.h:37
Measure & operator=(const Measure &other)
Assignment operator.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:415
Basic definitions for ICU, for both C and C++ APIs.
Formattable objects can be passed to the Format class or its subclasses for formatting.
Definition: fmtable.h:64
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:223
int8_t UBool
The ICU boolean type.
Definition: umachine.h:261