]> git.saurik.com Git - wxWidgets.git/commitdiff
wxClassInfo (un)registration now happens automatically, no need to do it in wxPluginL...
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 31 Jan 2004 16:37:04 +0000 (16:37 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 31 Jan 2004 16:37:04 +0000 (16:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dynload.h
src/common/dynload.cpp

index ae8e8e5e34625b620356aa90024c3525a75c7e63..1484964048cf7b7a2e54af5e8cb7822c85c84217 100644 (file)
@@ -93,8 +93,6 @@ private:
     size_t          m_objcount;     // ..and (pluggable) object instantiations.
     wxModuleList    m_wxmodules;    // any wxModules that we initialised.
 
-    void    UpdateClassInfo();      // Update the wxClassInfo table
-    void    RestoreClassInfo();     // Restore the original wxClassInfo state.
     void    RegisterModules();      // Init any wxModules in the lib.
     void    UnregisterModules();    // Cleanup any wxModules we installed.
 
index 9494d42fb97f701cfe8388f8edb0a213cecab97a..ebff36b860cbf9a8516e858b81abe0ab9e627913 100644 (file)
@@ -87,7 +87,6 @@ wxPluginLibrary::wxPluginLibrary(const wxString &libname, int flags)
 
     if( m_handle != 0 )
     {
-        UpdateClassInfo();
         RegisterModules();
     }
     else
@@ -102,7 +101,6 @@ wxPluginLibrary::~wxPluginLibrary()
     if( m_handle != 0 )
     {
         UnregisterModules();
-        RestoreClassInfo();
     }
 }
 
@@ -133,57 +131,6 @@ bool wxPluginLibrary::UnrefLib()
 // Private methods
 // ------------------------
 
-void wxPluginLibrary::UpdateClassInfo()
-{
-    wxClassInfo     *info;
-    wxHashTable     *t = wxClassInfo::sm_classTable;
-
-        // FIXME: Below is simply a cut and paste specialisation of
-        //        wxClassInfo::InitializeClasses.  Once this stabilises,
-        //        the two should probably be merged.
-        //
-        //        Actually it's becoming questionable whether we should merge
-        //        this info with the main ClassInfo tables since we can nearly
-        //        handle this completely internally now and it does expose
-        //        certain (minimal % user_stupidy) risks.
-
-    for(info = m_after; info != m_before; info = info->m_next)
-    {
-        if( info->m_className )
-        {
-            if( t->Get(info->m_className) == 0 )
-                t->Put(info->m_className, (wxObject *)info);
-
-            // Hash all the class names into a local table too so
-            // we can quickly find the entry they correspond to.
-            (*ms_classes)[info->m_className] = this;
-        }
-    }
-}
-
-void wxPluginLibrary::RestoreClassInfo()
-{
-    wxClassInfo *info;
-
-    for(info = m_after; info != m_before; info = info->m_next)
-    {
-        wxClassInfo::sm_classTable->Delete(info->m_className);
-        ms_classes->erase(ms_classes->find(info->m_className));
-    }
-
-    if( wxClassInfo::sm_first == m_after )
-        wxClassInfo::sm_first = m_before;
-    else
-    {
-        info = wxClassInfo::sm_first;
-        while( info->m_next && info->m_next != m_after ) info = info->m_next;
-
-        wxASSERT_MSG( info, _T("ClassInfo from wxPluginLibrary not found on purge"));
-
-        info->m_next = m_before;
-    }
-}
-
 void wxPluginLibrary::RegisterModules()
 {
     // Plugin libraries might have wxModules, Register and initialise them if