Index: icu4c/source/i18n/number_types.h |
=================================================================== |
--- icu4c/source/i18n/number_types.h (revision 40724) |
+++ icu4c/source/i18n/number_types.h (working copy) |
@@ -230,10 +230,21 @@ |
virtual void processQuantity(DecimalQuantity& quantity, MicroProps& micros, UErrorCode& status) const = 0; |
}; |
+/** |
+ * An interface used by compact notation and scientific notation to choose a multiplier while rounding. |
+ */ |
class MultiplierProducer { |
public: |
virtual ~MultiplierProducer() = default; |
+ /** |
+ * Maps a magnitude to a multiplier in powers of ten. For example, in compact notation in English, a magnitude of 5 |
+ * (e.g., 100,000) should return a multiplier of -3, since the number is displayed in thousands. |
+ * |
+ * @param magnitude |
+ * The power of ten of the input number. |
+ * @return The shift in powers of ten. |
+ */ |
virtual int32_t getMultiplier(int32_t magnitude) const = 0; |
}; |