ICU-20783 C++ covariant return types: clone(), freeze() & friends
This commit is contained in:
parent
deec7ef683
commit
f02b496494
@ -173,7 +173,7 @@ public:
|
||||
status = U_SAFECLONE_ALLOCATED_WARNING;
|
||||
return clone();
|
||||
}
|
||||
virtual BreakIterator* clone(void) const { return new SimpleFilteredSentenceBreakIterator(*this); }
|
||||
virtual SimpleFilteredSentenceBreakIterator* clone() const { return new SimpleFilteredSentenceBreakIterator(*this); }
|
||||
virtual UClassID getDynamicClassID(void) const { return NULL; }
|
||||
virtual UBool operator==(const BreakIterator& o) const { if(this==&o) return true; return false; }
|
||||
|
||||
|
@ -323,8 +323,8 @@ void RuleBasedBreakIterator::init(UErrorCode &status) {
|
||||
// Virtual function: does the right thing with subclasses.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
BreakIterator*
|
||||
RuleBasedBreakIterator::clone(void) const {
|
||||
RuleBasedBreakIterator*
|
||||
RuleBasedBreakIterator::clone() const {
|
||||
return new RuleBasedBreakIterator(*this);
|
||||
}
|
||||
|
||||
@ -1079,10 +1079,8 @@ const uint8_t *RuleBasedBreakIterator::getBinaryRules(uint32_t &length) {
|
||||
}
|
||||
|
||||
|
||||
BreakIterator * RuleBasedBreakIterator::createBufferClone(void * /*stackBuffer*/,
|
||||
int32_t &bufferSize,
|
||||
UErrorCode &status)
|
||||
{
|
||||
RuleBasedBreakIterator *RuleBasedBreakIterator::createBufferClone(
|
||||
void * /*stackBuffer*/, int32_t &bufferSize, UErrorCode &status) {
|
||||
if (U_FAILURE(status)){
|
||||
return NULL;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ StringCharacterIterator::operator==(const ForwardCharacterIterator& that) const
|
||||
&& end == realThat.end;
|
||||
}
|
||||
|
||||
CharacterIterator*
|
||||
StringCharacterIterator*
|
||||
StringCharacterIterator::clone() const {
|
||||
return new StringCharacterIterator(*this);
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ UCharCharacterIterator::hashCode() const {
|
||||
return ustr_hashUCharsN(text, textLength) ^ pos ^ begin ^ end;
|
||||
}
|
||||
|
||||
CharacterIterator*
|
||||
UCharCharacterIterator*
|
||||
UCharCharacterIterator::clone() const {
|
||||
return new UCharCharacterIterator(*this);
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public:
|
||||
* method which subclasses implement.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
virtual BreakIterator* clone(void) const = 0;
|
||||
virtual BreakIterator* clone() const = 0;
|
||||
|
||||
/**
|
||||
* Return a polymorphic class ID for this object. Different subclasses
|
||||
|
@ -380,7 +380,7 @@ public:
|
||||
* @return a pointer to a new CharacterIterator
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
virtual CharacterIterator* clone(void) const = 0;
|
||||
virtual CharacterIterator* clone() const = 0;
|
||||
|
||||
/**
|
||||
* Sets the iterator to refer to the first code unit in its
|
||||
|
@ -601,7 +601,7 @@ public:
|
||||
* @return a pointer to a new Normalizer
|
||||
* @deprecated ICU 56 Use Normalizer2 instead.
|
||||
*/
|
||||
Normalizer* clone(void) const;
|
||||
Normalizer* clone() const;
|
||||
|
||||
/**
|
||||
* Generates a hash code for this iterator.
|
||||
|
@ -274,7 +274,7 @@ public:
|
||||
* @return a newly-constructed RuleBasedBreakIterator
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
virtual BreakIterator* clone() const;
|
||||
virtual RuleBasedBreakIterator* clone() const;
|
||||
|
||||
/**
|
||||
* Compute a hash code for this BreakIterator
|
||||
@ -564,9 +564,9 @@ public:
|
||||
* or if the stackBuffer was too small to hold the clone.
|
||||
* @deprecated ICU 52. Use clone() instead.
|
||||
*/
|
||||
virtual BreakIterator * createBufferClone(void *stackBuffer,
|
||||
int32_t &BufferSize,
|
||||
UErrorCode &status);
|
||||
virtual RuleBasedBreakIterator *createBufferClone(void *stackBuffer,
|
||||
int32_t &BufferSize,
|
||||
UErrorCode &status);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -193,9 +193,6 @@ public:
|
||||
* Clones can be used concurrently in multiple threads.
|
||||
* If a subclass does not implement clone(), or if an error occurs,
|
||||
* then NULL is returned.
|
||||
* The clone functions in all subclasses return a pointer to a Replaceable
|
||||
* because some compilers do not support covariant (same-as-this)
|
||||
* return types; cast to the appropriate subclass if necessary.
|
||||
* The caller must delete the clone.
|
||||
*
|
||||
* @return a clone of this object
|
||||
|
@ -133,7 +133,7 @@ public:
|
||||
* @return the newly cloned object.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
virtual CharacterIterator* clone(void) const;
|
||||
virtual StringCharacterIterator* clone() const;
|
||||
|
||||
/**
|
||||
* Sets the iterator to iterate over the provided string.
|
||||
|
@ -71,9 +71,6 @@ public:
|
||||
* Clones can be used concurrently in multiple threads.
|
||||
* If a subclass does not implement clone(), or if an error occurs,
|
||||
* then NULL is returned.
|
||||
* The clone functions in all subclasses return a base class pointer
|
||||
* because some compilers do not support covariant (same-as-this)
|
||||
* return types; cast to the appropriate subclass if necessary.
|
||||
* The caller must delete the clone.
|
||||
*
|
||||
* @return a clone of this object
|
||||
|
@ -135,7 +135,7 @@ public:
|
||||
* @return the CharacterIterator newly created
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
virtual CharacterIterator* clone(void) const;
|
||||
virtual UCharCharacterIterator* clone() const;
|
||||
|
||||
/**
|
||||
* Sets the iterator to refer to the first code unit in its
|
||||
|
@ -505,7 +505,7 @@ public:
|
||||
* @see cloneAsThawed
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
virtual UnicodeFunctor* clone() const;
|
||||
virtual UnicodeSet* clone() const;
|
||||
|
||||
/**
|
||||
* Returns the hash code value for this set.
|
||||
@ -583,7 +583,7 @@ public:
|
||||
* @see cloneAsThawed
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
UnicodeFunctor *freeze();
|
||||
UnicodeSet *freeze();
|
||||
|
||||
/**
|
||||
* Clone the set and make the clone mutable.
|
||||
@ -593,7 +593,7 @@ public:
|
||||
* @see isFrozen
|
||||
* @stable ICU 3.8
|
||||
*/
|
||||
UnicodeFunctor *cloneAsThawed() const;
|
||||
UnicodeSet *cloneAsThawed() const;
|
||||
|
||||
//----------------------------------------------------------------
|
||||
// Public API
|
||||
|
@ -3326,9 +3326,6 @@ public:
|
||||
* Clones can be used concurrently in multiple threads.
|
||||
* If a subclass does not implement clone(), or if an error occurs,
|
||||
* then NULL is returned.
|
||||
* The clone functions in all subclasses return a pointer to a Replaceable
|
||||
* because some compilers do not support covariant (same-as-this)
|
||||
* return types; cast to the appropriate subclass if necessary.
|
||||
* The caller must delete the clone.
|
||||
*
|
||||
* @return a clone of this object
|
||||
@ -3337,7 +3334,7 @@ public:
|
||||
* @see getDynamicClassID
|
||||
* @stable ICU 2.6
|
||||
*/
|
||||
virtual Replaceable *clone() const;
|
||||
virtual UnicodeString *clone() const;
|
||||
|
||||
/** Destructor.
|
||||
* @stable ICU 2.0
|
||||
|
@ -215,11 +215,8 @@ public:
|
||||
* The clone() function is not available in UObject because it is not
|
||||
* implemented by all ICU classes.
|
||||
* Many ICU services provide a clone() function for their class trees,
|
||||
* defined on the service's C++ base class, and all subclasses within that
|
||||
* service class tree return a pointer to the service base class
|
||||
* defined on the service's C++ base class
|
||||
* (which itself is a subclass of UObject).
|
||||
* This is because some compilers do not support covariant (same-as-this)
|
||||
* return types; cast to the appropriate subclass if necessary.
|
||||
*
|
||||
* @stable ICU 2.2
|
||||
*/
|
||||
|
@ -278,11 +278,11 @@ UnicodeSet& UnicodeSet::copyFrom(const UnicodeSet& o, UBool asThawed) {
|
||||
* to support cloning in order to allow classes using
|
||||
* UnicodeMatchers, such as Transliterator, to implement cloning.
|
||||
*/
|
||||
UnicodeFunctor* UnicodeSet::clone() const {
|
||||
UnicodeSet* UnicodeSet::clone() const {
|
||||
return new UnicodeSet(*this);
|
||||
}
|
||||
|
||||
UnicodeFunctor *UnicodeSet::cloneAsThawed() const {
|
||||
UnicodeSet *UnicodeSet::cloneAsThawed() const {
|
||||
return new UnicodeSet(*this, TRUE);
|
||||
}
|
||||
|
||||
@ -2172,7 +2172,7 @@ void UnicodeSet::setPattern(const char16_t *newPat, int32_t newPatLen) {
|
||||
// We can regenerate an equivalent pattern later when requested.
|
||||
}
|
||||
|
||||
UnicodeFunctor *UnicodeSet::freeze() {
|
||||
UnicodeSet *UnicodeSet::freeze() {
|
||||
if(!isFrozen() && !isBogus()) {
|
||||
compact();
|
||||
|
||||
|
@ -332,7 +332,7 @@ Replaceable::clone() const {
|
||||
}
|
||||
|
||||
// UnicodeString overrides clone() with a real implementation
|
||||
Replaceable *
|
||||
UnicodeString *
|
||||
UnicodeString::clone() const {
|
||||
return new UnicodeString(*this);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
WholeStringBreakIterator() : BreakIterator(), length(0) {}
|
||||
~WholeStringBreakIterator() U_OVERRIDE;
|
||||
UBool operator==(const BreakIterator&) const U_OVERRIDE;
|
||||
BreakIterator *clone() const U_OVERRIDE;
|
||||
WholeStringBreakIterator *clone() const U_OVERRIDE;
|
||||
static UClassID U_EXPORT2 getStaticClassID();
|
||||
UClassID getDynamicClassID() const U_OVERRIDE;
|
||||
CharacterIterator &getText() const U_OVERRIDE;
|
||||
@ -62,9 +62,9 @@ public:
|
||||
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) U_OVERRIDE;
|
||||
BreakIterator &refreshInputText(UText *input, UErrorCode &errorCode) U_OVERRIDE;
|
||||
WholeStringBreakIterator *createBufferClone(void *stackBuffer, int32_t &BufferSize,
|
||||
UErrorCode &errorCode) U_OVERRIDE;
|
||||
WholeStringBreakIterator &refreshInputText(UText *input, UErrorCode &errorCode) U_OVERRIDE;
|
||||
|
||||
private:
|
||||
int32_t length;
|
||||
@ -74,7 +74,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(WholeStringBreakIterator)
|
||||
|
||||
WholeStringBreakIterator::~WholeStringBreakIterator() {}
|
||||
UBool WholeStringBreakIterator::operator==(const BreakIterator&) const { return FALSE; }
|
||||
BreakIterator *WholeStringBreakIterator::clone() const { return nullptr; }
|
||||
WholeStringBreakIterator *WholeStringBreakIterator::clone() const { return nullptr; }
|
||||
|
||||
CharacterIterator &WholeStringBreakIterator::getText() const {
|
||||
UPRV_UNREACHABLE; // really should not be called
|
||||
@ -113,14 +113,14 @@ int32_t WholeStringBreakIterator::preceding(int32_t /*offset*/) { return 0; }
|
||||
UBool WholeStringBreakIterator::isBoundary(int32_t /*offset*/) { return FALSE; }
|
||||
int32_t WholeStringBreakIterator::next(int32_t /*n*/) { return length; }
|
||||
|
||||
BreakIterator *WholeStringBreakIterator::createBufferClone(
|
||||
WholeStringBreakIterator *WholeStringBreakIterator::createBufferClone(
|
||||
void * /*stackBuffer*/, int32_t & /*BufferSize*/, UErrorCode &errorCode) {
|
||||
if (U_SUCCESS(errorCode)) {
|
||||
errorCode = U_UNSUPPORTED_ERROR;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
BreakIterator &WholeStringBreakIterator::refreshInputText(
|
||||
WholeStringBreakIterator &WholeStringBreakIterator::refreshInputText(
|
||||
UText * /*input*/, UErrorCode &errorCode) {
|
||||
if (U_SUCCESS(errorCode)) {
|
||||
errorCode = U_UNSUPPORTED_ERROR;
|
||||
|
@ -226,7 +226,7 @@ AnyTransliterator::AnyTransliterator(const AnyTransliterator& o) :
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
Transliterator* AnyTransliterator::clone() const {
|
||||
AnyTransliterator* AnyTransliterator::clone() const {
|
||||
return new AnyTransliterator(*this);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
virtual Transliterator* clone() const;
|
||||
virtual AnyTransliterator* clone() const;
|
||||
|
||||
/**
|
||||
* Implements {@link Transliterator#handleTransliterate}.
|
||||
|
@ -64,7 +64,7 @@ BreakTransliterator::BreakTransliterator(const BreakTransliterator& o) :
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
Transliterator* BreakTransliterator::clone(void) const {
|
||||
BreakTransliterator* BreakTransliterator::clone() const {
|
||||
return new BreakTransliterator(*this);
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
* Transliterator API.
|
||||
* @return A copy of the object.
|
||||
*/
|
||||
virtual Transliterator* clone(void) const;
|
||||
virtual BreakTransliterator* clone() const;
|
||||
|
||||
virtual const UnicodeString &getInsertion() const;
|
||||
|
||||
|
@ -53,7 +53,7 @@ BuddhistCalendar& BuddhistCalendar::operator= ( const BuddhistCalendar& right)
|
||||
return *this;
|
||||
}
|
||||
|
||||
Calendar* BuddhistCalendar::clone(void) const
|
||||
BuddhistCalendar* BuddhistCalendar::clone() const
|
||||
{
|
||||
return new BuddhistCalendar(*this);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
* @return return a polymorphic copy of this calendar.
|
||||
* @internal
|
||||
*/
|
||||
virtual Calendar* clone(void) const;
|
||||
virtual BuddhistCalendar* clone() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@ -125,7 +125,7 @@ CaseMapTransliterator::CaseMapTransliterator(const CaseMapTransliterator& o) :
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
/*Transliterator* CaseMapTransliterator::clone(void) const {
|
||||
/*CaseMapTransliterator* CaseMapTransliterator::clone() const {
|
||||
return new CaseMapTransliterator(*this);
|
||||
}*/
|
||||
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
* Transliterator API.
|
||||
* @return a copy of the object.
|
||||
*/
|
||||
virtual Transliterator* clone(void) const = 0;
|
||||
virtual CaseMapTransliterator* clone() const = 0;
|
||||
|
||||
/**
|
||||
* ICU "poor man's RTTI", returns a UClassID for the actual class.
|
||||
|
@ -118,7 +118,7 @@ U_NAMESPACE_BEGIN
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
|
||||
Calendar* ChineseCalendar::clone() const {
|
||||
ChineseCalendar* ChineseCalendar::clone() const {
|
||||
return new ChineseCalendar(*this);
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ class U_I18N_API ChineseCalendar : public Calendar {
|
||||
virtual ~ChineseCalendar();
|
||||
|
||||
// clone
|
||||
virtual Calendar* clone() const;
|
||||
virtual ChineseCalendar* clone() const;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -563,7 +563,7 @@ ChoiceFormat::matchStringUntilLimitPart(
|
||||
|
||||
// -------------------------------------
|
||||
|
||||
Format*
|
||||
ChoiceFormat*
|
||||
ChoiceFormat::clone() const
|
||||
{
|
||||
ChoiceFormat *aCopy = new ChoiceFormat(*this);
|
||||
|
@ -45,7 +45,7 @@ CompactDecimalFormat& CompactDecimalFormat::operator=(const CompactDecimalFormat
|
||||
return *this;
|
||||
}
|
||||
|
||||
Format* CompactDecimalFormat::clone() const {
|
||||
CompactDecimalFormat* CompactDecimalFormat::clone() const {
|
||||
return new CompactDecimalFormat(*this);
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ CopticCalendar::~CopticCalendar()
|
||||
{
|
||||
}
|
||||
|
||||
Calendar*
|
||||
CopticCalendar*
|
||||
CopticCalendar::clone() const
|
||||
{
|
||||
return new CopticCalendar(*this);
|
||||
|
@ -145,7 +145,7 @@ public:
|
||||
* @return return a polymorphic copy of this calendar.
|
||||
* @internal
|
||||
*/
|
||||
virtual Calendar* clone(void) const;
|
||||
virtual CopticCalendar* clone() const;
|
||||
|
||||
/**
|
||||
* return the calendar type, "coptic"
|
||||
|
@ -323,7 +323,7 @@ CompoundTransliterator& CompoundTransliterator::operator=(
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
Transliterator* CompoundTransliterator::clone(void) const {
|
||||
CompoundTransliterator* CompoundTransliterator::clone() const {
|
||||
return new CompoundTransliterator(*this);
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
virtual Transliterator* clone(void) const;
|
||||
virtual CompoundTransliterator* clone() const;
|
||||
|
||||
/**
|
||||
* Returns the number of transliterators in this chain.
|
||||
|
@ -38,7 +38,7 @@ CurrencyAmount& CurrencyAmount::operator=(const CurrencyAmount& other) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
UObject* CurrencyAmount::clone() const {
|
||||
CurrencyAmount* CurrencyAmount::clone() const {
|
||||
return new CurrencyAmount(*this);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ CurrencyFormat::CurrencyFormat(const CurrencyFormat& other) :
|
||||
CurrencyFormat::~CurrencyFormat() {
|
||||
}
|
||||
|
||||
Format* CurrencyFormat::clone() const {
|
||||
CurrencyFormat* CurrencyFormat::clone() const {
|
||||
return new CurrencyFormat(*this);
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ class CurrencyFormat : public MeasureFormat {
|
||||
/**
|
||||
* Override Format API.
|
||||
*/
|
||||
virtual Format* clone() const;
|
||||
virtual CurrencyFormat* clone() const;
|
||||
|
||||
|
||||
using MeasureFormat::format;
|
||||
|
@ -109,7 +109,7 @@ CurrencyUnit& CurrencyUnit::operator=(const CurrencyUnit& other) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
UObject* CurrencyUnit::clone() const {
|
||||
CurrencyUnit* CurrencyUnit::clone() const {
|
||||
return new CurrencyUnit(*this);
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ DangiCalendar::~DangiCalendar()
|
||||
{
|
||||
}
|
||||
|
||||
Calendar*
|
||||
DangiCalendar*
|
||||
DangiCalendar::clone() const
|
||||
{
|
||||
return new DangiCalendar(*this);
|
||||
|
@ -66,7 +66,7 @@ class DangiCalendar : public ChineseCalendar {
|
||||
* Clone.
|
||||
* @internal
|
||||
*/
|
||||
virtual Calendar* clone() const;
|
||||
virtual DangiCalendar* clone() const;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Internal methods & astronomical calculations
|
||||
|
@ -485,7 +485,7 @@ DecimalFormat::~DecimalFormat() {
|
||||
delete fields;
|
||||
}
|
||||
|
||||
Format* DecimalFormat::clone() const {
|
||||
DecimalFormat* DecimalFormat::clone() const {
|
||||
// can only clone valid objects.
|
||||
if (fields == nullptr) {
|
||||
return nullptr;
|
||||
|
@ -215,8 +215,8 @@ DateIntervalFormat::~DateIntervalFormat() {
|
||||
}
|
||||
|
||||
|
||||
Format*
|
||||
DateIntervalFormat::clone(void) const {
|
||||
DateIntervalFormat*
|
||||
DateIntervalFormat::clone() const {
|
||||
return new DateIntervalFormat(*this);
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ EscapeTransliterator::~EscapeTransliterator() {
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
Transliterator* EscapeTransliterator::clone() const {
|
||||
EscapeTransliterator* EscapeTransliterator::clone() const {
|
||||
return new EscapeTransliterator(*this);
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ class EscapeTransliterator : public Transliterator {
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
virtual Transliterator* clone() const;
|
||||
virtual EscapeTransliterator* clone() const;
|
||||
|
||||
/**
|
||||
* ICU "poor man's RTTI", returns a UClassID for the actual class.
|
||||
|
@ -46,7 +46,7 @@ EthiopicCalendar::~EthiopicCalendar()
|
||||
{
|
||||
}
|
||||
|
||||
Calendar*
|
||||
EthiopicCalendar*
|
||||
EthiopicCalendar::clone() const
|
||||
{
|
||||
return new EthiopicCalendar(*this);
|
||||
|
@ -141,7 +141,7 @@ public:
|
||||
* @return return a polymorphic copy of this calendar.
|
||||
* @internal
|
||||
*/
|
||||
virtual Calendar* clone() const;
|
||||
virtual EthiopicCalendar* clone() const;
|
||||
|
||||
/**
|
||||
* return the calendar type, "ethiopic"
|
||||
|
@ -59,7 +59,7 @@ FunctionReplacer::~FunctionReplacer() {
|
||||
/**
|
||||
* Implement UnicodeFunctor
|
||||
*/
|
||||
UnicodeFunctor* FunctionReplacer::clone() const {
|
||||
FunctionReplacer* FunctionReplacer::clone() const {
|
||||
return new FunctionReplacer(*this);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ class FunctionReplacer : public UnicodeFunctor, public UnicodeReplacer {
|
||||
/**
|
||||
* Implement UnicodeFunctor
|
||||
*/
|
||||
virtual UnicodeFunctor* clone() const;
|
||||
virtual FunctionReplacer* clone() const;
|
||||
|
||||
/**
|
||||
* UnicodeFunctor API. Cast 'this' to a UnicodeReplacer* pointer
|
||||
|
@ -286,7 +286,7 @@ fIsGregorian(source.fIsGregorian), fInvertGregorian(source.fInvertGregorian)
|
||||
|
||||
// -------------------------------------
|
||||
|
||||
Calendar* GregorianCalendar::clone() const
|
||||
GregorianCalendar* GregorianCalendar::clone() const
|
||||
{
|
||||
return new GregorianCalendar(*this);
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ const char *HebrewCalendar::getType() const {
|
||||
return "hebrew";
|
||||
}
|
||||
|
||||
Calendar* HebrewCalendar::clone() const {
|
||||
HebrewCalendar* HebrewCalendar::clone() const {
|
||||
return new HebrewCalendar(*this);
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ public:
|
||||
* @return return a polymorphic copy of this calendar.
|
||||
* @internal
|
||||
*/
|
||||
virtual Calendar* clone(void) const;
|
||||
virtual HebrewCalendar* clone() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ U_NAMESPACE_BEGIN
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
|
||||
Calendar* IndianCalendar::clone() const {
|
||||
IndianCalendar* IndianCalendar::clone() const {
|
||||
return new IndianCalendar(*this);
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ public:
|
||||
// TODO: copy c'tor, etc
|
||||
|
||||
// clone
|
||||
virtual Calendar* clone() const;
|
||||
virtual IndianCalendar* clone() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
@ -227,7 +227,7 @@ const char *IslamicCalendar::getType() const {
|
||||
return sType;
|
||||
}
|
||||
|
||||
Calendar* IslamicCalendar::clone() const {
|
||||
IslamicCalendar* IslamicCalendar::clone() const {
|
||||
return new IslamicCalendar(*this);
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ class U_I18N_API IslamicCalendar : public Calendar {
|
||||
// TODO: copy c'tor, etc
|
||||
|
||||
// clone
|
||||
virtual Calendar* clone() const;
|
||||
virtual IslamicCalendar* clone() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
@ -136,7 +136,7 @@ JapaneseCalendar& JapaneseCalendar::operator= ( const JapaneseCalendar& right)
|
||||
return *this;
|
||||
}
|
||||
|
||||
Calendar* JapaneseCalendar::clone(void) const
|
||||
JapaneseCalendar* JapaneseCalendar::clone() const
|
||||
{
|
||||
return new JapaneseCalendar(*this);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ public:
|
||||
* @return return a polymorphic copy of this calendar.
|
||||
* @internal
|
||||
*/
|
||||
virtual Calendar* clone(void) const;
|
||||
virtual JapaneseCalendar* clone() const;
|
||||
|
||||
/**
|
||||
* Return the extended year defined by the current fields. In the
|
||||
|
@ -460,7 +460,7 @@ UBool MeasureFormat::operator==(const Format &other) const {
|
||||
**numberFormat == **rhs.numberFormat);
|
||||
}
|
||||
|
||||
Format *MeasureFormat::clone() const {
|
||||
MeasureFormat *MeasureFormat::clone() const {
|
||||
return new MeasureFormat(*this);
|
||||
}
|
||||
|
||||
|
@ -1923,7 +1923,7 @@ MeasureUnit &MeasureUnit::operator=(const MeasureUnit &other) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
UObject *MeasureUnit::clone() const {
|
||||
MeasureUnit *MeasureUnit::clone() const {
|
||||
return new MeasureUnit(*this);
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ Measure& Measure::operator=(const Measure& other) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
UObject *Measure::clone() const {
|
||||
Measure *Measure::clone() const {
|
||||
return new Measure(*this);
|
||||
}
|
||||
|
||||
|
@ -436,7 +436,7 @@ MessageFormat::operator==(const Format& rhs) const
|
||||
// -------------------------------------
|
||||
// Creates a copy of this MessageFormat, the caller owns the copy.
|
||||
|
||||
Format*
|
||||
MessageFormat*
|
||||
MessageFormat::clone() const
|
||||
{
|
||||
return new MessageFormat(*this);
|
||||
@ -1873,7 +1873,7 @@ UBool MessageFormat::DummyFormat::operator==(const Format&) const {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Format* MessageFormat::DummyFormat::clone() const {
|
||||
MessageFormat::DummyFormat* MessageFormat::DummyFormat::clone() const {
|
||||
return new DummyFormat();
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ NameUnicodeTransliterator::NameUnicodeTransliterator(const NameUnicodeTransliter
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
Transliterator* NameUnicodeTransliterator::clone(void) const {
|
||||
NameUnicodeTransliterator* NameUnicodeTransliterator::clone() const {
|
||||
return new NameUnicodeTransliterator(*this);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
* Transliterator API.
|
||||
* @return A copy of the object.
|
||||
*/
|
||||
virtual Transliterator* clone(void) const;
|
||||
virtual NameUnicodeTransliterator* clone() const;
|
||||
|
||||
/**
|
||||
* ICU "poor man's RTTI", returns a UClassID for the actual class.
|
||||
|
@ -92,7 +92,7 @@ NormalizationTransliterator::NormalizationTransliterator(const NormalizationTran
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
Transliterator* NormalizationTransliterator::clone(void) const {
|
||||
NormalizationTransliterator* NormalizationTransliterator::clone() const {
|
||||
return new NormalizationTransliterator(*this);
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ class NormalizationTransliterator : public Transliterator {
|
||||
* Transliterator API.
|
||||
* @return A copy of the object.
|
||||
*/
|
||||
virtual Transliterator* clone(void) const;
|
||||
virtual NormalizationTransliterator* clone() const;
|
||||
|
||||
/**
|
||||
* ICU "poor man's RTTI", returns a UClassID for the actual class.
|
||||
|
@ -29,7 +29,7 @@ NoUnit::NoUnit(const char* subtype) {
|
||||
NoUnit::NoUnit(const NoUnit& other) : MeasureUnit(other) {
|
||||
}
|
||||
|
||||
UObject* NoUnit::clone() const {
|
||||
NoUnit* NoUnit::clone() const {
|
||||
return new NoUnit(*this);
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ NullTransliterator::NullTransliterator() : Transliterator(UNICODE_STRING_SIMPLE(
|
||||
|
||||
NullTransliterator::~NullTransliterator() {}
|
||||
|
||||
Transliterator* NullTransliterator::clone(void) const {
|
||||
NullTransliterator* NullTransliterator::clone() const {
|
||||
return new NullTransliterator();
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
* Transliterator API.
|
||||
* @internal Use transliterator factory methods instead since this class will be removed in that release.
|
||||
*/
|
||||
virtual Transliterator* clone(void) const;
|
||||
virtual NullTransliterator* clone() const;
|
||||
|
||||
/**
|
||||
* Implements {@link Transliterator#handleTransliterate}.
|
||||
|
@ -43,7 +43,7 @@ UBool LocalizedNumberFormatterAsFormat::operator==(const Format& other) const {
|
||||
return fFormatter.toSkeleton(localStatus) == _other->fFormatter.toSkeleton(localStatus);
|
||||
}
|
||||
|
||||
Format* LocalizedNumberFormatterAsFormat::clone() const {
|
||||
LocalizedNumberFormatterAsFormat* LocalizedNumberFormatterAsFormat::clone() const {
|
||||
return new LocalizedNumberFormatterAsFormat(*this);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class U_I18N_API LocalizedNumberFormatterAsFormat : public Format {
|
||||
/**
|
||||
* Creates a copy of this object.
|
||||
*/
|
||||
Format* clone() const U_OVERRIDE;
|
||||
LocalizedNumberFormatterAsFormat* clone() const U_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Formats a Number using the wrapped LocalizedNumberFormatter. The provided formattable must be a
|
||||
|
@ -319,7 +319,7 @@ UBool OlsonTimeZone::operator==(const TimeZone& other) const {
|
||||
/**
|
||||
* TimeZone API.
|
||||
*/
|
||||
TimeZone* OlsonTimeZone::clone() const {
|
||||
OlsonTimeZone* OlsonTimeZone::clone() const {
|
||||
return new OlsonTimeZone(*this);
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ class U_I18N_API OlsonTimeZone: public BasicTimeZone {
|
||||
/**
|
||||
* TimeZone API.
|
||||
*/
|
||||
virtual TimeZone* clone() const;
|
||||
virtual OlsonTimeZone* clone() const;
|
||||
|
||||
/**
|
||||
* TimeZone API.
|
||||
|
@ -74,7 +74,7 @@ const char *PersianCalendar::getType() const {
|
||||
return "persian";
|
||||
}
|
||||
|
||||
Calendar* PersianCalendar::clone() const {
|
||||
PersianCalendar* PersianCalendar::clone() const {
|
||||
return new PersianCalendar(*this);
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ class PersianCalendar : public Calendar {
|
||||
// TODO: copy c'tor, etc
|
||||
|
||||
// clone
|
||||
virtual Calendar* clone() const;
|
||||
virtual PersianCalendar* clone() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
@ -362,7 +362,7 @@ PluralFormat::setNumberFormat(const NumberFormat* format, UErrorCode& status) {
|
||||
}
|
||||
}
|
||||
|
||||
Format*
|
||||
PluralFormat*
|
||||
PluralFormat::clone() const
|
||||
{
|
||||
return new PluralFormat(*this);
|
||||
|
@ -47,7 +47,7 @@ Quantifier::~Quantifier() {
|
||||
/**
|
||||
* Implement UnicodeFunctor
|
||||
*/
|
||||
UnicodeFunctor* Quantifier::clone() const {
|
||||
Quantifier* Quantifier::clone() const {
|
||||
return new Quantifier(*this);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class Quantifier : public UnicodeFunctor, public UnicodeMatcher {
|
||||
* Implement UnicodeFunctor
|
||||
* @return a copy of the object.
|
||||
*/
|
||||
virtual UnicodeFunctor* clone() const;
|
||||
virtual Quantifier* clone() const;
|
||||
|
||||
/**
|
||||
* Implement UnicodeMatcher
|
||||
|
@ -930,8 +930,8 @@ RuleBasedNumberFormat::~RuleBasedNumberFormat()
|
||||
dispose();
|
||||
}
|
||||
|
||||
Format*
|
||||
RuleBasedNumberFormat::clone(void) const
|
||||
RuleBasedNumberFormat*
|
||||
RuleBasedNumberFormat::clone() const
|
||||
{
|
||||
return new RuleBasedNumberFormat(*this);
|
||||
}
|
||||
|
@ -191,8 +191,8 @@ RuleBasedTransliterator::~RuleBasedTransliterator() {
|
||||
}
|
||||
}
|
||||
|
||||
Transliterator* // Covariant return NOT ALLOWED (for portability)
|
||||
RuleBasedTransliterator::clone(void) const {
|
||||
RuleBasedTransliterator*
|
||||
RuleBasedTransliterator::clone() const {
|
||||
return new RuleBasedTransliterator(*this);
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ public:
|
||||
* Implement Transliterator API.
|
||||
* @internal Use transliterator factory methods instead since this class will be removed in that release.
|
||||
*/
|
||||
virtual Transliterator* clone(void) const;
|
||||
virtual RuleBasedTransliterator* clone() const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
@ -356,8 +356,8 @@ cleanup:
|
||||
fUpToDate = FALSE;
|
||||
}
|
||||
|
||||
TimeZone*
|
||||
RuleBasedTimeZone::clone(void) const {
|
||||
RuleBasedTimeZone*
|
||||
RuleBasedTimeZone::clone() const {
|
||||
return new RuleBasedTimeZone(*this);
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ RelativeDateFormat::~RelativeDateFormat() {
|
||||
}
|
||||
|
||||
|
||||
Format* RelativeDateFormat::clone(void) const {
|
||||
RelativeDateFormat* RelativeDateFormat::clone() const {
|
||||
return new RelativeDateFormat(*this);
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
* @return A copy of the object.
|
||||
* @internal ICU 3.8
|
||||
*/
|
||||
virtual Format* clone(void) const;
|
||||
virtual RelativeDateFormat* clone() const;
|
||||
|
||||
/**
|
||||
* Return true if the given Format objects are semantically equal. Objects
|
||||
|
@ -48,8 +48,8 @@ RemoveTransliterator::RemoveTransliterator() : Transliterator(UnicodeString(TRUE
|
||||
|
||||
RemoveTransliterator::~RemoveTransliterator() {}
|
||||
|
||||
Transliterator* RemoveTransliterator::clone(void) const {
|
||||
Transliterator* result = new RemoveTransliterator();
|
||||
RemoveTransliterator* RemoveTransliterator::clone() const {
|
||||
RemoveTransliterator* result = new RemoveTransliterator();
|
||||
if (result != NULL && getFilter() != 0) {
|
||||
result->adoptFilter((UnicodeFilter*)(getFilter()->clone()));
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
* Transliterator API.
|
||||
* @return A copy of the object.
|
||||
*/
|
||||
virtual Transliterator* clone(void) const;
|
||||
virtual RemoveTransliterator* clone() const;
|
||||
|
||||
/**
|
||||
* Implements {@link Transliterator#handleTransliterate}.
|
||||
|
@ -220,7 +220,7 @@ RuleBasedCollator::adoptTailoring(CollationTailoring *t, UErrorCode &errorCode)
|
||||
actualLocaleIsSameAsValid = FALSE;
|
||||
}
|
||||
|
||||
Collator *
|
||||
RuleBasedCollator *
|
||||
RuleBasedCollator::clone() const {
|
||||
return new RuleBasedCollator(*this);
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ ScientificNumberFormatter *ScientificNumberFormatter::createInstance(
|
||||
return result;
|
||||
}
|
||||
|
||||
ScientificNumberFormatter::Style *ScientificNumberFormatter::SuperscriptStyle::clone() const {
|
||||
ScientificNumberFormatter::SuperscriptStyle *ScientificNumberFormatter::SuperscriptStyle::clone() const {
|
||||
return new ScientificNumberFormatter::SuperscriptStyle(*this);
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ UnicodeString &ScientificNumberFormatter::SuperscriptStyle::format(
|
||||
return appendTo;
|
||||
}
|
||||
|
||||
ScientificNumberFormatter::Style *ScientificNumberFormatter::MarkupStyle::clone() const {
|
||||
ScientificNumberFormatter::MarkupStyle *ScientificNumberFormatter::MarkupStyle::clone() const {
|
||||
return new ScientificNumberFormatter::MarkupStyle(*this);
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ int32_t SelectFormat::findSubMessage(const MessagePattern& pattern, int32_t part
|
||||
return msgStart;
|
||||
}
|
||||
|
||||
Format* SelectFormat::clone() const
|
||||
SelectFormat* SelectFormat::clone() const
|
||||
{
|
||||
return new SelectFormat(*this);
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ SimpleTimeZone::operator==(const TimeZone& that) const
|
||||
// -------------------------------------
|
||||
|
||||
// Called by TimeZone::createDefault() inside a Mutex - be careful.
|
||||
TimeZone*
|
||||
SimpleTimeZone*
|
||||
SimpleTimeZone::clone() const
|
||||
{
|
||||
return new SimpleTimeZone(*this);
|
||||
|
@ -620,7 +620,7 @@ SimpleDateFormat& SimpleDateFormat::operator=(const SimpleDateFormat& other)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
Format*
|
||||
SimpleDateFormat*
|
||||
SimpleDateFormat::clone() const
|
||||
{
|
||||
return new SimpleDateFormat(*this);
|
||||
|
@ -58,7 +58,7 @@ StringMatcher::~StringMatcher() {
|
||||
/**
|
||||
* Implement UnicodeFunctor
|
||||
*/
|
||||
UnicodeFunctor* StringMatcher::clone() const {
|
||||
StringMatcher* StringMatcher::clone() const {
|
||||
return new StringMatcher(*this);
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ class StringMatcher : public UnicodeFunctor, public UnicodeMatcher, public Unico
|
||||
* Implement UnicodeFunctor
|
||||
* @return a copy of the object.
|
||||
*/
|
||||
virtual UnicodeFunctor* clone() const;
|
||||
virtual StringMatcher* clone() const;
|
||||
|
||||
/**
|
||||
* UnicodeFunctor API. Cast 'this' to a UnicodeMatcher* pointer
|
||||
|
@ -87,7 +87,7 @@ StringReplacer::~StringReplacer() {
|
||||
/**
|
||||
* Implement UnicodeFunctor
|
||||
*/
|
||||
UnicodeFunctor* StringReplacer::clone() const {
|
||||
StringReplacer* StringReplacer::clone() const {
|
||||
return new StringReplacer(*this);
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ class StringReplacer : public UnicodeFunctor, public UnicodeReplacer {
|
||||
/**
|
||||
* Implement UnicodeFunctor
|
||||
*/
|
||||
virtual UnicodeFunctor* clone() const;
|
||||
virtual StringReplacer* clone() const;
|
||||
|
||||
/**
|
||||
* UnicodeFunctor API. Cast 'this' to a UnicodeReplacer* pointer
|
||||
|
@ -282,7 +282,7 @@ void StringSearch::reset()
|
||||
usearch_reset(m_strsrch_);
|
||||
}
|
||||
|
||||
SearchIterator * StringSearch::safeClone(void) const
|
||||
StringSearch * StringSearch::safeClone() const
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
StringSearch *result = new StringSearch(m_pattern_, m_text_,
|
||||
|
@ -53,7 +53,7 @@ TaiwanCalendar& TaiwanCalendar::operator= ( const TaiwanCalendar& right)
|
||||
return *this;
|
||||
}
|
||||
|
||||
Calendar* TaiwanCalendar::clone(void) const
|
||||
TaiwanCalendar* TaiwanCalendar::clone() const
|
||||
{
|
||||
return new TaiwanCalendar(*this);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
* @return return a polymorphic copy of this calendar.
|
||||
* @internal
|
||||
*/
|
||||
virtual Calendar* clone(void) const;
|
||||
virtual TaiwanCalendar* clone() const;
|
||||
|
||||
public:
|
||||
/**
|
||||
|
@ -60,7 +60,7 @@ TitlecaseTransliterator::TitlecaseTransliterator(const TitlecaseTransliterator&
|
||||
/**
|
||||
* Transliterator API.
|
||||
*/
|
||||
Transliterator* TitlecaseTransliterator::clone(void) const {
|
||||
TitlecaseTransliterator* TitlecaseTransliterator::clone() const {
|
||||
return new TitlecaseTransliterator(*this);
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ class TitlecaseTransliterator : public CaseMapTransliterator {
|
||||
* Transliterator API.
|
||||
* @return a copy of the object.
|
||||
*/
|
||||
virtual Transliterator* clone(void) const;
|
||||
virtual TitlecaseTransliterator* clone() const;
|
||||
|
||||
/**
|
||||
* ICU "poor man's RTTI", returns a UClassID for the actual class.
|
||||
|
@ -102,7 +102,7 @@ TimeUnit::TimeUnit(const TimeUnit& other)
|
||||
: MeasureUnit(other), fTimeUnitField(other.fTimeUnitField) {
|
||||
}
|
||||
|
||||
UObject*
|
||||
TimeUnit*
|
||||
TimeUnit::clone() const {
|
||||
return new TimeUnit(*this);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user