![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include "feature/featuregeometry.h"#include "feature/featuretypes.h"#include <QString>#include <QStringList>#include <QVector>Go to the source code of this file.
Classes | |
| class | openswmmvis::feature::FeatureStore |
| One open, writable OGR table inside a GeoPackage. More... | |
Namespaces | |
| namespace | openswmmvis |
| namespace | openswmmvis::feature |
The GeoPackage read/write backing store for editable feature layers (workplans/MESH_DIALOG_TABS_AND_FEATURE_LAYERS_PLAN_2026-09-07.md §3.1, D2).
THIS IS THE FIRST OGR WRITE PATH IN THE REPOSITORY. Before it, every vector source was opened GDAL_OF_READONLY (gisvectorlayer.cpp:1088, :1170) and no call site anywhere under src/ used CreateLayer, CreateFeature, SetFeature, DeleteFeature or CreateField. Treat the invariants below as load-bearing.
A FeatureStore's GDALDataset must not cross threads — the same rule the mesh pipeline states at meshgenerationdialog.h:89-92 and the attribute-assign dialog at meshattributeassigndialog.h:44-47, where workers RE-OPEN every source by path. This store is owned by FeatureLayer on the GUI thread. Mesh generation and attribute assignment continue to re-open the .gpkg read-only by path on their workers; that is safe concurrently with this handle because every write here is autocommitted and no long-lived SQL transaction is held open (undo granularity comes from the command stack, not from SQL).
Every mutating call takes an optional QString* and returns false / an invalid id on failure, leaving the store unchanged. Callers surface the message; the store never shows UI and never asserts on user-reachable input.