From e13ce4a3d01cb6f06e698cba51e61793eb3ba9c1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 16 Nov 2007 23:34:21 +0000 Subject: [PATCH] move Add/DeleteAttribute() implementations out of line to avoid deprecation warnings when including xml.h from user code git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/xml/xml.h | 9 +++------ src/xml/xml.cpp | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/include/wx/xml/xml.h b/include/wx/xml/xml.h index 22f3e8978b..d54d9c5735 100644 --- a/include/wx/xml/xml.h +++ b/include/wx/xml/xml.h @@ -129,10 +129,8 @@ public: virtual void AddChild(wxXmlNode *child); virtual bool InsertChild(wxXmlNode *child, wxXmlNode *before_node); virtual bool RemoveChild(wxXmlNode *child); - virtual void AddAttribute(const wxString& name, const wxString& value) - { AddProperty(name, value); } - virtual bool DeleteAttribute(const wxString& name) - { return DeleteProperty(name); } + virtual void AddAttribute(const wxString& name, const wxString& value); + virtual bool DeleteAttribute(const wxString& name); // access methods: wxXmlNodeType GetType() const { return m_type; } @@ -170,8 +168,7 @@ public: void SetChildren(wxXmlNode *child) { m_children = child; } void SetAttributes(wxXmlAttribute *attr) { m_attrs = attr; } - virtual void AddAttribute(wxXmlAttribute *attr) - { AddProperty(attr); } + virtual void AddAttribute(wxXmlAttribute *attr); #if WXWIN_COMPATIBILITY_2_8 wxDEPRECATED( inline wxXmlAttribute *GetProperties() const ); diff --git a/src/xml/xml.cpp b/src/xml/xml.cpp index d8fe265936..a68f828b40 100644 --- a/src/xml/xml.cpp +++ b/src/xml/xml.cpp @@ -252,6 +252,21 @@ bool wxXmlNode::RemoveChild(wxXmlNode *child) } } +void wxXmlNode::AddAttribute(const wxString& name, const wxString& value) +{ + AddProperty(name, value); +} + +void wxXmlNode::AddAttribute(wxXmlAttribute *attr) +{ + AddProperty(attr); +} + +bool wxXmlNode::DeleteAttribute(const wxString& name) +{ + return DeleteProperty(name); +} + void wxXmlNode::AddProperty(const wxString& name, const wxString& value) { AddProperty(new wxXmlAttribute(name, value, NULL)); -- 2.47.2