+#include "wx/listimpl.cpp"
+WX_DECLARE_LIST(wxXmlSubclassFactory, wxXmlSubclassFactoriesList);
+WX_DEFINE_LIST(wxXmlSubclassFactoriesList);
+
+wxXmlSubclassFactoriesList *wxXmlResource::ms_subclassFactories = NULL;
+
+/*static*/ void wxXmlResource::AddSubclassFactory(wxXmlSubclassFactory *factory)
+{
+ if (!ms_subclassFactories)
+ {
+ ms_subclassFactories = new wxXmlSubclassFactoriesList;
+ ms_subclassFactories->DeleteContents(TRUE);
+ }
+ ms_subclassFactories->Append(factory);
+}
+
+class wxXmlSubclassFactoryCXX : public wxXmlSubclassFactory
+{
+public:
+ ~wxXmlSubclassFactoryCXX() {}
+
+ wxObject *Create(const wxString& className)
+ {
+ wxClassInfo* classInfo = wxClassInfo::FindClass(className);
+
+ if (classInfo)
+ return classInfo->CreateObject();
+ else
+ return NULL;
+ }
+};
+
+
+