ICU 4.8.1.1  4.8.1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | Protected Member Functions
MeasureFormat Class Reference

A formatter for measure objects. More...

#include <measfmt.h>

Inheritance diagram for MeasureFormat:
Format UObject UMemory TimeUnitFormat

Static Public Member Functions

static MeasureFormatcreateCurrencyFormat (const Locale &locale, UErrorCode &ec)
 Return a formatter for CurrencyAmount objects in the given locale. More...
 
static MeasureFormatcreateCurrencyFormat (UErrorCode &ec)
 Return a formatter for CurrencyAmount objects in the default locale. More...
 

Protected Member Functions

 MeasureFormat ()
 Default constructor. More...
 
- Protected Member Functions inherited from Format
void setLocaleIDs (const char *valid, const char *actual)
 
 Format ()
 Default constructor for subclass use only. More...
 
 Format (const Format &)
 
Formatoperator= (const Format &)
 

Additional Inherited Members

- Public Member Functions inherited from Format
virtual ~Format ()
 Destructor. More...
 
virtual UBool operator== (const Format &other) const =0
 Return true if the given Format objects are semantically equal. More...
 
UBool operator!= (const Format &other) const
 Return true if the given Format objects are not semantically equal. More...
 
virtual Formatclone () const =0
 Clone this object polymorphically. More...
 
UnicodeStringformat (const Formattable &obj, UnicodeString &appendTo, UErrorCode &status) const
 Formats an object to produce a string. More...
 
virtual UnicodeStringformat (const Formattable &obj, UnicodeString &appendTo, FieldPosition &pos, UErrorCode &status) const =0
 Format an object to produce a string. More...
 
virtual UnicodeStringformat (const Formattable &obj, UnicodeString &appendTo, FieldPositionIterator *posIter, UErrorCode &status) const
 Format an object to produce a string. More...
 
virtual void parseObject (const UnicodeString &source, Formattable &result, ParsePosition &parse_pos) const =0
 Parse a string to produce an object. More...
 
void parseObject (const UnicodeString &source, Formattable &result, UErrorCode &status) const
 Parses a string to produce an object. More...
 
Locale getLocale (ULocDataLocaleType type, UErrorCode &status) const
 Get the locale for this format object. More...
 
const char * getLocaleID (ULocDataLocaleType type, UErrorCode &status) const
 Get the locale for this format object. More...
 
- Static Protected Member Functions inherited from Format
static void syntaxError (const UnicodeString &pattern, int32_t pos, UParseError &parseError)
 Simple function for initializing a UParseError from a UnicodeString. More...
 

Detailed Description

A formatter for measure objects.

This is an abstract base class.

To format or parse a measure object, first create a formatter object using a MeasureFormat factory method. Then use that object's format and parse methods.

This is an abstract class.

See Also
Format
Author
Alan Liu
Stable:
ICU 3.0

Definition at line 41 of file measfmt.h.

Constructor & Destructor Documentation

MeasureFormat::MeasureFormat ( )
protected

Default constructor.

Stable:
ICU 3.0

Member Function Documentation

static MeasureFormat* MeasureFormat::createCurrencyFormat ( const Locale locale,
UErrorCode ec 
)
static

Return a formatter for CurrencyAmount objects in the given locale.

Parameters
localedesired locale
ecinput-output error code
Returns
a formatter object, or NULL upon error
Stable:
ICU 3.0
static MeasureFormat* MeasureFormat::createCurrencyFormat ( UErrorCode ec)
static

Return a formatter for CurrencyAmount objects in the default locale.

Parameters
ecinput-output error code
Returns
a formatter object, or NULL upon error
Stable:
ICU 3.0

The documentation for this class was generated from the following file: