diff --git a/icu4c/source/layout/ArabicLayoutEngine.cpp b/icu4c/source/layout/ArabicLayoutEngine.cpp
index 7ea5a56265..265d884a6e 100644
--- a/icu4c/source/layout/ArabicLayoutEngine.cpp
+++ b/icu4c/source/layout/ArabicLayoutEngine.cpp
@@ -31,7 +31,7 @@ le_bool CharSubstitutionFilter::accept(LEGlyphID glyph) const
return fFontInstance->canDisplay((LEUnicode) glyph);
}
-const char ArabicOpenTypeLayoutEngine::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ArabicOpenTypeLayoutEngine)
ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
const GlyphSubstitutionTableHeader *gsubTable)
diff --git a/icu4c/source/layout/ArabicLayoutEngine.h b/icu4c/source/layout/ArabicLayoutEngine.h
index bbe6569b6c..3a1155670c 100644
--- a/icu4c/source/layout/ArabicLayoutEngine.h
+++ b/icu4c/source/layout/ArabicLayoutEngine.h
@@ -78,14 +78,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
protected:
@@ -134,13 +134,6 @@ protected:
// static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success);
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
/**
diff --git a/icu4c/source/layout/ContextualGlyphSubstProc.cpp b/icu4c/source/layout/ContextualGlyphSubstProc.cpp
index a812d974f3..94c4a60b07 100644
--- a/icu4c/source/layout/ContextualGlyphSubstProc.cpp
+++ b/icu4c/source/layout/ContextualGlyphSubstProc.cpp
@@ -16,7 +16,7 @@
U_NAMESPACE_BEGIN
-const char ContextualGlyphSubstitutionProcessor::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphSubstitutionProcessor)
ContextualGlyphSubstitutionProcessor::ContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
: StateTableProcessor(morphSubtableHeader)
diff --git a/icu4c/source/layout/ContextualGlyphSubstProc.h b/icu4c/source/layout/ContextualGlyphSubstProc.h
index 769a733b88..b0c5a6b38c 100644
--- a/icu4c/source/layout/ContextualGlyphSubstProc.h
+++ b/icu4c/source/layout/ContextualGlyphSubstProc.h
@@ -39,14 +39,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
private:
ContextualGlyphSubstitutionProcessor();
@@ -59,13 +59,6 @@ protected:
const ContextualGlyphSubstitutionHeader *contextualGlyphSubstitutionHeader;
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/ContextualSubstSubtables.cpp b/icu4c/source/layout/ContextualSubstSubtables.cpp
index 4d63c79c8b..a1541b9fdd 100644
--- a/icu4c/source/layout/ContextualSubstSubtables.cpp
+++ b/icu4c/source/layout/ContextualSubstSubtables.cpp
@@ -325,7 +325,7 @@ le_uint32 ChainingContextualSubstitutionSubtable::process(const LookupProcessor
}
}
-const LETag emptyTag = 0;
+static const LETag emptyTag = 0;
le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator,
const LEFontInstance *fontInstance) const
diff --git a/icu4c/source/layout/GXLayoutEngine.cpp b/icu4c/source/layout/GXLayoutEngine.cpp
index 5d3cbdfca4..fbd366775e 100644
--- a/icu4c/source/layout/GXLayoutEngine.cpp
+++ b/icu4c/source/layout/GXLayoutEngine.cpp
@@ -14,7 +14,7 @@
U_NAMESPACE_BEGIN
-const char GXLayoutEngine::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(GXLayoutEngine)
GXLayoutEngine::GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader *morphTable)
: LayoutEngine(fontInstance, scriptCode, languageCode), fMorphTable(morphTable)
diff --git a/icu4c/source/layout/GXLayoutEngine.h b/icu4c/source/layout/GXLayoutEngine.h
index 153ab37a3f..faa511ab1a 100644
--- a/icu4c/source/layout/GXLayoutEngine.h
+++ b/icu4c/source/layout/GXLayoutEngine.h
@@ -62,14 +62,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
protected:
@@ -118,13 +118,6 @@ protected:
virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse,
LEGlyphStorage &glyphStorage, LEErrorCode &success);
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/HanLayoutEngine.cpp b/icu4c/source/layout/HanLayoutEngine.cpp
index c93bea6b2a..d319b1c510 100644
--- a/icu4c/source/layout/HanLayoutEngine.cpp
+++ b/icu4c/source/layout/HanLayoutEngine.cpp
@@ -16,7 +16,7 @@
U_NAMESPACE_BEGIN
-const char HanOpenTypeLayoutEngine::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(HanOpenTypeLayoutEngine)
HanOpenTypeLayoutEngine::HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
const GlyphSubstitutionTableHeader *gsubTable)
@@ -30,13 +30,13 @@ HanOpenTypeLayoutEngine::~HanOpenTypeLayoutEngine()
// nothing to do
}
-const LETag emptyTag = 0x00000000;
+static const LETag emptyTag = 0x00000000;
-const LETag loclFeatureTag = LE_LOCL_FEATURE_TAG;
-const LETag smplFeatureTag = LE_SMPL_FEATURE_TAG;
-const LETag tradFeatureTag = LE_TRAD_FEATURE_TAG;
+static const LETag loclFeatureTag = LE_LOCL_FEATURE_TAG;
+static const LETag smplFeatureTag = LE_SMPL_FEATURE_TAG;
+static const LETag tradFeatureTag = LE_TRAD_FEATURE_TAG;
-const LETag features[] = {loclFeatureTag, emptyTag};
+static const LETag features[] = {loclFeatureTag, emptyTag};
le_int32 HanOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool /*rightToLeft*/,
LEUnicode *&/*outChars*/, LEGlyphStorage &glyphStorage, LEErrorCode &success)
diff --git a/icu4c/source/layout/HanLayoutEngine.h b/icu4c/source/layout/HanLayoutEngine.h
index 525920bdd1..eaeb5635ee 100644
--- a/icu4c/source/layout/HanLayoutEngine.h
+++ b/icu4c/source/layout/HanLayoutEngine.h
@@ -62,14 +62,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
protected:
@@ -98,14 +98,6 @@ protected:
virtual le_int32 characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success);
-
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/IndicLayoutEngine.cpp b/icu4c/source/layout/IndicLayoutEngine.cpp
index 15d3104dbe..3b776a0d5e 100644
--- a/icu4c/source/layout/IndicLayoutEngine.cpp
+++ b/icu4c/source/layout/IndicLayoutEngine.cpp
@@ -22,7 +22,7 @@
U_NAMESPACE_BEGIN
-const char IndicOpenTypeLayoutEngine::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicOpenTypeLayoutEngine)
IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
const GlyphSubstitutionTableHeader *gsubTable)
diff --git a/icu4c/source/layout/IndicLayoutEngine.h b/icu4c/source/layout/IndicLayoutEngine.h
index 1f7eb5f0d8..e5abc0213a 100644
--- a/icu4c/source/layout/IndicLayoutEngine.h
+++ b/icu4c/source/layout/IndicLayoutEngine.h
@@ -84,14 +84,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
protected:
@@ -153,12 +153,6 @@ protected:
private:
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
-
MPreFixups *fMPreFixups;
};
diff --git a/icu4c/source/layout/IndicRearrangementProcessor.cpp b/icu4c/source/layout/IndicRearrangementProcessor.cpp
index a00803de00..9220245070 100644
--- a/icu4c/source/layout/IndicRearrangementProcessor.cpp
+++ b/icu4c/source/layout/IndicRearrangementProcessor.cpp
@@ -16,7 +16,7 @@
U_NAMESPACE_BEGIN
-const char IndicRearrangementProcessor::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicRearrangementProcessor)
IndicRearrangementProcessor::IndicRearrangementProcessor(const MorphSubtableHeader *morphSubtableHeader)
: StateTableProcessor(morphSubtableHeader)
diff --git a/icu4c/source/layout/IndicRearrangementProcessor.h b/icu4c/source/layout/IndicRearrangementProcessor.h
index 5bbecc7feb..0cb46ddfcc 100644
--- a/icu4c/source/layout/IndicRearrangementProcessor.h
+++ b/icu4c/source/layout/IndicRearrangementProcessor.h
@@ -41,14 +41,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
protected:
le_int32 firstGlyph;
@@ -57,13 +57,6 @@ protected:
const IndicRearrangementStateEntry *entryTable;
const IndicRearrangementSubtableHeader *indicRearrangementSubtableHeader;
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/LEFontInstance.cpp b/icu4c/source/layout/LEFontInstance.cpp
index 9b0c49c9f1..0bbb627946 100644
--- a/icu4c/source/layout/LEFontInstance.cpp
+++ b/icu4c/source/layout/LEFontInstance.cpp
@@ -18,7 +18,7 @@
U_NAMESPACE_BEGIN
-const char LEFontInstance::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LEFontInstance)
const LEFontInstance *LEFontInstance::getSubFont(const LEUnicode chars[], le_int32 *offset, le_int32 limit,
le_int32 script, LEErrorCode &success) const
diff --git a/icu4c/source/layout/LEFontInstance.h b/icu4c/source/layout/LEFontInstance.h
index ee16f943de..2a6714eb46 100644
--- a/icu4c/source/layout/LEFontInstance.h
+++ b/icu4c/source/layout/LEFontInstance.h
@@ -478,22 +478,15 @@ public:
*
* @draft ICU 2.6
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @draft ICU 2.6
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
inline le_bool LEFontInstance::canDisplay(LEUnicode32 ch) const
diff --git a/icu4c/source/layout/LEGlyphStorage.cpp b/icu4c/source/layout/LEGlyphStorage.cpp
index 0cad1050f1..36da0f7e4f 100644
--- a/icu4c/source/layout/LEGlyphStorage.cpp
+++ b/icu4c/source/layout/LEGlyphStorage.cpp
@@ -11,7 +11,7 @@
U_NAMESPACE_BEGIN
-const char LEGlyphStorage::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LEGlyphStorage)
LEGlyphStorage::LEGlyphStorage()
: fGlyphCount(0), fGlyphs(NULL), fCharIndices(NULL), fPositions(NULL),
diff --git a/icu4c/source/layout/LEGlyphStorage.h b/icu4c/source/layout/LEGlyphStorage.h
index a3de132143..90051b9fda 100644
--- a/icu4c/source/layout/LEGlyphStorage.h
+++ b/icu4c/source/layout/LEGlyphStorage.h
@@ -86,12 +86,6 @@ private:
*/
le_int32 fDestIndex;
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
-
protected:
/**
* This implements LEInsertionCallback
. The LEInsertionList
@@ -484,14 +478,14 @@ public:
*
* @draft ICU 3.0
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @draft ICU 3.0
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
};
inline LEGlyphID &LEGlyphStorage::operator[](le_int32 glyphIndex) const
diff --git a/icu4c/source/layout/LEInsertionList.cpp b/icu4c/source/layout/LEInsertionList.cpp
index d80bc807aa..b92cc47493 100644
--- a/icu4c/source/layout/LEInsertionList.cpp
+++ b/icu4c/source/layout/LEInsertionList.cpp
@@ -20,7 +20,7 @@ struct InsertionRecord
LEGlyphID glyphs[ANY_NUMBER];
};
-const char LEInsertionList::fgClassID = 0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LEInsertionList)
LEInsertionList::LEInsertionList(le_bool rightToLeft)
: head(NULL), tail(NULL), growAmount(0), append(rightToLeft)
diff --git a/icu4c/source/layout/LEInsertionList.h b/icu4c/source/layout/LEInsertionList.h
index 47f4481b28..2d67c2a5df 100644
--- a/icu4c/source/layout/LEInsertionList.h
+++ b/icu4c/source/layout/LEInsertionList.h
@@ -121,23 +121,17 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
private:
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
-
/**
* The head of the insertion list.
*
diff --git a/icu4c/source/layout/LayoutEngine.cpp b/icu4c/source/layout/LayoutEngine.cpp
index 5765fd84c5..9d7b4eedfc 100644
--- a/icu4c/source/layout/LayoutEngine.cpp
+++ b/icu4c/source/layout/LayoutEngine.cpp
@@ -105,13 +105,13 @@ CharSubstitutionFilter::~CharSubstitutionFilter()
}
-const char LayoutEngine::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LayoutEngine)
-const LETag emptyTag = 0x00000000;
+static const LETag emptyTag = 0x00000000;
-const LETag ccmpFeatureTag = LE_CCMP_FEATURE_TAG;
+static const LETag ccmpFeatureTag = LE_CCMP_FEATURE_TAG;
-const LETag canonFeatures[] = {ccmpFeatureTag, emptyTag};
+static const LETag canonFeatures[] = {ccmpFeatureTag, emptyTag};
LayoutEngine::LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode)
: fGlyphStorage(NULL), fFontInstance(fontInstance), fScriptCode(scriptCode), fLanguageCode(languageCode)
diff --git a/icu4c/source/layout/LayoutEngine.h b/icu4c/source/layout/LayoutEngine.h
index 9538316373..fb20000fbf 100644
--- a/icu4c/source/layout/LayoutEngine.h
+++ b/icu4c/source/layout/LayoutEngine.h
@@ -443,22 +443,15 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/LigatureSubstProc.cpp b/icu4c/source/layout/LigatureSubstProc.cpp
index abd0984a6c..8df9a7861f 100644
--- a/icu4c/source/layout/LigatureSubstProc.cpp
+++ b/icu4c/source/layout/LigatureSubstProc.cpp
@@ -20,7 +20,7 @@ U_NAMESPACE_BEGIN
#define SignBit(m) ((ExtendedComplement(m) >> 1) & (le_int32)(m))
#define SignExtend(v,m) (((v) & SignBit(m))? ((v) | ExtendedComplement(m)): (v))
-const char LigatureSubstitutionProcessor::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LigatureSubstitutionProcessor)
LigatureSubstitutionProcessor::LigatureSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader)
: StateTableProcessor(morphSubtableHeader)
diff --git a/icu4c/source/layout/LigatureSubstProc.h b/icu4c/source/layout/LigatureSubstProc.h
index 163c287dc4..ef5b1edb5f 100644
--- a/icu4c/source/layout/LigatureSubstProc.h
+++ b/icu4c/source/layout/LigatureSubstProc.h
@@ -41,14 +41,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
private:
LigatureSubstitutionProcessor();
@@ -65,13 +65,6 @@ protected:
const LigatureSubstitutionHeader *ligatureSubstitutionHeader;
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/LookupProcessor.cpp b/icu4c/source/layout/LookupProcessor.cpp
index 5fd662bc53..2fc8844875 100644
--- a/icu4c/source/layout/LookupProcessor.cpp
+++ b/icu4c/source/layout/LookupProcessor.cpp
@@ -22,7 +22,7 @@ U_NAMESPACE_BEGIN
const LETag LookupProcessor::notSelected = 0x00000000;
const LETag LookupProcessor::defaultFeature = 0xFFFFFFFF;
-const LETag emptyTag = 0x00000000;
+static const LETag emptyTag = 0x00000000;
le_uint32 LookupProcessor::applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator,
diff --git a/icu4c/source/layout/OpenTypeLayoutEngine.cpp b/icu4c/source/layout/OpenTypeLayoutEngine.cpp
index ebf996fb31..3905e1f7c7 100644
--- a/icu4c/source/layout/OpenTypeLayoutEngine.cpp
+++ b/icu4c/source/layout/OpenTypeLayoutEngine.cpp
@@ -23,18 +23,18 @@
U_NAMESPACE_BEGIN
-const char OpenTypeLayoutEngine::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(OpenTypeLayoutEngine)
-const LETag emptyTag = 0x00000000;
+static const LETag emptyTag = 0x00000000;
-const LETag ccmpFeatureTag = LE_CCMP_FEATURE_TAG;
-const LETag ligaFeatureTag = LE_LIGA_FEATURE_TAG;
-const LETag cligFeatureTag = LE_CLIG_FEATURE_TAG;
-const LETag kernFeatureTag = LE_KERN_FEATURE_TAG;
-const LETag markFeatureTag = LE_MARK_FEATURE_TAG;
-const LETag mkmkFeatureTag = LE_MKMK_FEATURE_TAG;
+static const LETag ccmpFeatureTag = LE_CCMP_FEATURE_TAG;
+static const LETag ligaFeatureTag = LE_LIGA_FEATURE_TAG;
+static const LETag cligFeatureTag = LE_CLIG_FEATURE_TAG;
+static const LETag kernFeatureTag = LE_KERN_FEATURE_TAG;
+static const LETag markFeatureTag = LE_MARK_FEATURE_TAG;
+static const LETag mkmkFeatureTag = LE_MKMK_FEATURE_TAG;
-const LETag defaultFeatures[] = {ccmpFeatureTag, ligaFeatureTag, cligFeatureTag, kernFeatureTag, markFeatureTag, mkmkFeatureTag, emptyTag};
+static const LETag defaultFeatures[] = {ccmpFeatureTag, ligaFeatureTag, cligFeatureTag, kernFeatureTag, markFeatureTag, mkmkFeatureTag, emptyTag};
OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
diff --git a/icu4c/source/layout/OpenTypeLayoutEngine.h b/icu4c/source/layout/OpenTypeLayoutEngine.h
index f874f53174..61cf1317aa 100644
--- a/icu4c/source/layout/OpenTypeLayoutEngine.h
+++ b/icu4c/source/layout/OpenTypeLayoutEngine.h
@@ -115,14 +115,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
private:
@@ -142,12 +142,6 @@ private:
*/
static const LETag languageTags[];
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
-
protected:
/**
* A list of "default" features. The default characterProcessing method
diff --git a/icu4c/source/layout/SegmentArrayProcessor.cpp b/icu4c/source/layout/SegmentArrayProcessor.cpp
index 3bf2f7ee31..b915cb9b92 100644
--- a/icu4c/source/layout/SegmentArrayProcessor.cpp
+++ b/icu4c/source/layout/SegmentArrayProcessor.cpp
@@ -15,7 +15,7 @@
U_NAMESPACE_BEGIN
-const char SegmentArrayProcessor::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SegmentArrayProcessor)
SegmentArrayProcessor::SegmentArrayProcessor()
{
diff --git a/icu4c/source/layout/SegmentArrayProcessor.h b/icu4c/source/layout/SegmentArrayProcessor.h
index 61d2fc1936..7e2028c98b 100644
--- a/icu4c/source/layout/SegmentArrayProcessor.h
+++ b/icu4c/source/layout/SegmentArrayProcessor.h
@@ -36,14 +36,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
private:
SegmentArrayProcessor();
@@ -51,13 +51,6 @@ private:
protected:
const SegmentArrayLookupTable *segmentArrayLookupTable;
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/SegmentSingleProcessor.cpp b/icu4c/source/layout/SegmentSingleProcessor.cpp
index 3a8404b6b3..75e33eb01d 100644
--- a/icu4c/source/layout/SegmentSingleProcessor.cpp
+++ b/icu4c/source/layout/SegmentSingleProcessor.cpp
@@ -15,7 +15,7 @@
U_NAMESPACE_BEGIN
-const char SegmentSingleProcessor::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SegmentSingleProcessor)
SegmentSingleProcessor::SegmentSingleProcessor()
{
diff --git a/icu4c/source/layout/SegmentSingleProcessor.h b/icu4c/source/layout/SegmentSingleProcessor.h
index 12eda908e5..64b2b72f16 100644
--- a/icu4c/source/layout/SegmentSingleProcessor.h
+++ b/icu4c/source/layout/SegmentSingleProcessor.h
@@ -36,14 +36,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
private:
SegmentSingleProcessor();
@@ -51,13 +51,6 @@ private:
protected:
const SegmentSingleLookupTable *segmentSingleLookupTable;
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/SimpleArrayProcessor.cpp b/icu4c/source/layout/SimpleArrayProcessor.cpp
index 8eeb354034..d677f545f6 100644
--- a/icu4c/source/layout/SimpleArrayProcessor.cpp
+++ b/icu4c/source/layout/SimpleArrayProcessor.cpp
@@ -15,7 +15,7 @@
U_NAMESPACE_BEGIN
-const char SimpleArrayProcessor::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SimpleArrayProcessor)
SimpleArrayProcessor::SimpleArrayProcessor()
{
diff --git a/icu4c/source/layout/SimpleArrayProcessor.h b/icu4c/source/layout/SimpleArrayProcessor.h
index d0c9ed9177..afee79c497 100644
--- a/icu4c/source/layout/SimpleArrayProcessor.h
+++ b/icu4c/source/layout/SimpleArrayProcessor.h
@@ -36,14 +36,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
private:
SimpleArrayProcessor();
@@ -51,13 +51,6 @@ private:
protected:
const SimpleArrayLookupTable *simpleArrayLookupTable;
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/SingleTableProcessor.cpp b/icu4c/source/layout/SingleTableProcessor.cpp
index 02b6e8cb27..94a4edd757 100644
--- a/icu4c/source/layout/SingleTableProcessor.cpp
+++ b/icu4c/source/layout/SingleTableProcessor.cpp
@@ -15,7 +15,7 @@
U_NAMESPACE_BEGIN
-const char SingleTableProcessor::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SingleTableProcessor)
SingleTableProcessor::SingleTableProcessor()
{
diff --git a/icu4c/source/layout/SingleTableProcessor.h b/icu4c/source/layout/SingleTableProcessor.h
index 57bfe90e70..d6ca048b04 100644
--- a/icu4c/source/layout/SingleTableProcessor.h
+++ b/icu4c/source/layout/SingleTableProcessor.h
@@ -36,14 +36,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
private:
SingleTableProcessor();
@@ -51,13 +51,6 @@ private:
protected:
const SingleTableLookupTable *singleTableLookupTable;
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/ThaiLayoutEngine.cpp b/icu4c/source/layout/ThaiLayoutEngine.cpp
index 8d5e95324a..ee7504e8b3 100644
--- a/icu4c/source/layout/ThaiLayoutEngine.cpp
+++ b/icu4c/source/layout/ThaiLayoutEngine.cpp
@@ -15,7 +15,7 @@
U_NAMESPACE_BEGIN
-const char ThaiLayoutEngine::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ThaiLayoutEngine)
ThaiLayoutEngine::ThaiLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode)
: LayoutEngine(fontInstance, scriptCode, languageCode)
diff --git a/icu4c/source/layout/ThaiLayoutEngine.h b/icu4c/source/layout/ThaiLayoutEngine.h
index ffbd38eb0f..1d72679d63 100644
--- a/icu4c/source/layout/ThaiLayoutEngine.h
+++ b/icu4c/source/layout/ThaiLayoutEngine.h
@@ -57,14 +57,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
protected:
/**
@@ -114,13 +114,6 @@ protected:
virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
LEGlyphStorage &glyphStorage, LEErrorCode &success);
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/TrimmedArrayProcessor.cpp b/icu4c/source/layout/TrimmedArrayProcessor.cpp
index b5df944af9..a68c056267 100644
--- a/icu4c/source/layout/TrimmedArrayProcessor.cpp
+++ b/icu4c/source/layout/TrimmedArrayProcessor.cpp
@@ -15,7 +15,7 @@
U_NAMESPACE_BEGIN
-const char TrimmedArrayProcessor::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TrimmedArrayProcessor)
TrimmedArrayProcessor::TrimmedArrayProcessor()
{
diff --git a/icu4c/source/layout/TrimmedArrayProcessor.h b/icu4c/source/layout/TrimmedArrayProcessor.h
index 6a386a8549..9d86980c32 100644
--- a/icu4c/source/layout/TrimmedArrayProcessor.h
+++ b/icu4c/source/layout/TrimmedArrayProcessor.h
@@ -36,14 +36,14 @@ public:
*
* @stable ICU 2.8
*/
- virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); }
+ virtual UClassID getDynamicClassID() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.
*
* @stable ICU 2.8
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static UClassID getStaticClassID();
private:
TrimmedArrayProcessor();
@@ -53,13 +53,6 @@ protected:
TTGlyphID lastGlyph;
const TrimmedArrayLookupTable *trimmedArrayLookupTable;
-private:
-
- /**
- * The address of this static class variable serves as this class's ID
- * for ICU "poor man's RTTI".
- */
- static const char fgClassID;
};
U_NAMESPACE_END
diff --git a/icu4c/source/layout/loengine.cpp b/icu4c/source/layout/loengine.cpp
index 13c5f72be7..384459be51 100644
--- a/icu4c/source/layout/loengine.cpp
+++ b/icu4c/source/layout/loengine.cpp
@@ -14,5 +14,5 @@
*/
#ifndef U_HIDE_OBSOLETE_API
-const char ICULayoutEngine::fgClassID=0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ICULayoutEngine)
#endif