Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: source/i18n/nfrule.h

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/nfrs.cpp ('k') | source/i18n/nfrule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/nfrule.h
diff --git a/source/i18n/nfrule.h b/source/i18n/nfrule.h
index 96474630a4501fb4886169bf3811e376b6f3d2df..f5697f3da4004d98ec0e696767e50f578be72d51 100644
--- a/source/i18n/nfrule.h
+++ b/source/i18n/nfrule.h
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 1997-2014, International Business Machines
+* Copyright (C) 1997-2015, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
*/
@@ -38,17 +38,19 @@ public:
kImproperFractionRule = -2,
kProperFractionRule = -3,
kMasterRule = -4,
- kOtherRule = -5
+ kInfinityRule = -5,
+ kNaNRule = -6,
+ kOtherRule = -7
};
static void makeRules(UnicodeString& definition,
- const NFRuleSet* ruleSet,
+ NFRuleSet* ruleSet,
const NFRule* predecessor,
const RuleBasedNumberFormat* rbnf,
NFRuleList& ruleList,
UErrorCode& status);
- NFRule(const RuleBasedNumberFormat* rbnf);
+ NFRule(const RuleBasedNumberFormat* rbnf, const UnicodeString &ruleText, UErrorCode &status);
~NFRule();
UBool operator==(const NFRule& rhs) const;
@@ -60,10 +62,12 @@ public:
int64_t getBaseValue() const { return baseValue; }
void setBaseValue(int64_t value, UErrorCode& status);
+ UChar getDecimalPoint() const { return decimalPoint; }
+
double getDivisor() const { return uprv_pow(radix, exponent); }
- void doFormat(int64_t number, UnicodeString& toAppendTo, int32_t pos, UErrorCode& status) const;
- void doFormat(double number, UnicodeString& toAppendTo, int32_t pos, UErrorCode& status) const;
+ void doFormat(int64_t number, UnicodeString& toAppendTo, int32_t pos, int32_t recursionCount, UErrorCode& status) const;
+ void doFormat(double number, UnicodeString& toAppendTo, int32_t pos, int32_t recursionCount, UErrorCode& status) const;
UBool doParse(const UnicodeString& text,
ParsePosition& pos,
@@ -78,13 +82,15 @@ public:
int32_t findTextLenient(const UnicodeString& str, const UnicodeString& key,
int32_t startingAt, int32_t* resultCount) const;
+ void setDecimalFormatSymbols(const DecimalFormatSymbols &newSymbols, UErrorCode& status);
+
private:
void parseRuleDescriptor(UnicodeString& descriptor, UErrorCode& status);
void extractSubstitutions(const NFRuleSet* ruleSet, const UnicodeString &ruleText, const NFRule* predecessor, UErrorCode& status);
NFSubstitution* extractSubstitution(const NFRuleSet* ruleSet, const NFRule* predecessor, UErrorCode& status);
int16_t expectedExponent() const;
- int32_t indexOfAny(const UChar* const strings[]) const;
+ int32_t indexOfAnyRulePrefix() const;
double matchToDelimiter(const UnicodeString& text, int32_t startPos, double baseValue,
const UnicodeString& delimiter, ParsePosition& pp, const NFSubstitution* sub,
double upperBound) const;
@@ -99,6 +105,7 @@ private:
int64_t baseValue;
int32_t radix;
int16_t exponent;
+ UChar decimalPoint;
UnicodeString ruleText;
NFSubstitution* sub1;
NFSubstitution* sub2;
« no previous file with comments | « source/i18n/nfrs.cpp ('k') | source/i18n/nfrule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698