10 #include <wx/dynarray.h>
12 // ---------------------------------------------------------------------------
13 // Some more info on a class
16 wxClassInfo
*class_info
;
20 // ---------------------------------------------------------------------------
23 WX_DEFINE_ARRAY(wxClassInfo
*, wxArrayClassInfo
);
24 WX_DEFINE_ARRAY(wxClassLibInfo
*, wxArrayClassLibInfo
);
26 // ---------------------------------------------------------------------------
29 class wxClassLibrary
{
31 wxArrayClassLibInfo m_list
;
34 ~wxClassLibrary(void);
36 // Dynamic (un)register a (new) class in the database
37 void RegisterClass(wxClassInfo
*class_info
, const wxString
& path
);
38 void UnregisterClass(wxClassInfo
*class_info
);
40 // Fetch all infos whose name matches the string (wildcards allowed)
41 bool FetchInfos(const wxString
& path
, wxArrayClassLibInfo
& infos
);
43 // Create all objects whose name matches the string (wildcards allowed)
44 bool CreateObjects(const wxString
& path
, wxArrayClassInfo
& objs
);
46 // Create one object using the EXACT name
47 wxObject
*CreateObject(const wxString
& path
);
50 // ---------------------------------------------------------------------------
53 class wxLibrary
: public wxObject
{
55 wxClassLibrary
*m_liblist
;
58 wxLibrary(void *handle
);
61 // Get a symbol from the dynamic library
62 void *GetSymbol(const wxString
& symbname
);
64 // Create the object whose classname is "name"
65 wxObject
*CreateObject(const wxString
& name
);
67 wxClassLibrary
*ClassLib() const;
70 // ---------------------------------------------------------------------------
80 wxLibrary
*LoadLibrary(const wxString
& name
);
81 wxObject
*CreateObject(const wxString
& name
);
84 // ---------------------------------------------------------------------------
87 extern wxLibraries wxTheLibraries
;
89 // ---------------------------------------------------------------------------
90 // Interesting defines
92 #define WXDLL_ENTRY_FUNCTION() extern "C" wxClassLibrary *GetClassList()
93 #define WXDLL_EXIT_FUNCTION(param) extern "C" void FreeClassList(wxClassLibrary *param)