intl/icu/source/i18n/uni2name.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/icu/source/i18n/uni2name.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,87 @@
     1.4 +/*
     1.5 +**********************************************************************
     1.6 +*   Copyright (C) 2001-2007, International Business Machines
     1.7 +*   Corporation and others.  All Rights Reserved.
     1.8 +**********************************************************************
     1.9 +*   Date        Name        Description
    1.10 +*   06/06/01    aliu        Creation.
    1.11 +**********************************************************************
    1.12 +*/
    1.13 +#ifndef UNI2NAME_H
    1.14 +#define UNI2NAME_H
    1.15 +
    1.16 +#include "unicode/utypes.h"
    1.17 +
    1.18 +#if !UCONFIG_NO_TRANSLITERATION
    1.19 +
    1.20 +#include "unicode/translit.h"
    1.21 +
    1.22 +U_NAMESPACE_BEGIN
    1.23 +
    1.24 +/**
    1.25 + * A transliterator that performs character to name mapping.
    1.26 + * It generates the Perl syntax \N{name}.
    1.27 + * @author Alan Liu
    1.28 + */
    1.29 +class UnicodeNameTransliterator : public Transliterator {
    1.30 +
    1.31 + public:
    1.32 +
    1.33 +    /**
    1.34 +     * Constructs a transliterator.
    1.35 +     * @param adoptedFilter the filter to be adopted.
    1.36 +     */
    1.37 +    UnicodeNameTransliterator(UnicodeFilter* adoptedFilter = 0);
    1.38 +
    1.39 +    /**
    1.40 +     * Destructor.
    1.41 +     */
    1.42 +    virtual ~UnicodeNameTransliterator();
    1.43 +
    1.44 +    /**
    1.45 +     * Copy constructor.
    1.46 +     */
    1.47 +    UnicodeNameTransliterator(const UnicodeNameTransliterator&);
    1.48 +
    1.49 +    /**
    1.50 +     * Transliterator API.
    1.51 +     */
    1.52 +    virtual Transliterator* clone(void) const;
    1.53 +
    1.54 +    /**
    1.55 +     * ICU "poor man's RTTI", returns a UClassID for the actual class.
    1.56 +     */
    1.57 +    virtual UClassID getDynamicClassID() const;
    1.58 +
    1.59 +    /**
    1.60 +     * ICU "poor man's RTTI", returns a UClassID for this class.
    1.61 +     */
    1.62 +    U_I18N_API static UClassID U_EXPORT2 getStaticClassID();
    1.63 +
    1.64 + protected:
    1.65 +
    1.66 +    /**
    1.67 +     * Implements {@link Transliterator#handleTransliterate}.
    1.68 +     * @param text        the buffer holding transliterated and
    1.69 +     *                    untransliterated text
    1.70 +     * @param offset      the start and limit of the text, the position
    1.71 +     *                    of the cursor, and the start and limit of transliteration.
    1.72 +     * @param incremental if true, assume more text may be coming after
    1.73 +     *                    pos.contextLimit.  Otherwise, assume the text is complete.
    1.74 +     */
    1.75 +    virtual void handleTransliterate(Replaceable& text, UTransPosition& offset,
    1.76 +                                     UBool isIncremental) const;
    1.77 +
    1.78 +private:
    1.79 +    /**
    1.80 +     * Assignment operator.
    1.81 +     */
    1.82 +    UnicodeNameTransliterator& operator=(const UnicodeNameTransliterator&);
    1.83 +
    1.84 +};
    1.85 +
    1.86 +U_NAMESPACE_END
    1.87 +
    1.88 +#endif /* #if !UCONFIG_NO_TRANSLITERATION */
    1.89 +
    1.90 +#endif

mercurial