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:
Vadim Zeitlin
2021-03-07 20:37:09 +01:00
parent fbd23270e3
commit 5ddf57c150
3 changed files with 22 additions and 1 deletions

View File

@@ -47,7 +47,8 @@ public:
static void RegisterModule(wxModule *module);
static void RegisterModules();
static bool InitializeModules();
static void CleanUpModules() { DoCleanUpModules(ms_modules); }
static void CleanUpModules();
static bool AreInitialized() { return ms_areInitialized; }
// used by wxObjectLoader when unloading shared libs's
@@ -56,6 +57,8 @@ public:
protected:
static wxModuleList ms_modules;
static bool ms_areInitialized;
// the function to call from constructor of a deriving class add module
// dependency which will be initialized before the module and unloaded
// after that