> -----Original Message-----
> From: Awasthi, Anand [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 11:17 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: wrapping Xerces API in my code !!
>
> i may be stupid and I may be asking a dumb question
>
> but how the code suggested by you is better than followimng code qhich
> was
> i have in first place :
>
>
> Xml_DOM_Node Xml_DOM_Node::getParentNode() const
> {
> DOM_Node node = pdomnodeimpl->domnode.getParentNode();
// Is this what you really want to do? It makes 'this' contain
different data.
// 'this' contains 'pdomnodeimpl' which contains 'domnode' which is
being changed.
// You are inadvertantly/indirectly getting my your 'const' in your
method declaration.
> pdomnodeimpl->domnode = node;
> return Xml_DOM_Node(pdomnodeimpl);
> }
>
>
>
>
> -----Original Message-----
> From: Adams, David [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 10:18 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: wrapping Xerces API in my code !!
>
>
> Sorry, this would match your existing code.
> /*
> // could this be what you really wanted?
> Xml_DOM_Node Xml_DOM_Node::getParentNode() const
> {
> DOM_Node node =
> pdomnodeimpl->domnode.getParentNode();
> Xml_DOM_Node_Impl* p = new Xml_DOM_Node_Impl; // need to
> allocate new struct here.
> p->domnode = node;
> return Xml_DOM_Node(p); // your destructor deletes the
> allocated struct
> }
> */
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]