intl/icu/source/i18n/unicode/measfmt.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/icu/source/i18n/unicode/measfmt.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,81 @@
     1.4 +/*
     1.5 +**********************************************************************
     1.6 +* Copyright (c) 2004-2011, International Business Machines
     1.7 +* Corporation and others.  All Rights Reserved.
     1.8 +**********************************************************************
     1.9 +* Author: Alan Liu
    1.10 +* Created: April 20, 2004
    1.11 +* Since: ICU 3.0
    1.12 +**********************************************************************
    1.13 +*/
    1.14 +#ifndef MEASUREFORMAT_H
    1.15 +#define MEASUREFORMAT_H
    1.16 +
    1.17 +#include "unicode/utypes.h"
    1.18 +
    1.19 +#if !UCONFIG_NO_FORMATTING
    1.20 +
    1.21 +#include "unicode/format.h"
    1.22 +
    1.23 +/**
    1.24 + * \file 
    1.25 + * \brief C++ API: Formatter for measure objects.
    1.26 + */
    1.27 +
    1.28 +U_NAMESPACE_BEGIN
    1.29 +
    1.30 +/**
    1.31 + * 
    1.32 + * A formatter for measure objects.  This is an abstract base class.
    1.33 + *
    1.34 + * <p>To format or parse a measure object, first create a formatter
    1.35 + * object using a MeasureFormat factory method.  Then use that
    1.36 + * object's format and parse methods.
    1.37 + *
    1.38 + * <p>This is an abstract class.
    1.39 + *
    1.40 + * @see Format
    1.41 + * @author Alan Liu
    1.42 + * @stable ICU 3.0
    1.43 + */
    1.44 +class U_I18N_API MeasureFormat : public Format {
    1.45 + public:
    1.46 +    /**
    1.47 +     * Destructor.
    1.48 +     * @stable ICU 3.0
    1.49 +     */
    1.50 +    virtual ~MeasureFormat();
    1.51 +
    1.52 +    /**
    1.53 +     * Return a formatter for CurrencyAmount objects in the given
    1.54 +     * locale.
    1.55 +     * @param locale desired locale
    1.56 +     * @param ec input-output error code
    1.57 +     * @return a formatter object, or NULL upon error
    1.58 +     * @stable ICU 3.0
    1.59 +     */
    1.60 +    static MeasureFormat* U_EXPORT2 createCurrencyFormat(const Locale& locale,
    1.61 +                                               UErrorCode& ec);
    1.62 +
    1.63 +    /**
    1.64 +     * Return a formatter for CurrencyAmount objects in the default
    1.65 +     * locale.
    1.66 +     * @param ec input-output error code
    1.67 +     * @return a formatter object, or NULL upon error
    1.68 +     * @stable ICU 3.0
    1.69 +     */
    1.70 +    static MeasureFormat* U_EXPORT2 createCurrencyFormat(UErrorCode& ec);
    1.71 +
    1.72 + protected:
    1.73 +
    1.74 +    /**
    1.75 +     * Default constructor.
    1.76 +     * @stable ICU 3.0
    1.77 +     */
    1.78 +    MeasureFormat();
    1.79 +};
    1.80 +
    1.81 +U_NAMESPACE_END
    1.82 +
    1.83 +#endif // #if !UCONFIG_NO_FORMATTING
    1.84 +#endif // #ifndef MEASUREFORMAT_H

mercurial