2004-04-21 18:05:06 +00:00
|
|
|
/*
|
|
|
|
**********************************************************************
|
|
|
|
* Copyright (c) 2004, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
**********************************************************************
|
|
|
|
* Author: Alan Liu
|
|
|
|
* Created: April 20, 2004
|
|
|
|
* Since: ICU 3.0
|
|
|
|
**********************************************************************
|
|
|
|
*/
|
|
|
|
#ifndef MEASUREFORMAT_H
|
|
|
|
#define MEASUREFORMAT_H
|
|
|
|
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
|
|
|
|
#if !UCONFIG_NO_FORMATTING
|
|
|
|
|
|
|
|
#include "unicode/format.h"
|
|
|
|
|
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A formatter for measure objects. This is an abstract base class.
|
|
|
|
*
|
|
|
|
* <p>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.
|
|
|
|
*
|
2004-04-28 00:12:33 +00:00
|
|
|
* <p>This is an abstract class.
|
|
|
|
*
|
2004-04-21 18:05:06 +00:00
|
|
|
* @see Format
|
|
|
|
* @author Alan Liu
|
|
|
|
* @draft ICU 3.0
|
|
|
|
*/
|
|
|
|
class U_I18N_API MeasureFormat : public Format {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return a formatter for CurrencyAmount objects in the given
|
|
|
|
* locale.
|
|
|
|
* @param locale desired locale
|
|
|
|
* @param ec input-output error code
|
|
|
|
* @return a formatter object, or NULL upon error
|
|
|
|
* @draft ICU 3.0
|
|
|
|
*/
|
2004-08-24 17:38:33 +00:00
|
|
|
static MeasureFormat* U_EXPORT2 createCurrencyFormat(const Locale& locale,
|
2004-04-21 18:05:06 +00:00
|
|
|
UErrorCode& ec);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return a formatter for CurrencyAmount objects in the default
|
|
|
|
* locale.
|
|
|
|
* @param ec input-output error code
|
|
|
|
* @return a formatter object, or NULL upon error
|
|
|
|
* @draft ICU 3.0
|
|
|
|
*/
|
2004-08-24 17:38:33 +00:00
|
|
|
static MeasureFormat* U_EXPORT2 createCurrencyFormat(UErrorCode& ec);
|
2004-04-28 00:12:33 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default constructor.
|
|
|
|
* @draft ICU 3.0
|
|
|
|
*/
|
|
|
|
MeasureFormat();
|
2004-04-21 18:05:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
U_NAMESPACE_END
|
|
|
|
|
|
|
|
#endif // #if !UCONFIG_NO_FORMATTING
|
|
|
|
#endif // #ifndef MEASUREFORMAT_H
|