Add wxModule::AreInitialized()
This internal function will be useful to check if the modules are already initialized, i.e. if the library is in the "steady state" between the end of the initialization and the beginning of the cleanup phases.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
wxIMPLEMENT_ABSTRACT_CLASS(wxModule, wxObject)
|
||||
|
||||
wxModuleList wxModule::ms_modules;
|
||||
bool wxModule::ms_areInitialized = false;
|
||||
|
||||
void wxModule::RegisterModule(wxModule* module)
|
||||
{
|
||||
@@ -178,9 +179,18 @@ bool wxModule::InitializeModules()
|
||||
// remember the real initialisation order
|
||||
ms_modules = initializedModules;
|
||||
|
||||
ms_areInitialized = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxModule::CleanUpModules()
|
||||
{
|
||||
DoCleanUpModules(ms_modules);
|
||||
|
||||
ms_areInitialized = false;
|
||||
}
|
||||
|
||||
// Clean up all currently initialized modules
|
||||
void wxModule::DoCleanUpModules(const wxModuleList& modules)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user