NumberFormatFactory Class Reference

#include <numfmt.h>

Inheritance diagram for NumberFormatFactory:

UObject UMemory SimpleNumberFormatFactory

Detailed Description

A NumberFormatFactory is used to register new number formats.

The factory should be able to create any of the predefined formats for each locale it supports. When registered, the locales it supports extend or override the locale already supported by ICU.

Draft:
This API may be changed in the future versions and was introduced in ICU 2.6

Definition at line 826 of file numfmt.h.

Public Member Functions

virtual ~NumberFormatFactory ()
 Destructor.

virtual UBool visible (void) const =0
 Return true if this factory will be visible.

virtual const UnicodeStringgetSupportedIDs (int32_t &count, UErrorCode &status) const =0
 Return the locale names directly supported by this factory.

virtual NumberFormatcreateFormat (const Locale &loc, UNumberFormatStyle formatType)=0
 Return a number format of the appropriate type.


Constructor & Destructor Documentation

virtual NumberFormatFactory::~NumberFormatFactory  )  [virtual]
 

Destructor.

Draft:
This API may be changed in the future versions and was introduced in ICU 3.0


Member Function Documentation

virtual NumberFormat* NumberFormatFactory::createFormat const Locale loc,
UNumberFormatStyle  formatType
[pure virtual]
 

Return a number format of the appropriate type.

If the locale is not supported, return null. If the locale is supported, but the type is not provided by this service, return null. Otherwise return an appropriate instance of NumberFormat.

Draft:
This API may be changed in the future versions and was introduced in ICU 2.6

virtual const UnicodeString* NumberFormatFactory::getSupportedIDs int32_t count,
UErrorCode status
const [pure virtual]
 

Return the locale names directly supported by this factory.

The number of names is returned in count;

Draft:
This API may be changed in the future versions and was introduced in ICU 2.6

Implemented in SimpleNumberFormatFactory.

virtual UBool NumberFormatFactory::visible void   )  const [pure virtual]
 

Return true if this factory will be visible.

Default is true. If not visible, the locales supported by this factory will not be listed by getAvailableLocales.

Draft:
This API may be changed in the future versions and was introduced in ICU 2.6

Implemented in SimpleNumberFormatFactory.


The documentation for this class was generated from the following file:
Generated on Fri Jun 18 12:36:31 2004 for ICU by doxygen 1.3.7