Am Samstag, den 18.10.2008, 09:26 -0700 schrieb Bastiaan Jacques:
> I'm hesitant to go with reimplementing std::[w]string for our needs (since
> we spent a lot of time removing our dependency on a self-developed
> string class, previously).
> 
> That said, would it be possible for our needs to write a
> string class that can internally use std::string, std::wstring
> or a third party library representation?

Yes, exactly this is what I've been experimenting with. I had one
implementation that inherited from std::string with a few extras (it is
enough to support SWF5, but won't do unicode) and another that used
libICU's UnicodeString internally, but mainly mimicked the std::string
interface. They could both be used interchangeably, though obviously the
the std::string implementation fails tests.

I agree it wouldn't be useful to reimplement a whole string class. Both
std::string and UnicodeString handle copy-on-write and other performance
issues themselves, so a wrapper round these classes would be enough.

bwy

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to