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
propertyeditorregistry.h File Reference
#include <QHash>
#include <QString>
#include <functional>
#include <memory>
#include "ipropertyeditor.h"
Include dependency graph for propertyeditorregistry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PropertyEditorRegistry
 Process-wide dispatch table from editor kind → factory. More...
 

Detailed Description

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

Slice BM Phase 6.3.2 — PropertyEditorRegistry.

Maps an "editor kind" string → factory callable that produces an IPropertyEditor. Process-wide singleton (matches UnitSystem and FileFilterRegistry patterns already used by the GUI).

Concrete editor slices (BN/BO/BP/BQ/BR/BS/BT) call registerFactory() once at startup — typically from a small register_<slice>_editors() free function pulled in by main.cpp. PropertiesPanel consults the registry on every selection change via editorFor(ref, kind). A null factory result means "no concrete editor today" and the legacy property-tree path stays in charge — the registry never replaces existing behaviour silently.

Thread-safety: registration happens at startup; lookup is read-only after that. No mutex.