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
controlruleregistry.h File Reference

Slice BR Phase 6.8.1 — project-scoped factory + lookup for ControlRuleProvider instances. More...

#include "controls/controlruleprovider.h"
#include <QHash>
#include <QObject>
#include <QString>
#include <QVector>
Include dependency graph for controlruleregistry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::controls::ControlRuleRegistry
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::controls
 

Detailed Description

Slice BR Phase 6.8.1 — project-scoped factory + lookup for ControlRuleProvider instances.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Mirrors CurveRegistry / PatternRegistry / TimeseriesRegistry in structure. Engine I/O uses the existing openswmm_controls.h C ABI (swmm_control_count, _get_rule, _get_id, _add_rule, _clear_rules) — no new mutation surface is required for the CRUD editor because all four operations reduce to snapshot+clear+re-add, matching today's SWMMControlRulePropertyAdapter::setRuleText.

The registry is owned by SWMMModelLayer and accessed via layer->ensureControlRuleRegistry() (lazy construction, same as ensureCurveRegistry / ensurePatternRegistry). All UI mutations route through SWMMModelLayer::applyControlRule* helpers which call the registry's add/remove/rename + the engine API and then emit SWMMModelLayer::controlRulesChanged(QString) to fan out to every subscribed surface (Object Browser, property panel, future RulesEditorDialog, future scenario-comparison views).