#include <tracedata.h>
|
| QJsonObject | toJson () const |
| | Copy topology/geometry and model fingerprint into a JSON value.
|
| |
| bool | valid (QString *error=nullptr) const |
| | Validate supported node identity/type, link connectivity/length, and supplied geometry.
|
| |
◆ capture()
Copy editing-model topology/geometry and classify unresolved exchange/loss flags.
- Parameters
-
| [in] | model | Borrowed loaded model on the GUI/engine-owning thread; no running handle crosses to a worker. |
| [out] | error | Optional diagnostic on unavailable/invalid topology, unchanged on success. |
- Returns
- Owning validated snapshot, or empty on failure. Link lengths are converted to metres; geometry stays in model map coordinates and captured CRS.
SHA-256 modelFingerprint includes IDs/types/topology/lengths/flags but excludes coordinate geometry and CRS, so geometry-only changes do not invalidate hydraulic averages.
◆ fromJson()
| Snapshot openswmmvis::trace::Snapshot::fromJson |
( |
const QJsonObject & |
j | ) |
|
|
static |
Decode saved topology using Qt default conversions.
- Parameters
-
- Returns
- Owning snapshot; malformed/missing fields use defaults and must be checked with valid().
◆ toJson()
| QJsonObject openswmmvis::trace::Snapshot::toJson |
( |
| ) |
const |
Copy topology/geometry and model fingerprint into a JSON value.
- Returns
- Owning node/link/CRS metadata object, with no validation or unit conversion.
◆ valid()
| bool openswmmvis::trace::Snapshot::valid |
( |
QString * |
error = nullptr | ) |
const |
Validate supported node identity/type, link connectivity/length, and supplied geometry.
- Parameters
-
| [out] | error | Optional first-failure diagnostic, unchanged on success. |
- Returns
- False for no nodes, exact duplicate/empty IDs, node types outside 0..3, invalid endpoints/nonfinite negative lengths, or nonfinite supplied coordinates.
Does not validate CRS, link type, case-insensitive ID collisions, or require geometry for every object.
◆ links
| QVector<Link> openswmmvis::trace::Snapshot::links |
◆ modelFingerprint
| QString openswmmvis::trace::Snapshot::modelFingerprint |
◆ nodes
| QVector<Node> openswmmvis::trace::Snapshot::nodes |
◆ wkt
| QString openswmmvis::trace::Snapshot::wkt |
The documentation for this struct was generated from the following files:
- /home/runner/work/openswmm.gui/openswmm.gui/include/output/tracedata.h
- /home/runner/work/openswmm.gui/openswmm.gui/src/output/tracedata.cpp
- /home/runner/work/openswmm.gui/openswmm.gui/src/output/tracesnapshot.cpp