Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2003-06-12 09:25:58


Peter Dimov wrote:
> Stefan Seefeld wrote:
>
>>Is there any interest in this library evolving
>>into a boost::xml library ? If so, what needs to change,
>>what needs to be added / removed ?
>
>
> I think that there is considerable interest in a boost::xml library. But...
>
> Document *document = Document::parse_file(argv[1]);
>
> ... I don't believe that a raw pointer based interface is acceptable.
>
> xml::dom::document document = xml::dom::parse_file(argv[1]);
>
> looks much better.

Good catch. However, it looks worse than it actually is :-) :

The memory management for nodes is entirely handled by the backend
(libxml2), i.e. nodes are always created and deleted by their parents.
Constructors and destructors are protected.

The 'Document' class is the only one that is owned directly by the
user, and thus has to be deleted.

> BTW why is basic_document<>::write_file virtual but
> basic_document<>::clone isn't?

hmm, good question. I don't see any need for it to be virtual, I
wouldn't expect anybody to derive from Document.

Regards,
                Stefan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk