POV-Ray : Newsgroups : povray.off-topic : Computer book recommendation sought : Re: Computer book recommendation sought Server Time
5 Sep 2024 07:24:02 EDT (-0400)
  Re: Computer book recommendation sought  
From: Chambers
Date: 6 Sep 2009 12:05:31
Message: <4aa3ddcb$1@news.povray.org>
Darren New wrote:
> If you have several different parser libraries, for example (say, XML, 
> HTTP headers, message catalogs) and they all depend on different 
> implementations of unicode strings, what's a good way of making it so 
> you don't have to convert between unicode string representations each 
> time you move data from the message catalog to an XML record sent over 
> HTTP?

I don't know of any books that suggest solutions, but you might consider 
writing your own set of bridge classes to go between the different 
libraries.

That is, say you'd have a class DN_Unicode_String (or whatever you end 
up calling it), you would define casting operations both from and to 
every other unicode string type used.

Then, in your code, the only type you use would be the 
DN_Unicode_String, and it would work automatically with all the other 
libraries.

It's an ugly solution, and in the end it just increases the number of 
types being used, but it would work.

...Chambers


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.