This simple helper function doesn't use any wxXmlResourceHandler data as it's
just a trivial wrapper for wxXmlNode::GetAttribute().
Making it static allows, in particular, to call it from const member functions
of wxXmlResourceHandler-derived classes (making it "const" itself would
achieve this too, of course, but it just doesn't need to be non-static).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65888
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Returns true if the node has a property class equal to classname,
// e.g. <object class="wxDialog">.
- bool IsOfClass(wxXmlNode *node, const wxString& classname);
+ static bool IsOfClass(wxXmlNode *node, const wxString& classname);
// Gets node content from wxXML_ENTITY_NODE
// The problem is, <tag>content<tag> is represented as
return NULL;
}
+/* static */
bool wxXmlResourceHandler::IsOfClass(wxXmlNode *node, const wxString& classname)
{
- return node->GetAttribute(wxT("class"), wxEmptyString) == classname;
+ return node->GetAttribute(wxT("class")) == classname;
}