Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* |
michael@0 | 2 | ********************************************************************** |
michael@0 | 3 | * Copyright (c) 2004-2006, International Business Machines |
michael@0 | 4 | * Corporation and others. All Rights Reserved. |
michael@0 | 5 | ********************************************************************** |
michael@0 | 6 | * Author: Alan Liu |
michael@0 | 7 | * Created: April 26, 2004 |
michael@0 | 8 | * Since: ICU 3.0 |
michael@0 | 9 | ********************************************************************** |
michael@0 | 10 | */ |
michael@0 | 11 | #ifndef __MEASUREUNIT_H__ |
michael@0 | 12 | #define __MEASUREUNIT_H__ |
michael@0 | 13 | |
michael@0 | 14 | #include "unicode/utypes.h" |
michael@0 | 15 | |
michael@0 | 16 | #if !UCONFIG_NO_FORMATTING |
michael@0 | 17 | |
michael@0 | 18 | #include "unicode/fmtable.h" |
michael@0 | 19 | |
michael@0 | 20 | /** |
michael@0 | 21 | * \file |
michael@0 | 22 | * \brief C++ API: A unit for measuring a quantity. |
michael@0 | 23 | */ |
michael@0 | 24 | |
michael@0 | 25 | U_NAMESPACE_BEGIN |
michael@0 | 26 | |
michael@0 | 27 | /** |
michael@0 | 28 | * A unit such as length, mass, volume, currency, etc. A unit is |
michael@0 | 29 | * coupled with a numeric amount to produce a Measure. |
michael@0 | 30 | * |
michael@0 | 31 | * <p>This is an abstract class. |
michael@0 | 32 | * |
michael@0 | 33 | * @author Alan Liu |
michael@0 | 34 | * @stable ICU 3.0 |
michael@0 | 35 | */ |
michael@0 | 36 | class U_I18N_API MeasureUnit: public UObject { |
michael@0 | 37 | public: |
michael@0 | 38 | /** |
michael@0 | 39 | * Return a polymorphic clone of this object. The result will |
michael@0 | 40 | * have the same class as returned by getDynamicClassID(). |
michael@0 | 41 | * @stable ICU 3.0 |
michael@0 | 42 | */ |
michael@0 | 43 | virtual UObject* clone() const = 0; |
michael@0 | 44 | |
michael@0 | 45 | /** |
michael@0 | 46 | * Destructor |
michael@0 | 47 | * @stable ICU 3.0 |
michael@0 | 48 | */ |
michael@0 | 49 | virtual ~MeasureUnit(); |
michael@0 | 50 | |
michael@0 | 51 | /** |
michael@0 | 52 | * Equality operator. Return true if this object is equal |
michael@0 | 53 | * to the given object. |
michael@0 | 54 | * @stable ICU 3.0 |
michael@0 | 55 | */ |
michael@0 | 56 | virtual UBool operator==(const UObject& other) const = 0; |
michael@0 | 57 | |
michael@0 | 58 | protected: |
michael@0 | 59 | /** |
michael@0 | 60 | * Default constructor. |
michael@0 | 61 | * @stable ICU 3.0 |
michael@0 | 62 | */ |
michael@0 | 63 | MeasureUnit(); |
michael@0 | 64 | }; |
michael@0 | 65 | |
michael@0 | 66 | U_NAMESPACE_END |
michael@0 | 67 | |
michael@0 | 68 | // NOTE: There is no measunit.cpp. For implementation, see measure.cpp. [alan] |
michael@0 | 69 | |
michael@0 | 70 | #endif // !UCONFIG_NO_FORMATTING |
michael@0 | 71 | #endif // __MEASUREUNIT_H__ |