Hi,

> Just my 2 cents...
> 
> Why not make the compiler worry about the overloading?
> Create 2 methods in DOMNode:
> 
> DOMDocument* DOMNode::getOwnerDocument();
> const DOMDocument* DOMNode::getOwnerDocument() const;
> 
> Which handles the getownerdoc problem. Then implement 2 methods in
> DOMDocument.
> 
> DOMTreeWalker* DOMDocument::createTreeWalker(DOMNode* node, and so on...);
> const DOMTreeWalker* DOMDocument::createTreeWalker(const DOMNode* node, and
> so on...) const;
> 
> Which handles the creation of non-const and const treewalkers. Or am I
> missing something obvious?


We would then have to do the same to the methods inside of DOMTreeWalker. 
I think this is OK. But what does DOMTreeWalker store? A DOMNode* or a 
const DOMNode* as the root?

Gareth

-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to