1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 4 ********************************************************************** 5 * Copyright (c) 2004-2015, International Business Machines 6 * Corporation and others. All Rights Reserved. 7 ********************************************************************** 9 * Created: April 26, 2004 11 ********************************************************************** 18 #if U_SHOW_CPLUSPLUS_API 25 #if !UCONFIG_NO_FORMATTING 170 #endif// !UCONFIG_NO_FORMATTING 172 #endif/* U_SHOW_CPLUSPLUS_API */ 174 #endif// __MEASURE_H__ Formattable objects can be passed to the Format class or its subclasses for formatting.
A unit such as length, mass, volume, currency, etc.
An amount of a specified unit, consisting of a number and a Unit.
static UClassID getStaticClassID()
Return the class ID for this class.
Measure(const Formattable &number, MeasureUnit *adoptedUnit, UErrorCode &ec)
Construct an object with the given numeric amount and the given unit.
bool operator!=(const UObject &other) const
Inequality operator.
virtual ~Measure()
Destructor.
Measure()
Default constructor.
virtual Measure * clone() const
Return a polymorphic clone of this object.
Measure & operator=(const Measure &other)
Assignment operator.
Measure(const Measure &other)
Copy constructor.
bool operator==(const UObject &other) const
Equality operator.
virtual UClassID getDynamicClassID() const override
Returns a unique class ID POLYMORPHICALLY.
UObject is the common ICU "boilerplate" class.
C++ API: Formattable is a thin wrapper for primitive types used for formatting and parsing.
U_COMMON_API UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.