![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
GUI-thread session registry shared by every plugin host in the application. More...
#include <extensionstateregistry.h>
Classes | |
| struct | Data |
| Private authoritative records retained independently of plugin facades. More... | |
Signals | |
| void | sessionRegistered (QObject *owner, const QUuid &sessionId) |
| Synchronously attach native facades after authoritative state is available. | |
| void | stateEventReady (const OpenSWMM::Sdk::StateEvent &event) |
| Deliver a copied transition from the ordered GUI-thread drain. | |
| void | viewEventReady (const OpenSWMM::Sdk::ViewEvent &event) |
| Deliver domain metadata in the same globally ordered session/view drain. | |
| void | activityEventReady (const OpenSWMM::Sdk::ActivityEvent &event) |
| Deliver process/UI metadata from the ordered session/view/activity drain. | |
| void | beforeSave (const OpenSWMM::Sdk::SaveRequest &request) |
| Synchronously collect extension state before native persistence starts. | |
Public Member Functions | |
| ExtensionStateRegistry (QObject *parent=nullptr) | |
| Construct an independent registry, or the application-owned instance. | |
| ~ExtensionStateRegistry () override | |
| Discard queued observations and retained operation metadata. | |
| QUuid | registerSession (QObject *owner, const SessionMetadata &metadata) |
| Register one open lifetime, idempotently for an existing owner. | |
| QUuid | sessionForOwner (QObject *owner) const |
| Resolve an already registered owner without creating state. | |
| QObject * | ownerForSession (const QUuid &sessionId) const |
| Resolve the native owner of a live session. | |
| OpenSWMM::Sdk::StateSnapshot | snapshot () const |
| Copy all live states and the committed-publication watermark. | |
| OpenSWMM::Sdk::ModelSessionState | session (const QUuid &sessionId) const |
| Copy one live state without creating it. | |
| OpenSWMM::Sdk::ViewSnapshot | viewSnapshot (const QUuid &sessionId) const |
| Copy tracked view metadata without touching native objects. | |
| void | refreshViews (const QUuid &sessionId, OpenSWMM::Sdk::ViewSnapshot snapshot) |
| Refresh copied view state at a native construction/restoration boundary. | |
| void | publishView (const QUuid &sessionId, OpenSWMM::Sdk::ViewSnapshot snapshot, OpenSWMM::Sdk::ViewEvent event) |
| Commit one domain invalidation and its latest copied view state. | |
| bool | isDeliverable (const OpenSWMM::Sdk::ViewEvent &event) const |
| Recheck a queued domain observation per receiving host. | |
| OpenSWMM::Sdk::ActivitySnapshot | activitySnapshot (const QUuid &ownerId, const QUuid &windowId) const |
| Copy retained window runs, private owner jobs and scoped UI metadata. | |
| OpenSWMM::Sdk::ProcessState | operation (const QUuid &operationId) const |
| Copy a retained attempt without creating state. | |
| QUuid | beginOperation (OpenSWMM::Sdk::ProcessState state) |
| Accept a new uniquely identified attempt in Queued state. | |
| void | startOperation (const QUuid &operationId, const QDateTime &startedAt={}) |
| Record native runner/worker start once for a live attempt. | |
| void | progressOperation (const QUuid &operationId, double fraction, const QString &stage={}) |
| Commit coalesced normalized progress without accepting nonfinite values. | |
| bool | requestOperationCancel (const QUuid &operationId) |
| Record an idempotent cancellation request before settlement. | |
| void | finishOperation (const QUuid &operationId, OpenSWMM::Sdk::ProcessPhase outcome, const QString &error={}, int errorCode=0, const QDateTime &finishedAt={}) |
| Commit exactly one immutable terminal outcome. | |
| void | retireOperation (const QUuid &operationId) |
| Retire completed metadata while preserving its queued outcome history. | |
| void | refreshActivityUi (const QUuid &ownerId, OpenSWMM::Sdk::UiActivityState state) |
| Copy scoped UI state at an explicit registration/backfill boundary. | |
| void | publishActivityUi (const QUuid &ownerId, OpenSWMM::Sdk::UiActivityState state, OpenSWMM::Sdk::ActivityEvent event) |
| Commit copied scoped UI metadata and queue its invalidation. | |
| void | forgetActivityOwner (const QUuid &ownerId) |
| Discard a stopped host's private snapshots and completed job metadata. | |
| bool | isDeliverable (const OpenSWMM::Sdk::ActivityEvent &event) const |
| Recheck nonterminal progress and live UI targets before each receiver. | |
| void | updateSession (const QUuid &sessionId, const SessionMetadata &metadata, OpenSWMM::Sdk::StateChanges changes=OpenSWMM::Sdk::StateChange::Metadata) |
| Update copied native metadata and record a broad invalidation. | |
| quint64 | beginLoad (const QUuid &sessionId) |
| Start a new accepted load generation. | |
| void | finishLoad (const QUuid &sessionId, quint64 generation, bool ok, const QString &error={}) |
| Commit a settled readiness/failure outcome only for the current attempt. | |
| void | beginClosing (const QUuid &sessionId) |
| Commit close and make the session unavailable for resolution. | |
| void | retireSession (const QUuid &sessionId) |
| Remove live state before queuing its terminal close record. | |
| bool | isDeliverable (const OpenSWMM::Sdk::StateEvent &event) const |
| Check whether a copied observation still describes a deliverable transition. | |
| bool | isCurrent (const QUuid &sessionId, QObject *expectedOwner) const |
| Check native owner availability after reentrant callbacks. | |
| bool | isCurrent (const OpenSWMM::Sdk::SaveRequest &request) const |
| Check a synchronous save request after potentially reentrant collection. | |
| QUuid | beginSave (const QList< QUuid > &sessionIds, OpenSWMM::Sdk::SaveKind kind, const QString &targetPath, bool joinExisting, QString *error=nullptr) |
| Begin a scoped save or join a compatible outer operation. | |
| bool | isSaving (const QUuid &sessionId) const |
| Inspect whether a scope still owns this session's save. | |
| QUuid | operationFor (const QUuid &sessionId) const |
| Resolve a session's active save correlation identity. | |
| void | updateSaveTarget (const QUuid &operationId, const QString &targetPath) |
| Resolve an outer save destination selected after preparation began. | |
| void | endSave (const QUuid &operationId, bool ok, const QString &error={}) |
| Commit one terminal save outcome and release affected sessions. | |
Static Public Member Functions | |
| static ExtensionStateRegistry * | instance () |
| Resolve the application-owned registry without recreating it during teardown. | |
Friends | |
| class | ExtensionSaveOperation |
GUI-thread session registry shared by every plugin host in the application.
|
explicit |
Construct an independent registry, or the application-owned instance.
| [in] | parent | Optional QObject owner on this GUI thread. |
|
overridedefault |
Discard queued observations and retained operation metadata.
|
signal |
Deliver process/UI metadata from the ordered session/view/activity drain.
| [in] | event | Immutable owning activity observation. |
| ActivitySnapshot openswmmvis::ExtensionStateRegistry::activitySnapshot | ( | const QUuid & | ownerId, |
| const QUuid & | windowId | ||
| ) | const |
Copy retained window runs, private owner jobs and scoped UI metadata.
| [in] | ownerId | Calling host lifetime. |
| [in] | windowId | Main-window scope. |
|
signal |
Synchronously collect extension state before native persistence starts.
| [in] | request | Captured save identity, revalidated after each observer by the host. |
| void openswmmvis::ExtensionStateRegistry::beginClosing | ( | const QUuid & | sessionId | ) |
Commit close and make the session unavailable for resolution.
| [in] | sessionId | Registered open lifetime; repeated calls are inert. |
| quint64 openswmmvis::ExtensionStateRegistry::beginLoad | ( | const QUuid & | sessionId | ) |
Start a new accepted load generation.
| [in] | sessionId | Registered session not closing or saving. |
| QUuid openswmmvis::ExtensionStateRegistry::beginOperation | ( | OpenSWMM::Sdk::ProcessState | state | ) |
Accept a new uniquely identified attempt in Queued state.
| [in] | state | Captured ownership/model/window metadata; null operationId generates a UUID. |
| QUuid openswmmvis::ExtensionStateRegistry::beginSave | ( | const QList< QUuid > & | sessionIds, |
| OpenSWMM::Sdk::SaveKind | kind, | ||
| const QString & | targetPath, | ||
| bool | joinExisting, | ||
| QString * | error = nullptr |
||
| ) |
Begin a scoped save or join a compatible outer operation.
| [in] | sessionIds | Affected live sessions; duplicate IDs are ignored. |
| [in] | kind | Outer save category. |
| [in] | targetPath | Intended final destination, retained by joined nested scopes. |
| [in] | joinExisting | Permit joining when all sessions share one active operation. |
| [out] | error | Optional refusal/invalidated-collection detail. |
| void openswmmvis::ExtensionStateRegistry::endSave | ( | const QUuid & | operationId, |
| bool | ok, | ||
| const QString & | error = {} |
||
| ) |
Commit one terminal save outcome and release affected sessions.
| [in] | operationId | Correlation identity returned by beginSave(). |
| [in] | ok | True only after the intended final transaction commits. |
| [in] | error | Copied terminal failure detail, empty on success. |
| void openswmmvis::ExtensionStateRegistry::finishLoad | ( | const QUuid & | sessionId, |
| quint64 | generation, | ||
| bool | ok, | ||
| const QString & | error = {} |
||
| ) |
Commit a settled readiness/failure outcome only for the current attempt.
| [in] | sessionId | Registered session identity. |
| [in] | generation | Accepted load generation returned by beginLoad(). |
| [in] | ok | True after the native readiness barrier succeeds. |
| [in] | error | Copied failure diagnostic, empty on success. |
| void openswmmvis::ExtensionStateRegistry::finishOperation | ( | const QUuid & | operationId, |
| OpenSWMM::Sdk::ProcessPhase | outcome, | ||
| const QString & | error = {}, |
||
| int | errorCode = 0, |
||
| const QDateTime & | finishedAt = {} |
||
| ) |
Commit exactly one immutable terminal outcome.
| [in] | operationId | Unique retained attempt. |
| [in] | outcome | Succeeded, Failed or Cancelled; other phases are ignored. |
| [in] | error | Copied bounded failure/cancellation detail. |
| [in] | errorCode | Native diagnostic code where available. |
| [in] | finishedAt | Native settlement timestamp, or invalid to use current UTC time. |
| void openswmmvis::ExtensionStateRegistry::forgetActivityOwner | ( | const QUuid & | ownerId | ) |
Discard a stopped host's private snapshots and completed job metadata.
| [in] | ownerId | Private host lifetime; native shared runs remain. |
|
static |
Resolve the application-owned registry without recreating it during teardown.
| bool openswmmvis::ExtensionStateRegistry::isCurrent | ( | const OpenSWMM::Sdk::SaveRequest & | request | ) | const |
Check a synchronous save request after potentially reentrant collection.
| [in] | request | Captured operation/session/load-generation identity. |
| bool openswmmvis::ExtensionStateRegistry::isCurrent | ( | const QUuid & | sessionId, |
| QObject * | expectedOwner | ||
| ) | const |
Check native owner availability after reentrant callbacks.
| [in] | sessionId | Captured open-lifetime identity. |
| [in] | expectedOwner | Borrowed original owner identity; never dereferenced. |
| bool openswmmvis::ExtensionStateRegistry::isDeliverable | ( | const OpenSWMM::Sdk::ActivityEvent & | event | ) | const |
Recheck nonterminal progress and live UI targets before each receiver.
| [in] | event | Copied activity observation. |
| bool openswmmvis::ExtensionStateRegistry::isDeliverable | ( | const OpenSWMM::Sdk::StateEvent & | event | ) | const |
Check whether a copied observation still describes a deliverable transition.
| [in] | event | Owning queued observation. |
| bool openswmmvis::ExtensionStateRegistry::isDeliverable | ( | const OpenSWMM::Sdk::ViewEvent & | event | ) | const |
Recheck a queued domain observation per receiving host.
| [in] | event | Owning copied observation. |
| bool openswmmvis::ExtensionStateRegistry::isSaving | ( | const QUuid & | sessionId | ) | const |
Inspect whether a scope still owns this session's save.
| [in] | sessionId | Open-lifetime identity, possibly already retired. |
| ProcessState openswmmvis::ExtensionStateRegistry::operation | ( | const QUuid & | operationId | ) | const |
Copy a retained attempt without creating state.
| [in] | operationId | Unique attempt UUID. |
| QUuid openswmmvis::ExtensionStateRegistry::operationFor | ( | const QUuid & | sessionId | ) | const |
Resolve a session's active save correlation identity.
| [in] | sessionId | Open-lifetime identity. |
| QObject * openswmmvis::ExtensionStateRegistry::ownerForSession | ( | const QUuid & | sessionId | ) | const |
Resolve the native owner of a live session.
| [in] | sessionId | Open-lifetime identity. |
| void openswmmvis::ExtensionStateRegistry::progressOperation | ( | const QUuid & | operationId, |
| double | fraction, | ||
| const QString & | stage = {} |
||
| ) |
Commit coalesced normalized progress without accepting nonfinite values.
| [in] | operationId | Active unique attempt. |
| [in] | fraction | Finite progress, clamped to [0,1]. |
| [in] | stage | Bounded copied display description. |
| void openswmmvis::ExtensionStateRegistry::publishActivityUi | ( | const QUuid & | ownerId, |
| OpenSWMM::Sdk::UiActivityState | state, | ||
| OpenSWMM::Sdk::ActivityEvent | event | ||
| ) |
Commit copied scoped UI metadata and queue its invalidation.
| [in] | ownerId | Owner whose cached UI snapshot is updated. |
| [in] | state | Current copied UI state. |
| [in] | event | UI reason/identity; sequence is assigned here. |
| void openswmmvis::ExtensionStateRegistry::publishView | ( | const QUuid & | sessionId, |
| OpenSWMM::Sdk::ViewSnapshot | snapshot, | ||
| OpenSWMM::Sdk::ViewEvent | event | ||
| ) |
Commit one domain invalidation and its latest copied view state.
| [in] | sessionId | Registered open lifetime. |
| [in] | snapshot | Native metadata after the semantic operation. |
| [in] | event | Bounded reason/details; session/revision/sequence assigned here. |
| void openswmmvis::ExtensionStateRegistry::refreshActivityUi | ( | const QUuid & | ownerId, |
| OpenSWMM::Sdk::UiActivityState | state | ||
| ) |
Copy scoped UI state at an explicit registration/backfill boundary.
| [in] | ownerId | Private host lifetime. |
| [in] | state | Copied current UI metadata, with an established window identity. |
| void openswmmvis::ExtensionStateRegistry::refreshViews | ( | const QUuid & | sessionId, |
| OpenSWMM::Sdk::ViewSnapshot | snapshot | ||
| ) |
Refresh copied view state at a native construction/restoration boundary.
| [in] | sessionId | Registered open lifetime. |
| [in] | snapshot | Native copied metadata; supplied session/sequence are ignored. |
| QUuid openswmmvis::ExtensionStateRegistry::registerSession | ( | QObject * | owner, |
| const SessionMetadata & | metadata | ||
| ) |
Register one open lifetime, idempotently for an existing owner.
| [in] | owner | Required GUI-thread native QObject, guarded until destruction. |
| [in] | metadata | Owning current metadata. |
| bool openswmmvis::ExtensionStateRegistry::requestOperationCancel | ( | const QUuid & | operationId | ) |
Record an idempotent cancellation request before settlement.
| [in] | operationId | Active retained attempt. |
| void openswmmvis::ExtensionStateRegistry::retireOperation | ( | const QUuid & | operationId | ) |
Retire completed metadata while preserving its queued outcome history.
| [in] | operationId | Retained terminal attempt; active attempts are not removed. |
| void openswmmvis::ExtensionStateRegistry::retireSession | ( | const QUuid & | sessionId | ) |
Remove live state before queuing its terminal close record.
| [in] | sessionId | Registered open lifetime; repeated calls are inert. |
| ModelSessionState openswmmvis::ExtensionStateRegistry::session | ( | const QUuid & | sessionId | ) | const |
Copy one live state without creating it.
| [in] | sessionId | Open-lifetime identity. |
| QUuid openswmmvis::ExtensionStateRegistry::sessionForOwner | ( | QObject * | owner | ) | const |
Resolve an already registered owner without creating state.
| [in] | owner | Borrowed native object identity. |
|
signal |
Synchronously attach native facades after authoritative state is available.
| [in] | owner | Guarded native owner whose extensionSessionId is already set. |
| [in] | sessionId | Unique open-lifetime identity. |
| StateSnapshot openswmmvis::ExtensionStateRegistry::snapshot | ( | ) | const |
Copy all live states and the committed-publication watermark.
| void openswmmvis::ExtensionStateRegistry::startOperation | ( | const QUuid & | operationId, |
| const QDateTime & | startedAt = {} |
||
| ) |
Record native runner/worker start once for a live attempt.
| [in] | operationId | Unique retained attempt. |
| [in] | startedAt | Native timestamp, or invalid to use current UTC time. |
|
signal |
Deliver a copied transition from the ordered GUI-thread drain.
| [in] | event | Immutable observation; hosts recheck per receiver before forwarding. |
| void openswmmvis::ExtensionStateRegistry::updateSaveTarget | ( | const QUuid & | operationId, |
| const QString & | targetPath | ||
| ) |
Resolve an outer save destination selected after preparation began.
| [in] | operationId | Active save correlation identity. |
| [in] | targetPath | Final intended destination for the terminal outcome. |
| void openswmmvis::ExtensionStateRegistry::updateSession | ( | const QUuid & | sessionId, |
| const SessionMetadata & | metadata, | ||
| OpenSWMM::Sdk::StateChanges | changes = OpenSWMM::Sdk::StateChange::Metadata |
||
| ) |
Update copied native metadata and record a broad invalidation.
| [in] | sessionId | A registered open lifetime. |
| [in] | metadata | Owning latest native metadata. |
| [in] | changes | Invalidation categories; unchanged metadata alone is suppressed. |
|
signal |
Deliver domain metadata in the same globally ordered session/view drain.
| [in] | event | Copied native view invalidation. |
| ViewSnapshot openswmmvis::ExtensionStateRegistry::viewSnapshot | ( | const QUuid & | sessionId | ) | const |
Copy tracked view metadata without touching native objects.
| [in] | sessionId | Registered open lifetime. |
|
friend |