![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <extensionmanager.h>
Classes | |
| struct | Loaded |
| One successfully initialized extension and its ordered owned lifetime resources. More... | |
Public Types | |
| using | HostFactory = std::function< std::unique_ptr< OpenSWMM::Sdk::ExtensionHost >(const QString &)> |
| Factory transferring one initialized-service host to the loader for a validated plugin ID. | |
Signals | |
| void | changed () |
| Notify inventory observers after a rescan, load or enable-state change. | |
Public Member Functions | |
| ExtensionManager (OpenSWMM::Sdk::CompatibilityManifest manifest, QSettings *settings, QObject *parent=nullptr) | |
| Construct a GUI-thread loader with injectable build identity and settings. | |
| ~ExtensionManager () override | |
| Stop initialized extensions and destroy their hosts without unloading native code. | |
| OpenSWMM::Sdk::CompatibilityManifest | manifest () const |
| Read the build manifest with the actual loaded engine identity applied. | |
| void | setEngineRuntimeAbiTag (const QString &tag) |
| Supply the engine-owned runtime identity before plugin discovery/loading. | |
| QList< GuiExtensionRecord > | records () const |
| Copy discovery and load diagnostics. | |
| QStringList | directories () const |
| Resolve app, user-data and additional extension directories. | |
| void | addDirectory (const QString &path) |
| Persist an existing canonical directory and rescan metadata. | |
| void | setEnabled (const QString &id, bool enabled) |
| Persist an enable-state change for the next application launch. | |
| void | rescan () |
| Rebuild metadata inventory without executing plugin code; preserve this session load failures. | |
| void | start (HostFactory factory, bool safeMode=false) |
| Load enabled compatible plugins once, recovering interrupted operations first. | |
| void | shutdown () |
| Join jobs, call plugin shutdown, then remove contributions in reverse load order; idempotent. | |
| void | refreshModels () |
| Materialize model facades before project state is restored on a newly loaded window. | |
| bool | safeMode () const |
| Inspect startup safe mode. | |
Static Public Member Functions | |
| static ExtensionManager * | instance () |
| Obtain the application-owned GUI-thread manager. | |
| static OpenSWMM::Sdk::CompatibilityManifest | buildManifest () |
| Read the manifest generated by this application build. | |
| static QString | compatibilityError (const OpenSWMM::Sdk::CompatibilityManifest &host, const OpenSWMM::Sdk::CompatibilityManifest &plugin, bool requiresEngineAbi, QString *warning=nullptr) |
| Validate native metadata before instantiating the plugin. | |
Discovers metadata without executing code; retains loaded libraries until process exit.
| using openswmmvis::ExtensionManager::HostFactory = std::function<std::unique_ptr<OpenSWMM::Sdk::ExtensionHost>(const QString &)> |
Factory transferring one initialized-service host to the loader for a validated plugin ID.
|
explicit |
Construct a GUI-thread loader with injectable build identity and settings.
| [in] | manifest | Running host compatibility identity. |
| [in] | settings | Required borrowed settings; must outlive this manager. |
| [in] | parent | Optional QObject owner. |
|
override |
Stop initialized extensions and destroy their hosts without unloading native code.
| void openswmmvis::ExtensionManager::addDirectory | ( | const QString & | path | ) |
Persist an existing canonical directory and rescan metadata.
| [in] | path | Local directory; nonexistent paths are ignored. |
|
static |
Read the manifest generated by this application build.
|
signal |
Notify inventory observers after a rescan, load or enable-state change.
|
static |
Validate native metadata before instantiating the plugin.
| [in] | host | Running host identity. |
| [in] | plugin | Plugin's embedded builtAgainst manifest. |
| [in] | requiresEngineAbi | Refuse engine fingerprint mismatch instead of warning. |
| [out] | warning | Optional nonfatal engine-ABI warning, cleared before validation. |
| QStringList openswmmvis::ExtensionManager::directories | ( | ) | const |
Resolve app, user-data and additional extension directories.
|
static |
Obtain the application-owned GUI-thread manager.
|
inline |
Read the build manifest with the actual loaded engine identity applied.
|
inline |
Copy discovery and load diagnostics.
| void openswmmvis::ExtensionManager::refreshModels | ( | ) |
Materialize model facades before project state is restored on a newly loaded window.
| void openswmmvis::ExtensionManager::rescan | ( | ) |
Rebuild metadata inventory without executing plugin code; preserve this session load failures.
|
inline |
Inspect startup safe mode.
| void openswmmvis::ExtensionManager::setEnabled | ( | const QString & | id, |
| bool | enabled | ||
| ) |
Persist an enable-state change for the next application launch.
| [in] | id | Discovered extension identity. |
| [in] | enabled | Desired next-launch state; loaded libraries stay resident. |
| void openswmmvis::ExtensionManager::setEngineRuntimeAbiTag | ( | const QString & | tag | ) |
Supply the engine-owned runtime identity before plugin discovery/loading.
| [in] | tag | Actual swmm_engine_abi_tag() value; empty means unavailable. |
| void openswmmvis::ExtensionManager::shutdown | ( | ) |
Join jobs, call plugin shutdown, then remove contributions in reverse load order; idempotent.
| void openswmmvis::ExtensionManager::start | ( | HostFactory | factory, |
| bool | safeMode = false |
||
| ) |
Load enabled compatible plugins once, recovering interrupted operations first.
| [in] | factory | Creates an owning per-plugin SDK host for a validated identity. |
| [in] | safeMode | Skip all native plugin initialization while retaining diagnostics. |