getTagName now returns const stringT&

This commit is contained in:
jez_higgins 2005-12-09 14:09:08 +00:00
parent ba05fced6e
commit 756e0f6876
2 changed files with 4 additions and 4 deletions

View file

@ -32,7 +32,7 @@ class Element : public Node<stringT>
throw std::bad_cast();
} // Element
stringT getTagName() const { return eImpl()->getTagName(); }
const stringT& getTagName() const { return eImpl()->getTagName(); }
stringT getAttribute(const stringT& name) const { return eImpl()->getAttribute(name); }
void setAttribute(const stringT& name, const stringT& value) { eImpl()->setAttribute(name, value); }
@ -70,7 +70,7 @@ class Element_impl : virtual public Node_impl<stringT>
////////////////////////////////////////////////////////
// DOM::Element
virtual stringT getTagName() const = 0;
virtual const stringT& getTagName() const = 0;
virtual stringT getAttribute(const stringT& name) const = 0;
virtual void setAttribute(const stringT& name, const stringT& value) = 0;

View file

@ -32,7 +32,7 @@ class ElementImpl : public DOM::Element_impl<stringT>,
/////////////////////////////////////////////////////
// DOM::Element functions
virtual stringT getTagName() const { return getNodeName(); }
virtual const stringT& getTagName() const { return getNodeName(); }
virtual stringT getAttribute(const stringT& name) const
{
@ -120,7 +120,7 @@ class ElementImpl : public DOM::Element_impl<stringT>,
return DOM::Node_base::ELEMENT_NODE;
} // getNodeType
virtual stringT getNodeName() const
virtual const stringT& getNodeName() const
{
return *tagName_;
} // getNodeName