diff options
author | Steven R. Loomis <srloomis@us.ibm.com> | 2016-04-08 19:03:16 -0700 |
---|---|---|
committer | Steven R. Loomis <srloomis@us.ibm.com> | 2016-05-04 16:02:45 -0700 |
commit | 2bbd1cd6004b3e1467e30d860385a85dad01fe24 (patch) | |
tree | b812046e89e46e0de09bc858e0b128787cbc0632 /deps/icu-small/source/i18n/funcrepl.h | |
parent | cd752e8463fad7c4805951d9ba47cd2f39691f2d (diff) | |
download | android-node-v8-2bbd1cd6004b3e1467e30d860385a85dad01fe24.tar.gz android-node-v8-2bbd1cd6004b3e1467e30d860385a85dad01fe24.tar.bz2 android-node-v8-2bbd1cd6004b3e1467e30d860385a85dad01fe24.zip |
deps: Intl: Check in "small-icu" 57.1
* this commit has "small" ICU 57.1.
See other related commit for tools to generate this commit.
Fixes: https://github.com/nodejs/node/issues/3476
PR-URL: https://github.com/nodejs/node/pull/6088
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/icu-small/source/i18n/funcrepl.h')
-rw-r--r-- | deps/icu-small/source/i18n/funcrepl.h | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/deps/icu-small/source/i18n/funcrepl.h b/deps/icu-small/source/i18n/funcrepl.h new file mode 100644 index 0000000000..ff00b55abf --- /dev/null +++ b/deps/icu-small/source/i18n/funcrepl.h @@ -0,0 +1,119 @@ +/* +********************************************************************** +* Copyright (c) 2002-2011, International Business Machines Corporation +* and others. All Rights Reserved. +********************************************************************** +* Date Name Description +* 02/04/2002 aliu Creation. +********************************************************************** +*/ + +#ifndef FUNCREPL_H +#define FUNCREPL_H + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_TRANSLITERATION + +#include "unicode/unifunct.h" +#include "unicode/unirepl.h" + +U_NAMESPACE_BEGIN + +class Transliterator; + +/** + * A replacer that calls a transliterator to generate its output text. + * The input text to the transliterator is the output of another + * UnicodeReplacer object. That is, this replacer wraps another + * replacer with a transliterator. + * + * @author Alan Liu + */ +class FunctionReplacer : public UnicodeFunctor, public UnicodeReplacer { + + private: + + /** + * The transliterator. Must not be null. OWNED. + */ + Transliterator* translit; + + /** + * The replacer object. This generates text that is then + * processed by 'translit'. Must not be null. OWNED. + */ + UnicodeFunctor* replacer; + + public: + + /** + * Construct a replacer that takes the output of the given + * replacer, passes it through the given transliterator, and emits + * the result as output. + */ + FunctionReplacer(Transliterator* adoptedTranslit, + UnicodeFunctor* adoptedReplacer); + + /** + * Copy constructor. + */ + FunctionReplacer(const FunctionReplacer& other); + + /** + * Destructor + */ + virtual ~FunctionReplacer(); + + /** + * Implement UnicodeFunctor + */ + virtual UnicodeFunctor* clone() const; + + /** + * UnicodeFunctor API. Cast 'this' to a UnicodeReplacer* pointer + * and return the pointer. + */ + virtual UnicodeReplacer* toReplacer() const; + + /** + * UnicodeReplacer API + */ + virtual int32_t replace(Replaceable& text, + int32_t start, + int32_t limit, + int32_t& cursor); + + /** + * UnicodeReplacer API + */ + virtual UnicodeString& toReplacerPattern(UnicodeString& rule, + UBool escapeUnprintable) const; + + /** + * Implement UnicodeReplacer + */ + virtual void addReplacementSetTo(UnicodeSet& toUnionTo) const; + + /** + * UnicodeFunctor API + */ + virtual void setData(const TransliterationRuleData*); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + */ + static UClassID U_EXPORT2 getStaticClassID(); +}; + +U_NAMESPACE_END + +#endif /* #if !UCONFIG_NO_TRANSLITERATION */ +#endif + +//eof |