|
From: Frank V. C. <fr...@co...> - 2000-01-23 15:59:59
|
Joe Nelson wrote:
>
> > If we just use Unicode then we either have to use another library, or
> > create one. What we originally proposed was to abstract the interface
> > and then provide some means to let users (developers) adapt another
> > string implementation to our interface. This is more complex but allows
> >
> > 1. For CoreLinux++ we can implement classes that use the String
> > abstraction. This way we are confident (as much as can be) that the
> > developers choice of string implementation won't break us (see Adapter).
> >
> > 2. String implementations that haven't been developed yet to be use
> > later on (ditto Adapter).
> >
> > 3. Dynamic string changes in some cases (see Bridge).
>
> So corelinux++ is only aiming to be an interface, rather than provide
> any implementations?
>
> --Joe
>
No, we need to at least provide a String derivation that works with
straight char.
For example, lets drop to a implementation for discussion:
AbstractString {abstract}
AbstractStringAdapter {abstract} isA Adapter, isAbstractString
StringUtf8 isA AbstractStringAdapter and hasA std::string
then StringUtf8 delegates to the string implementation when a
AbstractString method is invoked.
Meanwhile, any of our other classes (libcorelinux++, libcoreframework++)
that use a string would use AbstractString and would work with whatever
string( char, wchar, Unicde, etc) was adapted to our interface.
--
Frank V. Castellucci
http://corelinux.sourceforge.net
OOA/OOD/C++ Standards and Guidelines for Linux
|