Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1247)

Unified Diff: icu4c/source/i18n/number_types.h

Issue 335150043: Refreshing Number Parsing: ICU4J Base URL: svn+icussh://source.icu-project.org/repos/icu/trunk/
Patch Set: Replying to Andy feedback round one. See commit message. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « icu4c/source/i18n/number_rounding.cpp ('k') | icu4c/source/i18n/unicode/decimfmt.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « icu4c/source/i18n/number_rounding.cpp ('k') | icu4c/source/i18n/unicode/decimfmt.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b