ICU 72.1 72.1
|
A factory, used with registerFactory, the creates multiple collators and provides display names for them. More...
#include <coll.h>
Public Member Functions | |
virtual | ~CollatorFactory () |
Destructor. More... | |
virtual UBool | visible (void) const |
Return true if this factory is visible. More... | |
virtual Collator * | createCollator (const Locale &loc)=0 |
Return a collator for the provided locale. More... | |
virtual UnicodeString & | getDisplayName (const Locale &objectLocale, const Locale &displayLocale, UnicodeString &result) |
Return the name of the collator for the objectLocale, localized for the displayLocale. More... | |
virtual const UnicodeString * | getSupportedIDs (int32_t &count, UErrorCode &status)=0 |
Return an array of all the locale names directly supported by this factory. More... | |
Public Member Functions inherited from icu::UObject | |
virtual | ~UObject () |
Destructor. More... | |
virtual UClassID | getDynamicClassID () const |
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. More... | |
A factory, used with registerFactory, the creates multiple collators and provides display names for them.
A factory supports some number of locales– these are the locales for which it can create collators. The factory can be visible, in which case the supported locales will be enumerated by getAvailableLocales, or invisible, in which they are not. Invisible locales are still supported, they are just not listed by getAvailableLocales.
If standard locale display names are sufficient, Collator instances can be registered using registerInstance instead.
Note: if the collators are to be used from C APIs, they must be instances of RuleBasedCollator.
|
virtual |
Destructor.
Return a collator for the provided locale.
If the locale is not supported, return NULL.
loc | the locale identifying the collator to be created. |
|
virtual |
Return the name of the collator for the objectLocale, localized for the displayLocale.
If objectLocale is not supported, or the factory is not visible, set the result string to bogus.
objectLocale | the locale identifying the collator |
displayLocale | the locale for which the display name of the collator should be localized |
result | an output parameter for the display name, set to bogus if not supported. |
|
pure virtual |
Return an array of all the locale names directly supported by this factory.
The number of names is returned in count. This array is owned by the factory. Its contents must never change.
count | output parameter for the number of locales supported by the factory |
status | the in/out error code |
|
virtual |
Return true if this factory is visible.
Default is true. If not visible, the locales supported by this factory will not be listed by getAvailableLocales.