Logo Search packages:      
Sourcecode: icu version File versions  Download package

StringMatcher Class Reference

#include <strmatch.h>

Inheritance diagram for StringMatcher:

UnicodeFunctor UnicodeMatcher UnicodeReplacer UObject UMemory

List of all members.


Detailed Description

An object that matches a fixed input string, implementing the UnicodeMatcher API. This object also implements the UnicodeReplacer API, allowing it to emit the matched text as output. Since the match text may contain flexible match elements, such as UnicodeSets, the emitted text is not the match pattern, but instead a substring of the actual matched text. Following convention, the output text is the leftmost match seen up to this point.

A StringMatcher may represent a segment, in which case it has a positive segment number. This affects how the matcher converts itself to a pattern but does not otherwise affect its function.

A StringMatcher that is not a segment should not be used as a UnicodeReplacer.

Definition at line 42 of file strmatch.h.


Public Member Functions

virtual void addMatchSetTo (UnicodeSet &toUnionTo) const
virtual void addReplacementSetTo (UnicodeSet &toUnionTo) const
virtual UnicodeFunctorclone () const
virtual UClassID getDynamicClassID () const
virtual UMatchDegree matches (const Replaceable &text, int32_t &offset, int32_t limit, UBool incremental)
virtual UBool matchesIndexValue (uint8_t v) const
virtual int32_t replace (Replaceable &text, int32_t start, int32_t limit, int32_t &cursor)
void resetMatch ()
virtual void setData (const TransliterationRuleData *)
 StringMatcher (const StringMatcher &o)
 StringMatcher (const UnicodeString &string, int32_t start, int32_t limit, int32_t segmentNum, const TransliterationRuleData &data)
virtual UnicodeMatchertoMatcher () const
virtual UnicodeStringtoPattern (UnicodeString &result, UBool escapeUnprintable=FALSE) const
virtual UnicodeReplacertoReplacer () const
virtual UnicodeStringtoReplacerPattern (UnicodeString &result, UBool escapeUnprintable) const
virtual ~StringMatcher ()

Static Public Member Functions

static UClassID U_EXPORT2 getStaticClassID ()
static void U_EXPORT2 operator delete (void *, void *) U_NO_THROW
static void U_EXPORT2 operator delete (void *p) U_NO_THROW
static void U_EXPORT2 operator delete[] (void *p) U_NO_THROW
static void *U_EXPORT2 operator new (size_t, void *ptr) U_NO_THROW
static void *U_EXPORT2 operator new (size_t size) U_NO_THROW
static void *U_EXPORT2 operator new[] (size_t size) U_NO_THROW

Private Attributes

const TransliterationRuleDatadata
int32_t matchLimit
int32_t matchStart
UnicodeString pattern
int32_t segmentNumber

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index