Re: [boost] API Review request: XML API for C++, second round
by Hamish Mackenzie other posts by this author
Jun 26 2003 8:21PM messages near this date
Re: [boost] API Review request: XML API for C++, second round
|
Re: [boost] API Review request: XML API for C++, second round
On Thu, 2003-06-26 at 21:00, Hamish Mackenzie wrote:
> You might be worried about...
>
> dom::document dom;
> assert( &dom.root().document() == &dom );
>
> I think this can work be made to work with
>
> bool operator ==( document * p1, document_ref * p2 )
> {
> return p1->raw_ == p2->raw_;
> }
>
> bool operator ==( document_ref * p1, document * p2 )
> {
> return p1->raw_ == p2->raw_;
> }
Actually that wouldn't work as &dom.root().document() would fail to
compile. (not without caching document_ref in node_ref) But this might
be ok..
dom::document doc;
dom::document_ref doc2( doc.root().document() );
assert( &doc2 == &doc );
and...
assert( doc2 == doc );
Can be implemented but ideally it would compare all the nodes in the
document.
--
Hamish Mackenzie <hamish@[...].uk>
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Stefan Seefeld
Anthony Williams
Hamish Mackenzie
Stefan Seefeld
Anthony Williams
Hamish Mackenzie
Bohdan
Stefan Seefeld
Hamish Mackenzie
Stefan Seefeld
Hamish Mackenzie
Hamish Mackenzie
Stefan Seefeld
Hamish Mackenzie
Stefan Seefeld
Hamish Mackenzie
Stefan Seefeld
Hamish Mackenzie
Bohdan
Stefan Seefeld
Stefan Seefeld
Hamish Mackenzie
Stefan Seefeld
Hamish Mackenzie
Hamish Mackenzie
|