SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmmvis::trace::Snapshot Struct Reference

#include <tracedata.h>

Collaboration diagram for openswmmvis::trace::Snapshot:

Public Member Functions

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.
 

Static Public Member Functions

static Snapshot fromJson (const QJsonObject &j)
 Decode saved topology using Qt default conversions.
 
static Snapshot capture (SWMMModelLayer *model, QString *error)
 Copy editing-model topology/geometry and classify unresolved exchange/loss flags.
 

Public Attributes

QVector< Node > nodes
 
QVector< Link > links
 
QString wkt
 
QString modelFingerprint
 

Member Function Documentation

◆ capture()

Snapshot openswmmvis::trace::Snapshot::capture ( SWMMModelLayer *  model,
QString *  error 
)
static

Copy editing-model topology/geometry and classify unresolved exchange/loss flags.

Parameters
[in]modelBorrowed loaded model on the GUI/engine-owning thread; no running handle crosses to a worker.
[out]errorOptional 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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromJson()

Snapshot openswmmvis::trace::Snapshot::fromJson ( const QJsonObject &  j)
static

Decode saved topology using Qt default conversions.

Parameters
[in]jSnapshot node/link/CRS document.
Returns
Owning snapshot; malformed/missing fields use defaults and must be checked with valid().
Here is the caller graph for this function:

◆ 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.
Here is the caller graph for this function:

◆ valid()

bool openswmmvis::trace::Snapshot::valid ( QString *  error = nullptr) const

Validate supported node identity/type, link connectivity/length, and supplied geometry.

Parameters
[out]errorOptional 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.

Here is the caller graph for this function:

Member Data Documentation

◆ 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: