From b2d0b4f4654479e0c26a9a810298b02072e43e39 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Fri, 31 Dec 2004 17:43:36 +0000 Subject: [PATCH] ICU-4296 Don't export utility classes, and don't add ICU RTTI to utility classes. X-SVN-Rev: 17062 --- icu4c/source/i18n/gregoimp.cpp | 2 -- icu4c/source/i18n/gregoimp.h | 33 ++++----------------------------- 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/icu4c/source/i18n/gregoimp.cpp b/icu4c/source/i18n/gregoimp.cpp index 79c962b6faa..62eed32ae4f 100644 --- a/icu4c/source/i18n/gregoimp.cpp +++ b/icu4c/source/i18n/gregoimp.cpp @@ -264,7 +264,5 @@ UResourceBundle* CalendarData::getByKey2(const char *key, const char *subKey, UE return fFillin; } -UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CalendarData) - #endif //eof diff --git a/icu4c/source/i18n/gregoimp.h b/icu4c/source/i18n/gregoimp.h index 0adaa48ee13..764cd12d234 100644 --- a/icu4c/source/i18n/gregoimp.h +++ b/icu4c/source/i18n/gregoimp.h @@ -23,7 +23,7 @@ U_NAMESPACE_BEGIN * A utility class providing mathematical functions used by time zone * and calendar code. Do not instantiate. */ -class U_I18N_API Math { +class Math { public: /** * Divide two integers, returning the floor of the quotient. @@ -130,7 +130,7 @@ class U_I18N_API Math { * Note: Unlike GregorianCalendar, all computations performed by this * class occur in the pure proleptic GregorianCalendar. */ -class U_I18N_API Grego { +class Grego { public: /** * Return TRUE if the given year is a leap year. @@ -259,10 +259,10 @@ inline int32_t Grego::gregorianShift(int32_t eyear) { } /** - * This class provides convenient access to the data needed for a calendar. + * This utility class provides convenient access to the data needed for a calendar. * @internal ICU 3.0 */ -class U_I18N_API CalendarData : public UObject { +class CalendarData : public UMemory { public: /** * Construct a CalendarData from the given locale. @@ -299,31 +299,6 @@ public: ~CalendarData(); - /** - * Override Calendar Returns a unique class ID POLYMORPHICALLY. Pure virtual - * override. This method is to implement a simple version of RTTI, since not all C++ - * compilers support genuine RTTI. Polymorphic operator==() and clone() methods call - * this method. - * - * @return The class ID for this object. All objects of a given class have the - * same class ID. Objects of other classes have different class IDs. - * @stable ICU 2.0 - */ - virtual UClassID getDynamicClassID(void) const; - - /** - * Return the class ID for this class. This is useful only for comparing to a return - * value from getDynamicClassID(). For example: - * - * Base* polymorphic_pointer = createPolymorphicObject(); - * if (polymorphic_pointer->getDynamicClassID() == - * Derived::getStaticClassID()) ... - * - * @return The class ID for all objects of this class. - * @stable ICU 2.0 - */ - static UClassID U_EXPORT2 getStaticClassID(void); - private: void initData(const char *locale, const char *type, UErrorCode& status);