michael@0: /* michael@0: ********************************************************************** michael@0: * Copyright (c) 2004-2011, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ********************************************************************** michael@0: * Author: Alan Liu michael@0: * Created: April 20, 2004 michael@0: * Since: ICU 3.0 michael@0: ********************************************************************** michael@0: */ michael@0: #ifndef MEASUREFORMAT_H michael@0: #define MEASUREFORMAT_H michael@0: michael@0: #include "unicode/utypes.h" michael@0: michael@0: #if !UCONFIG_NO_FORMATTING michael@0: michael@0: #include "unicode/format.h" michael@0: michael@0: /** michael@0: * \file michael@0: * \brief C++ API: Formatter for measure objects. michael@0: */ michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: michael@0: /** michael@0: * michael@0: * A formatter for measure objects. This is an abstract base class. michael@0: * michael@0: *
To format or parse a measure object, first create a formatter michael@0: * object using a MeasureFormat factory method. Then use that michael@0: * object's format and parse methods. michael@0: * michael@0: *
This is an abstract class. michael@0: * michael@0: * @see Format michael@0: * @author Alan Liu michael@0: * @stable ICU 3.0 michael@0: */ michael@0: class U_I18N_API MeasureFormat : public Format { michael@0: public: michael@0: /** michael@0: * Destructor. michael@0: * @stable ICU 3.0 michael@0: */ michael@0: virtual ~MeasureFormat(); michael@0: michael@0: /** michael@0: * Return a formatter for CurrencyAmount objects in the given michael@0: * locale. michael@0: * @param locale desired locale michael@0: * @param ec input-output error code michael@0: * @return a formatter object, or NULL upon error michael@0: * @stable ICU 3.0 michael@0: */ michael@0: static MeasureFormat* U_EXPORT2 createCurrencyFormat(const Locale& locale, michael@0: UErrorCode& ec); michael@0: michael@0: /** michael@0: * Return a formatter for CurrencyAmount objects in the default michael@0: * locale. michael@0: * @param ec input-output error code michael@0: * @return a formatter object, or NULL upon error michael@0: * @stable ICU 3.0 michael@0: */ michael@0: static MeasureFormat* U_EXPORT2 createCurrencyFormat(UErrorCode& ec); michael@0: michael@0: protected: michael@0: michael@0: /** michael@0: * Default constructor. michael@0: * @stable ICU 3.0 michael@0: */ michael@0: MeasureFormat(); michael@0: }; michael@0: michael@0: U_NAMESPACE_END michael@0: michael@0: #endif // #if !UCONFIG_NO_FORMATTING michael@0: #endif // #ifndef MEASUREFORMAT_H