ICU 56.1: unimatch.h Source File

ICU 56.1 56.1

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

- File List
- Globals

unimatch.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2001-2005, International Business Machines Corporation and others. All Rights Reserved.
3 **********************************************************************
4 * Date Name Description
5 * 07/18/01 aliu Creation.
6 **********************************************************************
7 */
8 #ifndef UNIMATCH_H
9 #define UNIMATCH_H
10
11 #include "unicode/utypes.h"
12
19 U_NAMESPACE_BEGIN
20
21 class Replaceable;
22 class UnicodeString;
23 class UnicodeSet;
24
30 enum UMatchDegree {
38 U_MISMATCH,
39
50 U_PARTIAL_MATCH,
51
60 U_MATCH
61 };
62
68 class U_COMMON_API UnicodeMatcher /* not : public UObject because this is an interface/mixin class */ {
69
70 public:
75 virtual ~UnicodeMatcher();
76
123 virtual UMatchDegree matches(const Replaceable& text,
124 int32_t& offset,
125 int32_t limit,
126 UBool incremental) = 0;
127
140 virtual UnicodeString& toPattern(UnicodeString& result,
141 UBool escapeUnprintable = FALSE) const = 0;
142
150 virtual UBool matchesIndexValue(uint8_t v) const = 0;
151
158 virtual void addMatchSetTo(UnicodeSet& toUnionTo) const = 0;
159 };
160
161 U_NAMESPACE_END
162
163 #endif
icu::U_MISMATCH
Constant returned by matches() indicating a mismatch between the text and this matcher.
Definition: unimatch.h:38
icu::UnicodeMatcher
UnicodeMatcher defines a protocol for objects that can match a range of characters in a Replaceable s...
Definition: unimatch.h:68
icu::U_MATCH
Constant returned by matches() indicating a complete match between the text and this matcher...
Definition: unimatch.h:60
icu::UMatchDegree
UMatchDegree
Constants returned by UnicodeMatcher::matches() indicating the degree of match.
Definition: unimatch.h:30
icu::U_PARTIAL_MATCH
Constant returned by matches() indicating a partial match between the text and this matcher...
Definition: unimatch.h:50
icu::Replaceable
Replaceable is an abstract base class representing a string of characters that supports the replaceme...
Definition: rep.h:71
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
icu::UnicodeSet
A mutable set of Unicode characters and multicharacter strings.
Definition: uniset.h:276
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
FALSE
#define FALSE
The FALSE value of a UBool.
Definition: umachine.h:242
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:357
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:293
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234