diff --git a/icu4c/source/common/rbbirb.h b/icu4c/source/common/rbbirb.h index 72c775cf717..7b38187fd53 100644 --- a/icu4c/source/common/rbbirb.h +++ b/icu4c/source/common/rbbirb.h @@ -52,7 +52,7 @@ private: }; -class RBBISymbolTable : public SymbolTable { +class RBBISymbolTable : public UMemory, public SymbolTable { private: const UnicodeString &fRules; UHashtable *fHashTable; @@ -80,27 +80,9 @@ public: virtual void print() const; - /** - * ICU "poor man's RTTI", returns a UClassID for the actual class. - * - * @draft ICU 2.2 - */ - virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); } - - /** - * ICU "poor man's RTTI", returns a UClassID for this class. - * - * @draft ICU 2.2 - */ - static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; } - private: - - /** - * The address of this static class variable serves as this class's ID - * for ICU "poor man's RTTI". - */ - static const char fgClassID; + RBBISymbolTable(const RBBISymbolTable &other); // forbid copying of this class + RBBISymbolTable &operator=(const RBBISymbolTable &other); // forbid copying of this class }; diff --git a/icu4c/source/common/rbbistbl.cpp b/icu4c/source/common/rbbistbl.cpp index c04e32d73f8..7f981ba156a 100644 --- a/icu4c/source/common/rbbistbl.cpp +++ b/icu4c/source/common/rbbistbl.cpp @@ -38,10 +38,6 @@ U_CDECL_END U_NAMESPACE_BEGIN -const char RBBISymbolTable::fgClassID=0; - - - RBBISymbolTable::RBBISymbolTable(RBBIRuleScanner *rs, const UnicodeString &rules, UErrorCode &status) :fRules(rules), fRuleScanner(rs), ffffString(UChar(0xffff)) { diff --git a/icu4c/source/i18n/rbt_pars.cpp b/icu4c/source/i18n/rbt_pars.cpp index 9b16a0ebc5f..c06b6ff0d1a 100644 --- a/icu4c/source/i18n/rbt_pars.cpp +++ b/icu4c/source/i18n/rbt_pars.cpp @@ -106,7 +106,7 @@ U_NAMESPACE_BEGIN * have been defined so far. Note that it uses variablesVector, * _not_ data.setVariables. */ -class ParseData : public SymbolTable { +class ParseData : public UMemory, public SymbolTable { public: const TransliterationRuleData* data; // alias @@ -133,31 +133,11 @@ public: */ UBool isReplacer(UChar32 ch); - /** - * ICU "poor man's RTTI", returns a UClassID for the actual class. - * - * @draft ICU 2.2 - */ - virtual inline UClassID getDynamicClassID() const { return getStaticClassID(); } - - /** - * ICU "poor man's RTTI", returns a UClassID for this class. - * - * @draft ICU 2.2 - */ - static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; } - private: - - /** - * The address of this static class variable serves as this class's ID - * for ICU "poor man's RTTI". - */ - static const char fgClassID; + ParseData(const ParseData &other); // forbid copying of this class + ParseData &operator=(const ParseData &other); // forbid copying of this class }; -const char ParseData::fgClassID=0; - ParseData::ParseData(const TransliterationRuleData* d, const UVector* sets) : data(d), variablesVector(sets) {}