private:
virtual void
normalize(const UChar *src, const UChar *limit,
- ReorderingBuffer &buffer, UErrorCode &errorCode) const override {
+ ReorderingBuffer &buffer, UErrorCode &errorCode) const U_OVERRIDE {
impl.compose(src, limit, onlyContiguous, TRUE, buffer, errorCode);
}
using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
void
normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
- Edits *edits, UErrorCode &errorCode) const override {
+ Edits *edits, UErrorCode &errorCode) const U_OVERRIDE {
if (U_FAILURE(errorCode)) {
return;
}
virtual void
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
UnicodeString &safeMiddle,
- ReorderingBuffer &buffer, UErrorCode &errorCode) const override {
+ ReorderingBuffer &buffer, UErrorCode &errorCode) const U_OVERRIDE {
impl.composeAndAppend(src, limit, doNormalize, onlyContiguous, safeMiddle, buffer, errorCode);
}
virtual UBool
- isNormalized(const UnicodeString &s, UErrorCode &errorCode) const override {
+ isNormalized(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE {
if(U_FAILURE(errorCode)) {
return FALSE;
}
return impl.compose(sArray, sArray+s.length(), onlyContiguous, FALSE, buffer, errorCode);
}
virtual UBool
- isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) const override {
+ isNormalizedUTF8(StringPiece sp, UErrorCode &errorCode) const U_OVERRIDE {
if(U_FAILURE(errorCode)) {
return FALSE;
}
return impl.composeUTF8(0, onlyContiguous, s, s + sp.length(), nullptr, nullptr, errorCode);
}
virtual UNormalizationCheckResult
- quickCheck(const UnicodeString &s, UErrorCode &errorCode) const override {
+ quickCheck(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE {
if(U_FAILURE(errorCode)) {
return UNORM_MAYBE;
}
return qcResult;
}
virtual const UChar *
- spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &) const override {
+ spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &) const U_OVERRIDE {
return impl.composeQuickCheck(src, limit, onlyContiguous, NULL);
}
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
- virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const override {
+ virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const U_OVERRIDE {
return impl.getCompQuickCheck(impl.getNorm16(c));
}
- virtual UBool hasBoundaryBefore(UChar32 c) const override {
+ virtual UBool hasBoundaryBefore(UChar32 c) const U_OVERRIDE {
return impl.hasCompBoundaryBefore(c);
}
- virtual UBool hasBoundaryAfter(UChar32 c) const override {
+ virtual UBool hasBoundaryAfter(UChar32 c) const U_OVERRIDE {
return impl.hasCompBoundaryAfter(c, onlyContiguous);
}
- virtual UBool isInert(UChar32 c) const override {
+ virtual UBool isInert(UChar32 c) const U_OVERRIDE {
return impl.isCompInert(c, onlyContiguous);
}
virtual UnicodeString &
normalize(const UnicodeString &src,
UnicodeString &dest,
- UErrorCode &errorCode) const override {
+ UErrorCode &errorCode) const U_OVERRIDE {
if(U_SUCCESS(errorCode)) {
if(&dest!=&src) {
dest=src;
}
virtual void
normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
- Edits *edits, UErrorCode &errorCode) const override {
+ Edits *edits, UErrorCode &errorCode) const U_OVERRIDE {
if(U_SUCCESS(errorCode)) {
if (edits != nullptr) {
if ((options & U_EDITS_NO_RESET) == 0) {
virtual UnicodeString &
normalizeSecondAndAppend(UnicodeString &first,
const UnicodeString &second,
- UErrorCode &errorCode) const override {
+ UErrorCode &errorCode) const U_OVERRIDE {
if(U_SUCCESS(errorCode)) {
if(&first!=&second) {
first.append(second);
virtual UnicodeString &
append(UnicodeString &first,
const UnicodeString &second,
- UErrorCode &errorCode) const override {
+ UErrorCode &errorCode) const U_OVERRIDE {
if(U_SUCCESS(errorCode)) {
if(&first!=&second) {
first.append(second);
return first;
}
virtual UBool
- getDecomposition(UChar32, UnicodeString &) const override {
+ getDecomposition(UChar32, UnicodeString &) const U_OVERRIDE {
return FALSE;
}
- // No need to override the default getRawDecomposition().
+ // No need to U_OVERRIDE the default getRawDecomposition().
virtual UBool
- isNormalized(const UnicodeString &, UErrorCode &errorCode) const override {
+ isNormalized(const UnicodeString &, UErrorCode &errorCode) const U_OVERRIDE {
return U_SUCCESS(errorCode);
}
virtual UBool
- isNormalizedUTF8(StringPiece, UErrorCode &errorCode) const override {
+ isNormalizedUTF8(StringPiece, UErrorCode &errorCode) const U_OVERRIDE {
return U_SUCCESS(errorCode);
}
virtual UNormalizationCheckResult
- quickCheck(const UnicodeString &, UErrorCode &) const override {
+ quickCheck(const UnicodeString &, UErrorCode &) const U_OVERRIDE {
return UNORM_YES;
}
virtual int32_t
- spanQuickCheckYes(const UnicodeString &s, UErrorCode &) const override {
+ spanQuickCheckYes(const UnicodeString &s, UErrorCode &) const U_OVERRIDE {
return s.length();
}
- virtual UBool hasBoundaryBefore(UChar32) const override { return TRUE; }
- virtual UBool hasBoundaryAfter(UChar32) const override { return TRUE; }
- virtual UBool isInert(UChar32) const override { return TRUE; }
+ virtual UBool hasBoundaryBefore(UChar32) const U_OVERRIDE { return TRUE; }
+ virtual UBool hasBoundaryAfter(UChar32) const U_OVERRIDE { return TRUE; }
+ virtual UBool isInert(UChar32) const U_OVERRIDE { return TRUE; }
};
NoopNormalizer2::~NoopNormalizer2() {}
virtual UnicodeString &
normalize(const UnicodeString &src,
UnicodeString &dest,
- UErrorCode &errorCode) const override;
+ UErrorCode &errorCode) const U_OVERRIDE;
/**
* Normalizes a UTF-8 string and optionally records how source substrings
*/
virtual void
normalizeUTF8(uint32_t options, StringPiece src, ByteSink &sink,
- Edits *edits, UErrorCode &errorCode) const override;
+ Edits *edits, UErrorCode &errorCode) const U_OVERRIDE;
/**
* Appends the normalized form of the second string to the first string
virtual UnicodeString &
normalizeSecondAndAppend(UnicodeString &first,
const UnicodeString &second,
- UErrorCode &errorCode) const override;
+ UErrorCode &errorCode) const U_OVERRIDE;
/**
* Appends the second string to the first string
* (merging them at the boundary) and returns the first string.
virtual UnicodeString &
append(UnicodeString &first,
const UnicodeString &second,
- UErrorCode &errorCode) const override;
+ UErrorCode &errorCode) const U_OVERRIDE;
/**
* Gets the decomposition mapping of c.
* @stable ICU 4.6
*/
virtual UBool
- getDecomposition(UChar32 c, UnicodeString &decomposition) const override;
+ getDecomposition(UChar32 c, UnicodeString &decomposition) const U_OVERRIDE;
/**
* Gets the raw decomposition mapping of c.
* @stable ICU 49
*/
virtual UBool
- getRawDecomposition(UChar32 c, UnicodeString &decomposition) const override;
+ getRawDecomposition(UChar32 c, UnicodeString &decomposition) const U_OVERRIDE;
/**
* Performs pairwise composition of a & b and returns the composite if there is one.
* @stable ICU 49
*/
virtual UChar32
- composePair(UChar32 a, UChar32 b) const override;
+ composePair(UChar32 a, UChar32 b) const U_OVERRIDE;
/**
* Gets the combining class of c.
* @stable ICU 49
*/
virtual uint8_t
- getCombiningClass(UChar32 c) const override;
+ getCombiningClass(UChar32 c) const U_OVERRIDE;
/**
* Tests if the string is normalized.
* @stable ICU 4.4
*/
virtual UBool
- isNormalized(const UnicodeString &s, UErrorCode &errorCode) const override;
+ isNormalized(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE;
/**
* Tests if the UTF-8 string is normalized.
* Internally, in cases where the quickCheck() method would return "maybe"
* @draft ICU 60
*/
virtual UBool
- isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const override;
+ isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const U_OVERRIDE;
/**
* Tests if the string is normalized.
* For details see the Normalizer2 base class documentation.
* @stable ICU 4.4
*/
virtual UNormalizationCheckResult
- quickCheck(const UnicodeString &s, UErrorCode &errorCode) const override;
+ quickCheck(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE;
/**
* Returns the end of the normalized substring of the input string.
* For details see the Normalizer2 base class documentation.
* @stable ICU 4.4
*/
virtual int32_t
- spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const override;
+ spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const U_OVERRIDE;
/**
* Tests if the character always has a normalization boundary before it,
* @return TRUE if c has a normalization boundary before it
* @stable ICU 4.4
*/
- virtual UBool hasBoundaryBefore(UChar32 c) const override;
+ virtual UBool hasBoundaryBefore(UChar32 c) const U_OVERRIDE;
/**
* Tests if the character always has a normalization boundary after it,
* @return TRUE if c has a normalization boundary after it
* @stable ICU 4.4
*/
- virtual UBool hasBoundaryAfter(UChar32 c) const override;
+ virtual UBool hasBoundaryAfter(UChar32 c) const U_OVERRIDE;
/**
* Tests if the character is normalization-inert.
* @return TRUE if c is normalization-inert
* @stable ICU 4.4
*/
- virtual UBool isInert(UChar32 c) const override;
+ virtual UBool isInert(UChar32 c) const U_OVERRIDE;
private:
UnicodeString &
normalize(const UnicodeString &src,
class WholeStringBreakIterator : public BreakIterator {
public:
WholeStringBreakIterator() : BreakIterator(), length(0) {}
- ~WholeStringBreakIterator() override;
- UBool operator==(const BreakIterator&) const override;
- BreakIterator *clone() const override;
+ ~WholeStringBreakIterator() U_OVERRIDE;
+ UBool operator==(const BreakIterator&) const U_OVERRIDE;
+ BreakIterator *clone() const U_OVERRIDE;
static UClassID U_EXPORT2 getStaticClassID();
- UClassID getDynamicClassID() const override;
- CharacterIterator &getText() const override;
- UText *getUText(UText *fillIn, UErrorCode &errorCode) const override;
- void setText(const UnicodeString &text) override;
- void setText(UText *text, UErrorCode &errorCode) override;
- void adoptText(CharacterIterator* it) override;
- int32_t first() override;
- int32_t last() override;
- int32_t previous() override;
- int32_t next() override;
- int32_t current() const override;
- int32_t following(int32_t offset) override;
- int32_t preceding(int32_t offset) override;
- UBool isBoundary(int32_t offset) override;
- int32_t next(int32_t n) override;
+ UClassID getDynamicClassID() const U_OVERRIDE;
+ CharacterIterator &getText() const U_OVERRIDE;
+ UText *getUText(UText *fillIn, UErrorCode &errorCode) const U_OVERRIDE;
+ void setText(const UnicodeString &text) U_OVERRIDE;
+ void setText(UText *text, UErrorCode &errorCode) U_OVERRIDE;
+ void adoptText(CharacterIterator* it) U_OVERRIDE;
+ int32_t first() U_OVERRIDE;
+ int32_t last() U_OVERRIDE;
+ int32_t previous() U_OVERRIDE;
+ int32_t next() U_OVERRIDE;
+ int32_t current() const U_OVERRIDE;
+ int32_t following(int32_t offset) U_OVERRIDE;
+ int32_t preceding(int32_t offset) U_OVERRIDE;
+ UBool isBoundary(int32_t offset) U_OVERRIDE;
+ int32_t next(int32_t n) U_OVERRIDE;
BreakIterator *createBufferClone(void *stackBuffer, int32_t &BufferSize,
- UErrorCode &errorCode) override;
- BreakIterator &refreshInputText(UText *input, UErrorCode &errorCode) override;
+ UErrorCode &errorCode) U_OVERRIDE;
+ BreakIterator &refreshInputText(UText *input, UErrorCode &errorCode) U_OVERRIDE;
private:
int32_t length;
public:
ExtraData(Norms &n, UBool fast);
- void rangeHandler(UChar32 start, UChar32 end, Norm &norm) override;
+ void rangeHandler(UChar32 start, UChar32 end, Norm &norm) U_OVERRIDE;
UnicodeString maybeYesCompositions;
UnicodeString yesYesCompositions;
std::string lineString;
uint32_t startCP, endCP;
while(std::getline(f, lineString)) {
+#if (U_CPLUSPLUS_VERSION >= 11)
char *line = &lineString.front();
+#else
+ char *line = &lineString.at(0);
+#endif
char *comment=(char *)strchr(line, '#');
if(comment!=NULL) {
*comment=0;
public:
CompositionBuilder(Norms &n) : Norms::Enumerator(n) {}
/** Adds a composition mapping for the first character in a round-trip mapping. */
- void rangeHandler(UChar32 start, UChar32 end, Norm &norm) override;
+ void rangeHandler(UChar32 start, UChar32 end, Norm &norm) U_OVERRIDE;
};
class Decomposer : public Norms::Enumerator {
public:
Decomposer(Norms &n) : Norms::Enumerator(n), didDecompose(FALSE) {}
/** Decomposes each character of the current mapping. Sets didDecompose if any. */
- void rangeHandler(UChar32 start, UChar32 end, Norm &norm) override;
+ void rangeHandler(UChar32 start, UChar32 end, Norm &norm) U_OVERRIDE;
UBool didDecompose;
};