Loading...
Searching...
No Matches
unifilt.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) 1999-2010, International Business Machines Corporation and others.
* All Rights Reserved.
**********************************************************************
* Date Name Description
* 11/17/99 aliu Creation.
**********************************************************************
*/
#ifndef UNIFILT_H
#define UNIFILT_H
#include "unicode/utypes.h"
#if U_SHOW_CPLUSPLUS_API
#include "unicode/unifunct.h"
#include "unicode/unimatch.h"
U_NAMESPACE_BEGIN
#define U_ETHER ((char16_t)0xFFFF)
class U_COMMON_API UnicodeFilter : public UnicodeFunctor, public UnicodeMatcher {
public:
virtual ~UnicodeFilter();
virtual UnicodeFilter* clone() const override = 0;
virtual UBool contains(UChar32 c) const = 0;
virtual UnicodeMatcher* toMatcher() const override;
virtual UMatchDegree matches(const Replaceable& text,
int32_t& offset,
int32_t limit,
UBool incremental) override;
virtual void setData(const TransliterationRuleData*) override;
static UClassID U_EXPORT2 getStaticClassID();
protected:
/*
* Since this class has pure virtual functions,
* a constructor can't be used.
* @stable ICU 2.0
*/
/* UnicodeFilter();*/
};
/*inline UnicodeFilter::UnicodeFilter() {}*/
U_NAMESPACE_END
#endif /* U_SHOW_CPLUSPLUS_API */
#endif
icu::Replaceable
Replaceable is an abstract base class representing a string of characters that supports the replaceme...
Definition rep.h:77
icu::UnicodeFilter
UnicodeFilter defines a protocol for selecting a subset of the full range (U+0000 to U+10FFFF) of Uni...
Definition unifilt.h:65
icu::UnicodeFilter::setData
virtual void setData(const TransliterationRuleData *) override
UnicodeFunctor API.
icu::UnicodeFilter::getStaticClassID
static UClassID getStaticClassID()
ICU "poor man's RTTI", returns a UClassID for this class.
icu::UnicodeFilter::clone
virtual UnicodeFilter * clone() const override=0
Clones this object polymorphically.
icu::UnicodeFilter::~UnicodeFilter
virtual ~UnicodeFilter()
Destructor.
icu::UnicodeFilter::matches
virtual UMatchDegree matches(const Replaceable &text, int32_t &offset, int32_t limit, UBool incremental) override
Implement UnicodeMatcher API.
icu::UnicodeFilter::toMatcher
virtual UnicodeMatcher * toMatcher() const override
UnicodeFunctor API.
icu::UnicodeFilter::contains
virtual UBool contains(UChar32 c) const =0
Returns true for characters that are in the selected subset.
icu::UnicodeFunctor
UnicodeFunctor is an abstract base class for objects that perform match and/or replace operations on ...
Definition unifunct.h:38
icu::UnicodeMatcher
UnicodeMatcher defines a protocol for objects that can match a range of characters in a Replaceable s...
Definition unimatch.h:71
icu::UMatchDegree
UMatchDegree
Constants returned by UnicodeMatcher::matches() indicating the degree of match.
Definition unimatch.h:33
UChar32
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition umachine.h:449
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition umachine.h:269
unifunct.h
C++ API: Unicode Functor.
unimatch.h
C++ API: Unicode Matcher.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition uobject.h:96
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:315