icu4c api proposal: StringEnumeration default implementations
Markus Scherer <[email protected]> Wed, 05 Nov 2003 09:27:51 -0800
| Newsgroups | gmane.comp.lib.icu.general |
|---|---|
| Organization | IBM |
| Message-ID | <[email protected]> |
StringEnumeration is an abstract base class (now with a trivial clone() implementation) for enumerations that provide a list of strings in C++. Most of the implementations use UnicodeString internally, which makes it easy to implement the snext() function which returns a const reference to one. unext() returns a const UChar * and next() returns a const char * - which means that the enumeration object requires invariant-character conversion in one direction or another. I propose to add default implementations for next() and unext() that call snext() and handle the conversion, to make it easier to subclass StringEnumeration. With this, there will be a few protected helper functions and variables for use by subclasses. There will also be a helper function that makes it easier to implement snext() in terms of next(). Expiration: Wednesday, 2003-nov-12 Sincerely, markus