ICU 50.1.2  50.1.2
Public Member Functions | Static Public Member Functions | Protected Member Functions
icu::MeasureFormat Class Reference

A formatter for measure objects. More...

#include <measfmt.h>

Inheritance diagram for icu::MeasureFormat:
icu::Format icu::UObject icu::UMemory icu::TimeUnitFormat

Public Member Functions

virtual ~MeasureFormat ()
 Destructor. More...
 
- Public Member Functions inherited from icu::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...
 
- Public Member Functions inherited from icu::UObject
virtual ~UObject ()
 Destructor. More...
 
virtual UClassID getDynamicClassID () const =0
 ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. More...
 

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 icu::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

- Static Protected Member Functions inherited from icu::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

virtual icu::MeasureFormat::~MeasureFormat ( )
virtual

Destructor.

Stable:
ICU 3.0
icu::MeasureFormat::MeasureFormat ( )
protected

Default constructor.

Stable:
ICU 3.0

Member Function Documentation

static MeasureFormat* icu::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* icu::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: