ICU-13667 LocalizedNumberFormatterAsFormat is in the old Format class hierarchy, add ClassID boilerplate; NoUnit move virtual destructor up into first-virtual position, right after constructors

X-SVN-Rev: 41487
This commit is contained in:
Markus Scherer 2018-05-30 19:15:02 +00:00
parent 16519f2643
commit 438f1f363b
3 changed files with 11 additions and 6 deletions

View File

@ -21,6 +21,8 @@ using namespace icu;
using namespace icu::number;
using namespace icu::number::impl;
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LocalizedNumberFormatterAsFormat)
LocalizedNumberFormatterAsFormat::LocalizedNumberFormatterAsFormat(
const LocalizedNumberFormatter& formatter, const Locale& locale)
: fFormatter(formatter), fLocale(locale) {

View File

@ -87,6 +87,9 @@ class U_I18N_API LocalizedNumberFormatterAsFormat : public Format {
*/
const LocalizedNumberFormatter& getNumberFormatter() const;
UClassID getDynamicClassID() const U_OVERRIDE;
static UClassID U_EXPORT2 getStaticClassID();
private:
LocalizedNumberFormatter fFormatter;

View File

@ -61,6 +61,12 @@ public:
*/
NoUnit(const NoUnit& other);
/**
* Destructor.
* @draft ICU 60
*/
virtual ~NoUnit();
/**
* Return a polymorphic clone of this object. The result will
* have the same class as returned by getDynamicClassID().
@ -86,12 +92,6 @@ public:
*/
static UClassID U_EXPORT2 getStaticClassID();
/**
* Destructor.
* @draft ICU 60
*/
virtual ~NoUnit();
private:
/**
* Constructor