Loading...
Searching...
No Matches
filteredbrk.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
********************************************************************************
* Copyright (C) 1997-2015, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*/
#ifndef FILTEREDBRK_H
#define FILTEREDBRK_H
#include "unicode/utypes.h"
#if U_SHOW_CPLUSPLUS_API
#include "unicode/brkiter.h"
#if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION
U_NAMESPACE_BEGIN
class U_COMMON_API FilteredBreakIteratorBuilder : public UObject {
public:
virtual ~FilteredBreakIteratorBuilder();
static FilteredBreakIteratorBuilder *createInstance(const Locale& where, UErrorCode& status);
#ifndef U_HIDE_DEPRECATED_API
static FilteredBreakIteratorBuilder *createInstance(UErrorCode &status);
#endif /* U_HIDE_DEPRECATED_API */
static FilteredBreakIteratorBuilder *createEmptyInstance(UErrorCode &status);
virtual UBool suppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
virtual UBool unsuppressBreakAfter(const UnicodeString& string, UErrorCode& status) = 0;
#ifndef U_FORCE_HIDE_DEPRECATED_API
virtual BreakIterator *build(BreakIterator* adoptBreakIterator, UErrorCode& status) = 0;
#endif // U_FORCE_HIDE_DEPRECATED_API
inline BreakIterator *wrapIteratorWithFilter(BreakIterator* adoptBreakIterator, UErrorCode& status) {
return build(adoptBreakIterator, status);
}
protected:
FilteredBreakIteratorBuilder();
};
U_NAMESPACE_END
#endif // #if !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILTERED_BREAK_ITERATION
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // #ifndef FILTEREDBRK_H
brkiter.h
C++ API: Break Iterator.
icu::BreakIterator
The BreakIterator class implements methods for finding the location of boundaries in text.
Definition brkiter.h:106
icu::FilteredBreakIteratorBuilder::createEmptyInstance
static FilteredBreakIteratorBuilder * createEmptyInstance(UErrorCode &status)
Construct an empty FilteredBreakIteratorBuilder.
icu::FilteredBreakIteratorBuilder::unsuppressBreakAfter
virtual UBool unsuppressBreakAfter(const UnicodeString &string, UErrorCode &status)=0
Stop suppressing a certain string from being the end of the segment.
icu::FilteredBreakIteratorBuilder::FilteredBreakIteratorBuilder
FilteredBreakIteratorBuilder()
For subclass use.
icu::FilteredBreakIteratorBuilder::suppressBreakAfter
virtual UBool suppressBreakAfter(const UnicodeString &string, UErrorCode &status)=0
Suppress a certain string from being the end of a segment.
icu::FilteredBreakIteratorBuilder::wrapIteratorWithFilter
BreakIterator * wrapIteratorWithFilter(BreakIterator *adoptBreakIterator, UErrorCode &status)
Wrap (adopt) an existing break iterator in a new filtered instance.
Definition filteredbrk.h:133
icu::FilteredBreakIteratorBuilder::build
virtual BreakIterator * build(BreakIterator *adoptBreakIterator, UErrorCode &status)=0
This function has been deprecated in favor of wrapIteratorWithFilter() The behavior is identical.
icu::FilteredBreakIteratorBuilder::createInstance
static FilteredBreakIteratorBuilder * createInstance(const Locale &where, UErrorCode &status)
Construct a FilteredBreakIteratorBuilder based on rules in a locale.
icu::FilteredBreakIteratorBuilder::createInstance
static FilteredBreakIteratorBuilder * createInstance(UErrorCode &status)
This function has been deprecated in favor of createEmptyInstance, which has identical behavior.
icu::FilteredBreakIteratorBuilder::~FilteredBreakIteratorBuilder
virtual ~FilteredBreakIteratorBuilder()
destructor.
icu::Locale
A Locale object represents a specific geographical, political, or cultural region.
Definition locid.h:198
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition uobject.h:222
icu::UnicodeString
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition unistr.h:303
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition umachine.h:269
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition utypes.h:509
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:315