1999-12-28 23:57:50 +00:00
|
|
|
/*
|
2001-03-22 00:09:10 +00:00
|
|
|
* Copyright (C) 1999, International Business Machines Corporation and others. All Rights Reserved.
|
1999-12-28 23:57:50 +00:00
|
|
|
**********************************************************************
|
|
|
|
* Date Name Description
|
|
|
|
* 11/17/99 aliu Creation.
|
|
|
|
**********************************************************************
|
|
|
|
*/
|
|
|
|
#ifndef UNIFILT_H
|
|
|
|
#define UNIFILT_H
|
|
|
|
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* <code>UnicodeFilter</code> defines a protocol for selecting a
|
|
|
|
* subset of the full range (U+0000 to U+FFFF) of Unicode characters.
|
|
|
|
* Currently, filters are used in conjunction with classes like {@link
|
|
|
|
* Transliterator} to only process selected characters through a
|
|
|
|
* transformation.
|
|
|
|
*
|
|
|
|
* @see UnicodeFilterLogic
|
2000-03-22 19:19:33 +00:00
|
|
|
* @draft
|
1999-12-28 23:57:50 +00:00
|
|
|
*/
|
|
|
|
class U_I18N_API UnicodeFilter {
|
|
|
|
|
|
|
|
public:
|
2000-03-22 19:19:33 +00:00
|
|
|
/**
|
2001-03-22 00:09:10 +00:00
|
|
|
* Destructor
|
2000-03-22 19:19:33 +00:00
|
|
|
* @draft */
|
1999-12-28 23:57:50 +00:00
|
|
|
virtual ~UnicodeFilter();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns <tt>true</tt> for characters that are in the selected
|
|
|
|
* subset. In other words, if a character is <b>to be
|
2000-01-18 20:00:56 +00:00
|
|
|
* filtered</b>, then <tt>contains()</tt> returns
|
1999-12-28 23:57:50 +00:00
|
|
|
* <b><tt>false</tt></b>.
|
2000-03-22 19:19:33 +00:00
|
|
|
* @draft
|
1999-12-28 23:57:50 +00:00
|
|
|
*/
|
2000-05-18 22:08:39 +00:00
|
|
|
virtual UBool contains(UChar c) const = 0;
|
1999-12-28 23:57:50 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a copy of this object. All UnicodeFilter objects have
|
|
|
|
* to support cloning in order to allow classes using
|
|
|
|
* UnicodeFilters, such as Transliterator, to implement cloning.
|
2000-03-22 19:19:33 +00:00
|
|
|
* @draft
|
1999-12-28 23:57:50 +00:00
|
|
|
*/
|
|
|
|
virtual UnicodeFilter* clone() const = 0;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
UnicodeFilter();
|
|
|
|
};
|
|
|
|
|
|
|
|
inline UnicodeFilter::UnicodeFilter() {}
|
|
|
|
inline UnicodeFilter::~UnicodeFilter() {}
|
|
|
|
|
|
|
|
#endif
|