#include <caniter.h>
Inheritance diagram for CanonicalIterator:
Public Member Functions | |
CanonicalIterator (const UnicodeString &source, UErrorCode &status) | |
Construct a CanonicalIterator object. | |
~CanonicalIterator () | |
Destructor Cleans pieces ICU 2.4. | |
UnicodeString | getSource () |
Gets the NFD form of the current source we are iterating over. | |
void | reset () |
Resets the iterator so that one can start again from the beginning. | |
UnicodeString | next () |
Get the next canonically equivalent string. | |
void | setSource (const UnicodeString &newSource, UErrorCode &status) |
Set a new source for this iterator. | |
virtual UClassID | getDynamicClassID () const |
ICU "poor man's RTTI", returns a UClassID for the actual class. | |
Static Public Member Functions | |
void | permute (UnicodeString &source, UBool skipZeros, Hashtable *result, UErrorCode &status) |
Dumb recursive implementation of permutation. | |
UClassID | getStaticClassID () |
ICU "poor man's RTTI", returns a UClassID for this class. |
For example, here are some sample results: Results for: {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 1: = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 2: = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} 3: = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} 4: = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE} 5: = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 6: = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} 7: = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} 8: = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE} 9: = {ANGSTROM SIGN}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 10: = {ANGSTROM SIGN}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} 11: = {ANGSTROM SIGN}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} 12: = {ANGSTROM SIGN}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE}
Note: the code is intended for use with small strings, and is not suitable for larger ones, since it has not been optimized for that situation. Note, CanonicalIterator is not intended to be subclassed.
C++ port by V. Weinstein ICU 2.4
|
Construct a CanonicalIterator object.
|
|
ICU "poor man's RTTI", returns a UClassID for the actual class. ICU 2.2 Implements UObject. |
|
Gets the NFD form of the current source we are iterating over.
|
|
ICU "poor man's RTTI", returns a UClassID for this class. ICU 2.2 |
|
Get the next canonically equivalent string.
|
|
Dumb recursive implementation of permutation. TODO: optimize
For internal use only.
|
|
Resets the iterator so that one can start again from the beginning. ICU 2.4 |
|
Set a new source for this iterator. Allows object reuse.
|