#include <traceanalysisstore.h>
|
| static bool | prepare (const QString &path, const Dataset &data, QString *error, std::atomic_bool *cancel=nullptr) |
| | Create a schema-two GeoPackage of immutable hydraulic averages and run provenance.
|
| |
| static bool | save (const QString &path, const Result &r, QString *error, std::atomic_bool *cancel=nullptr) |
| | Persist or replace one estimate and its geometry/summary/diagnostic tables.
|
| |
| static std::shared_ptr< Dataset > | readDataset (const QString &path, QString *error) |
| | Restore a package topology and complete index-aligned SI averages into owning memory.
|
| |
| static bool | isPartial (const QString &path) |
| |
| static QVector< QJsonObject > | analyses (const QString &path, QString *error) |
| | Enumerate saved estimate recipes, styles, and summaries without reading every spatial result.
|
| |
| static std::shared_ptr< Result > | read (const QString &path, const QString &id, QString *error) |
| | Restore a saved estimate, first loading its complete dataset averages.
|
| |
| static std::shared_ptr< Result > | read (const QString &path, const QString &id, std::shared_ptr< const Dataset > data, QString *error) |
| | Restore saved estimate fields using already loaded averages.
|
| |
| static bool | saveStyle (const QString &path, const QString &id, const QJsonObject &style, QString *error) |
| | Replace a saved estimate default-style JSON value.
|
| |
◆ analyses()
| QVector< QJsonObject > openswmmvis::trace::AnalysisStore::analyses |
( |
const QString & |
path, |
|
|
QString * |
error |
|
) |
| |
|
static |
Enumerate saved estimate recipes, styles, and summaries without reading every spatial result.
- Parameters
-
| [in] | path | Package opened read-only and closed before return. |
| [out] | error | Optional failure diagnostic, unchanged on success. |
- Returns
- Owning recipe objects with IDs/style/summary; can contain rows read before a later caught failure.
◆ isPartial()
| bool openswmmvis::trace::AnalysisStore::isPartial |
( |
const QString & |
path | ) |
|
|
static |
True when the package was built from a running or cancelled output. Reads only the run metadata row.
- Parameters
-
| [in] | path | Package read independently on the caller thread. |
- Returns
- Metadata partial flag, or false for any open/read/parse failure; false does not establish package validity.
◆ prepare()
| bool openswmmvis::trace::AnalysisStore::prepare |
( |
const QString & |
path, |
|
|
const Dataset & |
data, |
|
|
QString * |
error, |
|
|
std::atomic_bool * |
cancel = nullptr |
|
) |
| |
|
static |
Create a schema-two GeoPackage of immutable hydraulic averages and run provenance.
- Parameters
-
| [in] | path | Package destination; existing files are accepted only when run ID, content fingerprint, and model fingerprint match. |
| [in] | data | Valid snapshot and aligned SI native node/link averages. |
| [out] | error | Optional failure diagnostic; not cleared on entry or success. An existing-package identity mismatch can return false without a new diagnostic. |
| [in] | cancel | Optional atomic cancellation flag checked during row writes and before commit. |
- Returns
- True for a compatible existing package or after staging/transaction commit and rename; false removes newly staged files on caught failure.
Owns/closes GDAL handles on the caller thread. Creates parent directories as needed; does not replace an incompatible existing package.
◆ read() [1/2]
| std::shared_ptr< Result > openswmmvis::trace::AnalysisStore::read |
( |
const QString & |
path, |
|
|
const QString & |
id, |
|
|
QString * |
error |
|
) |
| |
|
static |
Restore a saved estimate, first loading its complete dataset averages.
- Parameters
-
| [in] | path | Package path. |
| [in] | id | Saved analysis identifier. |
| [out] | error | Optional failure diagnostic, unchanged on success. |
- Returns
- Owning shared result/dataset or null on read/validation failure.
◆ read() [2/2]
| std::shared_ptr< Result > openswmmvis::trace::AnalysisStore::read |
( |
const QString & |
path, |
|
|
const QString & |
id, |
|
|
std::shared_ptr< const Dataset > |
data, |
|
|
QString * |
error |
|
) |
| |
|
static |
Restore saved estimate fields using already loaded averages.
- Parameters
-
| [in] | path | Package opened independently read-only. |
| [in] | id | Analysis ID whose recipe and node/link tables are read. |
| [in] | data | Non-null matching immutable dataset; caller ensures it belongs to this package/run. |
| [out] | error | Optional failure diagnostic, unchanged on success. |
- Returns
- Owning shared result referencing data, or null for missing/invalid recipe or incomplete/mismatched trace rows.
◆ readDataset()
| std::shared_ptr< Dataset > openswmmvis::trace::AnalysisStore::readDataset |
( |
const QString & |
path, |
|
|
QString * |
error |
|
) |
| |
|
static |
Restore a package topology and complete index-aligned SI averages into owning memory.
- Parameters
-
| [in] | path | Read-only GeoPackage path. |
| [out] | error | Optional caught-failure diagnostic, unchanged on success. |
- Returns
- Shared owning dataset, or null for unavailable/schema-invalid/incomplete or mismatched row data. Geometry comes from saved snapshot JSON, not feature geometry.
◆ save()
| bool openswmmvis::trace::AnalysisStore::save |
( |
const QString & |
path, |
|
|
const Result & |
r, |
|
|
QString * |
error, |
|
|
std::atomic_bool * |
cancel = nullptr |
|
) |
| |
|
static |
Persist or replace one estimate and its geometry/summary/diagnostic tables.
- Parameters
-
| [in] | path | Existing writable package with matching run ID and fingerprint. |
| [in] | r | Result with non-null aligned dataset, valid in-range seed, and UUID-like lowercase hex analysis ID. |
| [out] | error | Optional caught-failure diagnostic, unchanged on success. |
| [in] | cancel | Optional cancellation flag checked during row writes and before commit. |
- Returns
- True after transaction commit; false attempts rollback on failure/cancellation.
Existing rows/tables for the analysis ID are replaced; failure preserves the in-memory result for caller retry. GDAL handles never leave the calling thread.
◆ saveStyle()
| bool openswmmvis::trace::AnalysisStore::saveStyle |
( |
const QString & |
path, |
|
|
const QString & |
id, |
|
|
const QJsonObject & |
style, |
|
|
QString * |
error |
|
) |
| |
|
static |
Replace a saved estimate default-style JSON value.
- Parameters
-
| [in] | path | Existing package opened for update on the caller thread. |
| [in] | id | Existing analysis ID matched exactly. |
| [in] | style | Style metadata copied without semantic validation. |
| [out] | error | Optional failure diagnostic, unchanged on success. |
- Returns
- True after GDAL SetFeature() succeeds; false for absent ID or update/open failure. No explicit transaction or close-flush error check is performed.
The documentation for this class was generated from the following files: