Re: [libxml++] patch to allow building without glibmm



Stefan Seefeld <seefeld sympatico ca> 2005-10-28 10:32:28 -0400:
> 
> libxml++ could define its own string type, which would simply be some
> kind of smart pointer. Then you could add conversion functions to and from
> your favorit unicode implementation for convenience.
> That way users still have the choice which unicode library to use (if any 
> at all).

This seems like a fairly reasonable tradeoff.  Basically, it would be a
thin wrapper class around xmlChar *, that only manages memory allocation
and deallocation.  It could in fact be completely opaque and provide no
interface for access.  One possible implementation would simply be an
opaque wrapper of std::vector<xmlChar>.  Then all you would need is some
namespace level conversion functions to char* and Glib::ustring.  This
way you can put the Glib::ustring conversion function in a separate
header and only if someone wants it would they have a Glib dependency.

-- 
Brandon Forehand




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]