W3C home > Mailing lists > Public > www-svg@w3.org > November 2002

Re: DOM SVGNumber and DOMString

From: Chris Lilley <chris@w3.org>
Date: Wed, 13 Nov 2002 11:45:51 +0100
Message-ID: <2061007390.20021113114551@w3.org>
To: www-svg@w3.org, "Sigurd Lerstad" <sigler@bredband.no>

Hello Sigurd, www-svg,

You wrote
http://lists.w3.org/Archives/Public/www-svg/2002Jul/0027.html

> in the SVG spec, the interface SVGNumber is
> specified, and SVGNumberList contain pointers to these
> object types. And it's even stated that if an object is already in another
> list, it should be removed from that list first before being inserted in a
> new list.

Yes. That behavior is correct. It can't be in two places at once, even
for a short while.

> I'm just making sure that this is correct (which precludes me from just
> using double in C++ COM , but that I have to wrap it inside an
> object)
> 
> Is that correct?

No, its not correct. The list behavior is the important thing. Whether
you choose to wrap it as an object or not in a given implementation is
up to you.

> But what about SVGStringList, which uses DOMString as it's object
> (but DOMString is not defined as an interface, but as
> sequence<unsigned short>, which would map to BSTR in C++ COM.

Yes, that would be a good mapping. DOM Strings are sequences of 16bit
quantities, which (for basic multilingual plane characters) are
characters and (for plane one to 16 characters) are one of a surrogate
pair.

> And there's also no way to create a DOMString, how can you then
> implement SVGStringList correctly, maybe there should be a SVGString
> that wraps a DOMString ?

All that is required is that the List behaviour is correct. If the
implementation wraps objects or uses pointers, that is an
implementation choice.

-- 
 Chris                          mailto:chris@w3.org
Received on Wednesday, 13 November 2002 05:45:52 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:23 GMT