mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-17 07:48:50 +01:00
getTagName now returns const stringT&
This commit is contained in:
parent
ba05fced6e
commit
756e0f6876
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue