![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Guarded attribute registration, namespacing and shared derived-value evaluation. More...
#include "plugins/extensionattributes.h"#include <QDebug>#include <QHash>#include <QMap>#include <QPointer>#include <QRegularExpression>#include <QScopeGuard>#include <QSet>#include <QThread>#include <exception>#include <memory>Namespaces | |
| namespace | openswmmvis |
Functions | |
| bool | openswmmvis::registerExtensionAttributes (QObject *layer, const QString &id, OpenSWMM::Sdk::IComputedAttributeProvider *provider, QObject *context, std::function< void(bool)> changed, QString *error=nullptr) |
| Atomically register one guarded provider on a layer. | |
| void | openswmmvis::unregisterExtensionAttributes (QObject *layer, const QString &id) |
| Remove a provider and notify its live layer. | |
| void | openswmmvis::refreshExtensionAttributes (QObject *layer, const QString &id) |
| Invalidate provider values, allowing retry after a calculation exception. | |
| QVector< OpenSWMM::Render::AttributeField > | openswmmvis::extensionAttributeFields (const QObject *layer, OpenSWMMVis::SwmmCategory category) |
| Read validated, qualified field descriptors in deterministic provider order. | |
| QVariantMap | openswmmvis::extensionAttributeValues (const QObject *layer, OpenSWMMVis::SwmmCategory category, const QString &name, const QVariantMap &base) |
| Merge derived values into a base model-object attribute snapshot. | |
Guarded attribute registration, namespacing and shared derived-value evaluation.
Descriptors are validated before any registration is published. QObject guards remove callbacks before provider/model destruction. Shared entry snapshots tolerate unregistration during evaluation, and a per-thread recursion guard prevents derived-value dependency cycles. C++ calculation exceptions disable that provider's values until a deliberate refresh.
| std::function<void(bool)> changed |
Guarded layer refresh callback.
| QPointer<QObject> context |
Required provider lifetime guard.
| QMetaObject::Connection destroyed |
Disconnect when replacing/removing this entry.
| bool failed = false |
Suppress repeated exceptions until an explicit refresh.
| QMap<int, QVector<OpenSWMM::Render::AttributeField> > fields |
Local keys, grouped by category.
Borrowed while context lives.