void populate(const Locale &locale, const char *nsName, CompactStyle compactStyle,
CompactType compactType, UErrorCode &status);
- int32_t getMultiplier(int32_t magnitude) const override;
+ int32_t getMultiplier(int32_t magnitude) const U_OVERRIDE;
const UChar *getPattern(int32_t magnitude, StandardPlural::Form plural) const;
public:
explicit CompactDataSink(CompactData &data) : data(data) {}
- void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) override;
+ void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) U_OVERRIDE;
private:
CompactData &data;
MutablePatternModifier *buildReference, const MicroPropsGenerator *parent,
UErrorCode &status);
- ~CompactHandler() override;
+ ~CompactHandler() U_OVERRIDE;
void
- processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const override;
+ processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const U_OVERRIDE;
private:
const PluralRules *rules;
bool isNegative() const;
/** @return Whether the value represented by this {@link DecimalQuantity} is infinite. */
- bool isInfinite() const override;
+ bool isInfinite() const U_OVERRIDE;
/** @return Whether the value represented by this {@link DecimalQuantity} is not a number. */
- bool isNaN() const override;
+ bool isNaN() const U_OVERRIDE;
int64_t toLong() const;
*/
StandardPlural::Form getStandardPlural(const PluralRules *rules) const;
- double getPluralOperand(PluralOperand operand) const override;
+ double getPluralOperand(PluralOperand operand) const U_OVERRIDE;
/**
* Gets the digit at the specified magnitude. For example, if the represented number is 12.3,
const PluralRules *rules, const MicroPropsGenerator *parent, UErrorCode &status);
void
- processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const override;
+ processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const U_OVERRIDE;
private:
SimpleModifier fModifiers[StandardPlural::Form::COUNT];
: fPrefix(prefix), fSuffix(suffix), fField(field), fStrong(strong) {}
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const override;
+ UErrorCode &status) const U_OVERRIDE;
- int32_t getPrefixLength(UErrorCode &status) const override;
+ int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE;
- int32_t getCodePointCount(UErrorCode &status) const override;
+ int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE;
- bool isStrong() const override;
+ bool isStrong() const U_OVERRIDE;
private:
UnicodeString fPrefix;
SimpleModifier();
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const override;
+ UErrorCode &status) const U_OVERRIDE;
- int32_t getPrefixLength(UErrorCode &status) const override;
+ int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE;
- int32_t getCodePointCount(UErrorCode &status) const override;
+ int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE;
- bool isStrong() const override;
+ bool isStrong() const U_OVERRIDE;
/**
* TODO: This belongs in SimpleFormatterImpl. The only reason I haven't moved it there yet is because
bool strong) : fPrefix(prefix), fSuffix(suffix), fStrong(strong) {}
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const override;
+ UErrorCode &status) const U_OVERRIDE;
- int32_t getPrefixLength(UErrorCode &status) const override;
+ int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE;
- int32_t getCodePointCount(UErrorCode &status) const override;
+ int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE;
- bool isStrong() const override;
+ bool isStrong() const U_OVERRIDE;
protected:
// NOTE: In Java, these are stored as array pointers. In C++, the NumberStringBuilder is stored by
bool strong, const DecimalFormatSymbols &symbols, UErrorCode &status);
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const override;
+ UErrorCode &status) const U_OVERRIDE;
/** Unsafe code path */
static int32_t
explicit EmptyModifier(bool isStrong) : fStrong(isStrong) {}
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const override {
+ UErrorCode &status) const U_OVERRIDE {
(void)output;
(void)leftIndex;
(void)rightIndex;
return 0;
}
- int32_t getPrefixLength(UErrorCode &status) const override {
+ int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE {
(void)status;
return 0;
}
- int32_t getCodePointCount(UErrorCode &status) const override {
+ int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE {
(void)status;
return 0;
}
- bool isStrong() const override {
+ bool isStrong() const U_OVERRIDE {
return fStrong;
}
// Exported as U_I18N_API because it is needed for the unit test PatternModifierTest
class U_I18N_API ImmutablePatternModifier : public MicroPropsGenerator {
public:
- ~ImmutablePatternModifier() override = default;
+ ~ImmutablePatternModifier() U_OVERRIDE = default;
- void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const override;
+ void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const U_OVERRIDE;
void applyToMicros(MicroProps µs, DecimalQuantity &quantity) const;
: public MicroPropsGenerator, public Modifier, public SymbolProvider, public CharSequence {
public:
- ~MutablePatternModifier() override = default;
+ ~MutablePatternModifier() U_OVERRIDE = default;
/**
* @param isStrong
MicroPropsGenerator &addToChain(const MicroPropsGenerator *parent);
- void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const override;
+ void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const U_OVERRIDE;
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const override;
+ UErrorCode &status) const U_OVERRIDE;
- int32_t getPrefixLength(UErrorCode &status) const override;
+ int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE;
- int32_t getCodePointCount(UErrorCode &status) const override;
+ int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE;
- bool isStrong() const override;
+ bool isStrong() const U_OVERRIDE;
/**
* Returns the string that substitutes a given symbol type in a pattern.
*/
- UnicodeString getSymbol(AffixPatternType type) const override;
+ UnicodeString getSymbol(AffixPatternType type) const U_OVERRIDE;
- int32_t length() const override;
+ int32_t length() const U_OVERRIDE;
- char16_t charAt(int32_t index) const override;
+ char16_t charAt(int32_t index) const U_OVERRIDE;
// Use default implementation of codePointAt
- UnicodeString toUnicodeString() const override;
+ UnicodeString toUnicodeString() const U_OVERRIDE;
private:
// Modifier details
ParsedPatternInfo() : state(this->pattern), currentSubpattern(nullptr) {}
- ~ParsedPatternInfo() override = default;
+ ~ParsedPatternInfo() U_OVERRIDE = default;
static int32_t getLengthFromEndpoints(const Endpoints &endpoints);
- char16_t charAt(int32_t flags, int32_t index) const override;
+ char16_t charAt(int32_t flags, int32_t index) const U_OVERRIDE;
- int32_t length(int32_t flags) const override;
+ int32_t length(int32_t flags) const U_OVERRIDE;
UnicodeString getString(int32_t flags) const;
- bool positiveHasPlusSign() const override;
+ bool positiveHasPlusSign() const U_OVERRIDE;
- bool hasNegativeSubpattern() const override;
+ bool hasNegativeSubpattern() const U_OVERRIDE;
- bool negativeHasMinusSign() const override;
+ bool negativeHasMinusSign() const U_OVERRIDE;
- bool hasCurrencySign() const override;
+ bool hasCurrencySign() const U_OVERRIDE;
- bool containsSymbolType(AffixPatternType type, UErrorCode &status) const override;
+ bool containsSymbolType(AffixPatternType type, UErrorCode &status) const U_OVERRIDE;
private:
struct ParserState {
void set(int32_t exponent, const ScientificHandler *handler);
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
- UErrorCode &status) const override;
+ UErrorCode &status) const U_OVERRIDE;
- int32_t getPrefixLength(UErrorCode &status) const override;
+ int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE;
- int32_t getCodePointCount(UErrorCode &status) const override;
+ int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE;
- bool isStrong() const override;
+ bool isStrong() const U_OVERRIDE;
private:
int32_t fExponent;
const MicroPropsGenerator *parent);
void
- processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const override;
+ processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const U_OVERRIDE;
- int32_t getMultiplier(int32_t magnitude) const override;
+ int32_t getMultiplier(int32_t magnitude) const U_OVERRIDE;
private:
const Notation::ScientificSettings& fSettings;
#include "unicode/numberformatter.h"
#include "unicode/utf16.h"
#include "uassert.h"
+#include "unicode/platform.h"
U_NAMESPACE_BEGIN
namespace number {
fStr = other;
}
- ~UnicodeStringCharSequence() override = default;
+ ~UnicodeStringCharSequence() U_OVERRIDE = default;
- int32_t length() const override {
+ int32_t length() const U_OVERRIDE {
return fStr.length();
}
- char16_t charAt(int32_t index) const override {
+ char16_t charAt(int32_t index) const U_OVERRIDE {
return fStr.charAt(index);
}
- UChar32 codePointAt(int32_t index) const override {
+ UChar32 codePointAt(int32_t index) const U_OVERRIDE {
return fStr.char32At(index);
}
- UnicodeString toUnicodeString() const override {
+ UnicodeString toUnicodeString() const U_OVERRIDE {
// Allocate a UnicodeString of the correct length
UnicodeString output(length(), 0, -1);
for (int32_t i = 0; i < length(); i++) {
MicroProps &operator=(const MicroProps &other) = default;
- void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const override {
+ void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const U_OVERRIDE {
(void)status;
if (this == µs) {
// Unsafe path: no need to perform a copy.