ICU 60.2 60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

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
21 U_NAMESPACE_BEGIN
22
23 class Replaceable;
24 class UnicodeString;
25 class UnicodeSet;
26
32 enum UMatchDegree {
40 U_MISMATCH,
41
52 U_PARTIAL_MATCH,
53
62 U_MATCH
63 };
64
70 class U_COMMON_API UnicodeMatcher /* not : public UObject because this is an interface/mixin class */ {
71
72 public:
77 virtual ~UnicodeMatcher();
78
125 virtual UMatchDegree matches(const Replaceable& text,
126 int32_t& offset,
127 int32_t limit,
128 UBool incremental) = 0;
129
142 virtual UnicodeString& toPattern(UnicodeString& result,
143 UBool escapeUnprintable = FALSE) const = 0;
144
152 virtual UBool matchesIndexValue(uint8_t v) const = 0;
153
160 virtual void addMatchSetTo(UnicodeSet& toUnionTo) const = 0;
161 };
162
163 U_NAMESPACE_END
164
165 #endif
icu::U_MISMATCH
Constant returned by matches() indicating a mismatch between the text and this matcher.
Definition: unimatch.h:40
icu::UnicodeMatcher
UnicodeMatcher defines a protocol for objects that can match a range of characters in a Replaceable s...
Definition: unimatch.h:70
icu::U_MATCH
Constant returned by matches() indicating a complete match between the text and this matcher...
Definition: unimatch.h:62
icu::UMatchDegree
UMatchDegree
Constants returned by UnicodeMatcher::matches() indicating the degree of match.
Definition: unimatch.h:32
icu::U_PARTIAL_MATCH
Constant returned by matches() indicating a partial match between the text and this matcher...
Definition: unimatch.h:52
icu::Replaceable
Replaceable is an abstract base class representing a string of characters that supports the replaceme...
Definition: rep.h:73
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
icu::UnicodeSet
A mutable set of Unicode characters and multicharacter strings.
Definition: uniset.h:278
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
FALSE
#define FALSE
The FALSE value of a UBool.
Definition: umachine.h:244
U_COMMON_API
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
Definition: utypes.h:359
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:286
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:236