Re: [Libxmlplusplus-general] Status



On Thu, 2003-02-06 at 16:04, Stefan Seefeld wrote:
> Murray Cumming wrote:
> 
> > We had already stated (not clearly) that no-one should create Nodes or
> > Attributes directly. I would not expect the API to work if someone did.
> 
> stating it is one thing, making certain things impossible by correctly
> using the 'public' and 'private' keywords is another.
> 
> >>The Node constructor/destructors are called by libxml2 when the 
> >>corresponding xmlNode, xmlAttr, etc. objects are created/destroyed,
> >>meaning the implementation (xmlNode) owns its own wrapper (xmlpp::Node).
> > 
> > 
> > Is that an additional point? It seems like implementation to me?
> 
> ownership semantics is certainly more than an implementation detail.
> It's part of the semantics of the API.
> 
> If I look int a new API and I find functions methods that return object
> pointers, my first question is 'who owns that' ?

You have a habit of ignoring replies to your questions and just
restating your issues. I have said more than twice now that Nodes and
Attributes are meant to be created and owned by other libxml++ objects,
not directly. I have also said that I would like the API to show that.
Enough.

> And if the answer is 'the callee', I'd ask 'and how can I create an 
> object that is not owned by the callee' ? Etc., you get the idea.

First you would say Why you would want to do that.

> In the context of manipulating a DOM tree, an important question is
> (as I already mentioned) how to take out a subtree, put it into
> another context, or even another document. That's something that
> hasn't been addressed yet,

Yes, that would be nice. I think we discussed some of that already.

>  and which should be added before the
> API can be considered complete.

APIs are never complete. APIs are stable at best.

-- 
Murray Cumming
murray usa net
www.murrayc.com





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