![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Process-global id → entry table. More...
#include <ProcessComponentRegistry.hpp>
Public Member Functions | |
| void | register_component (const std::string &id, std::string description, ComponentConfigApply apply, ComponentConfigSave save=nullptr) |
| Insert or replace a complete component-hook entry and clear its pending phase. | |
| const ProcessComponentEntry * | find (const std::string &id) const |
| Borrow one exact component registry entry. | |
| std::vector< std::string > | known_ids () const |
| Copy every registered key, including planned entries without apply hooks. | |
Static Public Member Functions | |
| static ProcessComponentRegistry & | instance () |
| Access the process-global lazily constructed builtin hook registry. | |
Process-global id → entry table.
Planned built-in ids are pre-seeded (see the .cpp); implemented components overwrite their entry via register_component() at engine static-init or test setup. Not thread-safe for registration (register at startup only).
| const ProcessComponentEntry * openswmm::components::ProcessComponentRegistry::find | ( | const std::string & | id | ) | const |
Borrow one exact component registry entry.
| id | Case-sensitive key; no path or version parsing is applied. |
|
static |
Access the process-global lazily constructed builtin hook registry.
| std::vector< std::string > openswmm::components::ProcessComponentRegistry::known_ids | ( | ) | const |
Copy every registered key, including planned entries without apply hooks.
| void openswmm::components::ProcessComponentRegistry::register_component | ( | const std::string & | id, |
| std::string | description, | ||
| ComponentConfigApply | apply, | ||
| ComponentConfigSave | save = nullptr ) |
Insert or replace a complete component-hook entry and clear its pending phase.
| id | Exact case-sensitive key, copied without empty/duplicate validation. |
| description | Human-readable description moved into storage. |
| apply | Required callable for an implemented entry; no nonnull check occurs. Hooks receive mutable engine state and are expected to append diagnostics rather than throw, though this registry installs no exception boundary. |
| save | Optional serialization hook moved into storage; null declines authored serialization and lets the writer use its file-copy fallback. Register at startup with no concurrent readers; replacement invalidates prior hook assumptions. |