ICU 55.1  55.1
unirepl.h
Go to the documentation of this file.
1 /*
2 **********************************************************************
3 * Copyright (c) 2002-2005, International Business Machines Corporation
4 * and others. All Rights Reserved.
5 **********************************************************************
6 * Date Name Description
7 * 01/14/2002 aliu Creation.
8 **********************************************************************
9 */
10 #ifndef UNIREPL_H
11 #define UNIREPL_H
12 
13 #include "unicode/utypes.h"
14 
21 
22 class Replaceable;
23 class UnicodeString;
24 class UnicodeSet;
25 
36 class U_I18N_API UnicodeReplacer /* not : public UObject because this is an interface/mixin class */ {
37 
38  public:
39 
44  virtual ~UnicodeReplacer();
45 
64  virtual int32_t replace(Replaceable& text,
65  int32_t start,
66  int32_t limit,
67  int32_t& cursor) = 0;
68 
84  UBool escapeUnprintable) const = 0;
85 
92  virtual void addReplacementSetTo(UnicodeSet& toUnionTo) const = 0;
93 };
94 
96 
97 #endif
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
icu::UnicodeSet
A mutable set of Unicode characters and multicharacter strings.
Definition: uniset.h:276
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:358
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234
icu::Replaceable
Replaceable is an abstract base class representing a string of characters that supports the replaceme...
Definition: rep.h:71
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::~UnicodeReplacer
virtual ~UnicodeReplacer()
Destructor.
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:246
icu::UnicodeReplacer::toReplacerPattern
virtual UnicodeString & toReplacerPattern(UnicodeString &result, UBool escapeUnprintable) const =0
Returns a string representation of this replacer.
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 defines a protocol for objects that replace a range of characters in a Replaceable st...
Definition: unirepl.h:36
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129