+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 2001-2003, International Business Machines Corporation and
+ * Copyright (c) 2001-2010, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/************************************************************************
}
/**
- * ICU "poor man's RTTI", returns a UClassID for the actual class.
+ * ICU "poor man's RTTI", returns a UClassID for this class.
*
* @draft ICU 2.2
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
/**
- * ICU "poor man's RTTI", returns a UClassID for this class.
+ * ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @draft ICU 2.2
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
protected:
virtual int32_t getLength() const {
return chars.char32At(offset);
}
- virtual void handleReplaceBetween(int32_t start, int32_t limit, const UnicodeString& text) {
- UnicodeString s;
- this->extractBetween(start, limit, s);
- if (s == text) return; // NO ACTION!
- this->chars.replaceBetween(start, limit, text);
- fixStyles(start, limit, text.length());
- }
-
-
void fixStyles(int32_t start, int32_t limit, int32_t newLen) {
UChar newStyle = NO_STYLE;
if (start != limit && styles.charAt(start) != NO_STYLE) {
styles.replaceBetween(start, limit, s);
}
+ virtual void handleReplaceBetween(int32_t start, int32_t limit, const UnicodeString& text) {
+ UnicodeString s;
+ this->extractBetween(start, limit, s);
+ if (s == text) return; // NO ACTION!
+ this->chars.replaceBetween(start, limit, text);
+ fixStyles(start, limit, text.length());
+ }
+
+
virtual void copy(int32_t start, int32_t limit, int32_t dest) {
chars.copy(start, limit, dest);
styles.copy(start, limit, dest);
/* do nothing */
}
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
private:
static const char fgClassID;
t = Transliterator::createInstance(transliteratorName, UTRANS_FORWARD, status);
}
if (U_FAILURE(status)) {
- log("FAIL: failed to create the ");
- log(transliteratorName);
- errln(" transliterator.");
+ dataerrln("FAIL: failed to create the " + transliteratorName + " transliterator");
delete tr;
return;
}