mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 22:15:31 +00:00
ICU-2244 change SymbolTable subclasses to inherit both UObject or UMemory _and_ SymbolTable because SymbolTable is an interface/mixin class; UMemory is sufficient for internal classes
X-SVN-Rev: 9964
This commit is contained in:
parent
043d14576c
commit
bedf26bf18
3 changed files with 6 additions and 48 deletions
|
@ -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
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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) {}
|
||||
|
|
Loading…
Add table
Reference in a new issue