ICU 60.2 60.2

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

- File List
- Globals

filteredbrk.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 ********************************************************************************
5 * Copyright (C) 1997-2015, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 ********************************************************************************
8 */
9
10 #ifndef FILTEREDBRK_H
11 #define FILTEREDBRK_H
12
13 #include "unicode/utypes.h"
14 #include "unicode/brkiter.h"
15
16 #if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION
17
18 U_NAMESPACE_BEGIN
19
36 class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
37 public:
42 virtual ~FilteredBreakIteratorBuilder();
43
56 static FilteredBreakIteratorBuilder *createInstance(const Locale& where, UErrorCode& status);
57
58 #ifndef U_HIDE_DEPRECATED_API
59
67 static inline FilteredBreakIteratorBuilder *createInstance(UErrorCode &status) {
68 return createEmptyInstance(status);
69 }
70 #endif /* U_HIDE_DEPRECATED_API */
71
72 #ifndef U_HIDE_DRAFT_API
73
80 static FilteredBreakIteratorBuilder *createEmptyInstance(UErrorCode &status);
81 #endif /* U_HIDE_DRAFT_API */
82
93 virtual UBool suppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
94
106 virtual UBool unsuppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
107
108 #ifndef U_HIDE_DEPRECATED_API
109
118 virtual BreakIterator *build(BreakIterator* adoptBreakIterator, UErrorCode& status) = 0;
119 #endif /* U_HIDE_DEPRECATED_API */
120
121 #ifndef U_HIDE_DRAFT_API
122
135 inline BreakIterator *wrapIteratorWithFilter(BreakIterator* adoptBreakIterator, UErrorCode& status) {
136 return build(adoptBreakIterator, status);
137 }
138 #endif /* U_HIDE_DRAFT_API */
139
140 protected:
145 FilteredBreakIteratorBuilder();
146 };
147
148
149 U_NAMESPACE_END
150
151 #endif // #if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION
152
153 #endif // #ifndef FILTEREDBRK_H
brkiter.h
C++ API: Break Iterator.
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::BreakIterator
The BreakIterator class implements methods for finding the location of boundaries in text...
Definition: brkiter.h:102
icu::FilteredBreakIteratorBuilder::createInstance
static FilteredBreakIteratorBuilder * createInstance(UErrorCode &status)
This function has been deprecated in favor of createEmptyInstance, which has identical behavior...
Definition: filteredbrk.h:67
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
icu::FilteredBreakIteratorBuilder::wrapIteratorWithFilter
BreakIterator * wrapIteratorWithFilter(BreakIterator *adoptBreakIterator, UErrorCode &status)
Wrap (adopt) an existing break iterator in a new filtered instance.
Definition: filteredbrk.h:135
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:396
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
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
icu::FilteredBreakIteratorBuilder
The BreakIteratorFilter is used to modify the behavior of a BreakIterator by constructing a new Break...
Definition: filteredbrk.h:36
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:223
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:236
icu::Locale
A Locale object represents a specific geographical, political, or cultural region.
Definition: locid.h:188