unirepl.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
* Copyright (c) 2002-2005, International Business Machines Corporation
* and others. All Rights Reserved.
**********************************************************************
* Date Name Description
* 01/14/2002 aliu Creation.
**********************************************************************
*/
#ifndef UNIREPL_H
#define UNIREPL_H
#include "unicode/utypes.h"
#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
class Replaceable;
class UnicodeString;
class UnicodeSet;
class U_I18N_API UnicodeReplacer /* not : public UObject because this is an interface/mixin class */ {
public:
virtual ~UnicodeReplacer();
virtual int32_t replace(Replaceable& text,
int32_t start,
int32_t limit,
int32_t& cursor) = 0;
virtual UnicodeString& toReplacerPattern(UnicodeString& result,
UBool escapeUnprintable) const = 0;
virtual void addReplacementSetTo(UnicodeSet& toUnionTo) const = 0;
};
U_NAMESPACE_END
#endif /* U_SHOW_CPLUSPLUS_API */
#endif
icu::Replaceable
Replaceable is an abstract base class representing a string of characters that supports the replaceme...
Definition: rep.h:77
icu::UnicodeReplacer
UnicodeReplacer defines a protocol for objects that replace a range of characters in a Replaceable st...
Definition: unirepl.h:40
icu::UnicodeReplacer::addReplacementSetTo
virtual void addReplacementSetTo(UnicodeSet &toUnionTo) const =0
Union the set of all characters that may output by this object into the given set.
icu::UnicodeReplacer::replace
virtual int32_t replace(Replaceable &text, int32_t start, int32_t limit, int32_t &cursor)=0
Replace characters in 'text' from 'start' to 'limit' with the output text of this object.
icu::UnicodeReplacer::~UnicodeReplacer
virtual ~UnicodeReplacer()
Destructor.
icu::UnicodeReplacer::toReplacerPattern
virtual UnicodeString & toReplacerPattern(UnicodeString &result, UBool escapeUnprintable) const =0
Returns a string representation of this replacer.
icu::UnicodeSet
A mutable set of Unicode characters and multicharacter strings.
Definition: uniset.h:285
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:296
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition: umachine.h:247
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition: utypes.h:316