ICU 71.1 71.1

unimatch.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 * Copyright (C) 2001-2005, International Business Machines Corporation and others. All Rights Reserved.
5 **********************************************************************
6 * Date Name Description
7 * 07/18/01 aliu Creation.
8 **********************************************************************
9 */
10 #ifndef UNIMATCH_H
11 #define UNIMATCH_H
12
13 #include "unicode/utypes.h"
14
20 #if U_SHOW_CPLUSPLUS_API
21
22 U_NAMESPACE_BEGIN
23
24 class Replaceable;
25 class UnicodeString;
26 class UnicodeSet;
27
33 enum UMatchDegree {
41 U_MISMATCH,
42
53 U_PARTIAL_MATCH,
54
63 U_MATCH
64 };
65
71 class U_COMMON_API UnicodeMatcher /* not : public UObject because this is an interface/mixin class */ {
72
73 public:
78 virtual ~UnicodeMatcher();
79
126 virtual UMatchDegree matches(const Replaceable& text,
127 int32_t& offset,
128 int32_t limit,
129 UBool incremental) = 0;
130
143 virtual UnicodeString& toPattern(UnicodeString& result,
144 UBool escapeUnprintable = false) const = 0;
145
153 virtual UBool matchesIndexValue(uint8_t v) const = 0;
154
161 virtual void addMatchSetTo(UnicodeSet& toUnionTo) const = 0;
162 };
163
164 U_NAMESPACE_END
165
166 #endif /* U_SHOW_CPLUSPLUS_API */
167
168 #endif
icu::UnicodeMatcher
UnicodeMatcher defines a protocol for objects that can match a range of characters in a Replaceable s...
Definition: unimatch.h:71
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:285
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition: umachine.h:269
icu::Replaceable
Replaceable is an abstract base class representing a string of characters that supports the replaceme...
Definition: rep.h:77
icu::U_PARTIAL_MATCH
@ U_PARTIAL_MATCH
Constant returned by matches() indicating a partial match between the text and this matcher.
Definition: unimatch.h:53
U_COMMON_API
#define U_COMMON_API
Definition: utypes.h:300
icu::U_MATCH
@ U_MATCH
Constant returned by matches() indicating a complete match between the text and this matcher.
Definition: unimatch.h:63
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:295
icu::UMatchDegree
UMatchDegree
Constants returned by UnicodeMatcher::matches() indicating the degree of match.
Definition: unimatch.h:33
icu::U_MISMATCH
@ U_MISMATCH
Constant returned by matches() indicating a mismatch between the text and this matcher.
Definition: unimatch.h:41