ICU 62.1 62.1
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
19
37 public:
43
57
58#ifndef U_HIDE_DEPRECATED_API
68#endif /* U_HIDE_DEPRECATED_API */
69
70#ifndef U_HIDE_DRAFT_API
79#endif /* U_HIDE_DRAFT_API */
80
91 virtual UBool suppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
92
104 virtual UBool unsuppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
105
115 virtual BreakIterator *build(BreakIterator* adoptBreakIterator, UErrorCode& status) = 0;
116
117#ifndef U_HIDE_DRAFT_API
131 inline BreakIterator *wrapIteratorWithFilter(BreakIterator* adoptBreakIterator, UErrorCode& status) {
132 return build(adoptBreakIterator, status);
133 }
134#endif /* U_HIDE_DRAFT_API */
135
136 protected:
142};
143
144
146
147#endif // #if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION
148
149#endif // #ifndef FILTEREDBRK_H
C++ API: Break Iterator.
The BreakIterator class implements methods for finding the location of boundaries in text.
Definition brkiter.h:102
The BreakIteratorFilter is used to modify the behavior of a BreakIterator by constructing a new Break...
Definition filteredbrk.h:36
static FilteredBreakIteratorBuilder * createEmptyInstance(UErrorCode &status)
Construct an empty FilteredBreakIteratorBuilder.
virtual UBool unsuppressBreakAfter(const UnicodeString &string, UErrorCode &status)=0
Stop suppressing a certain string from being the end of the segment.
FilteredBreakIteratorBuilder()
For subclass use.
virtual UBool suppressBreakAfter(const UnicodeString &string, UErrorCode &status)=0
Suppress a certain string from being the end of a segment.
BreakIterator * wrapIteratorWithFilter(BreakIterator *adoptBreakIterator, UErrorCode &status)
Wrap (adopt) an existing break iterator in a new filtered instance.
virtual BreakIterator * build(BreakIterator *adoptBreakIterator, UErrorCode &status)=0
This function has been deprecated in favor of wrapIteratorWithFilter() The behavior is identical.
static FilteredBreakIteratorBuilder * createInstance(const Locale &where, UErrorCode &status)
Construct a FilteredBreakIteratorBuilder based on rules in a locale.
static FilteredBreakIteratorBuilder * createInstance(UErrorCode &status)
This function has been deprecated in favor of createEmptyInstance, which has identical behavior.
virtual ~FilteredBreakIteratorBuilder()
destructor.
A Locale object represents a specific geographical, political, or cultural region.
Definition locid.h:188
UObject is the common ICU "boilerplate" class.
Definition uobject.h:223
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition unistr.h:287
int8_t UBool
The ICU boolean type.
Definition umachine.h:236
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition utypes.h:396
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside.
Definition utypes.h:359
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:138
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:137