add wxModule::AddDependency(name) overload (patch 1790451)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-11-17 00:12:01 +00:00
parent 08f1c27c39
commit d04a9fdfe2
3 changed files with 73 additions and 4 deletions

View File

@@ -73,6 +73,14 @@ protected:
m_dependencies.Add(dep);
}
// same as the version above except it will look up wxClassInfo by name on
// its own
void AddDependency(const char *className)
{
m_namedDependencies.Add(className);
}
private:
// initialize module and Append it to initializedModules list recursively
// calling itself to satisfy module dependencies if needed
@@ -84,11 +92,19 @@ private:
// could be initialized) and also empty m_modules itself
static void DoCleanUpModules(const wxModuleList& modules);
// resolve all named dependencies and add them to the normal m_dependencies
bool ResolveNamedDependencies();
// module dependencies: contains
// module dependencies: contains wxClassInfo pointers for all modules which
// must be initialized before this one
wxArrayClassInfo m_dependencies;
// used internally while initiliazing/cleaning up modules
// and the named dependencies: those will be resolved during run-time and
// added to m_dependencies
wxArrayString m_namedDependencies;
// used internally while initializing/cleaning up modules
enum
{
State_Registered, // module registered but not initialized yet