|
Boost Users : |
Subject: [Boost-users] General: Vector UTF
From: Etienne Philip Pretorius (icewolfhunter_at_[hidden])
Date: 2009-07-01 05:43:57
Hello List,
This is a general question regarding UTF-8/UTF-16/UTF-32 design
implementation. I would appreciate and comments to this design.
Create classes of utf8/utf16/utf32 who has a public base of
std::vector<char>.
Make all the std::vector<char> methods private (proxy like approach
without the pointer) to avoid calling the public base directly from code
without down casting (And the signatures should be diffrent anyway, see
below).
Re-implement common vector functions as public methods for unicode
manipulation from the derived classes of utf* using boost::uint32_t as
the code point type.
Allow passing of down casted utf* classes into functions that will
handle std::vector<char> types (boost::asio). This should also allow
direct manipulation of the underlying data.
Good/Bad/Terrible Idea?
These classes should only be for the manipulation of code points and not
for the extraction of characters (combining character classes etc).
Etienne
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net