OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
ProcessComponentRegistry.hpp File Reference

Registry + config-file delivery for [PROCESS_COMPONENTS] (Unified Transport suite D-UT8; phases IO1–IO2). More...

#include <functional>
#include <map>
#include <string>
#include <vector>
Include dependency graph for ProcessComponentRegistry.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::components::ComponentConfigSections
 
struct  openswmm::components::ProcessComponentEntry
 
class  openswmm::components::ProcessComponentRegistry
 Process-global id → entry table. More...
 

Namespaces

namespace  openswmm
 
namespace  openswmm::components
 

Typedefs

using openswmm::components::ComponentConfigApply
 
using openswmm::components::ComponentConfigSave
 Save hook (IO3a): render this component's CURRENT engine state back to config-file text — the inverse of ComponentConfigApply.
 

Functions

std::string openswmm::components::read_component_config (const std::string &path, const std::string &base_dir, ComponentConfigSections &out)
 Parse a component configuration file (phase IO2).
 
std::string openswmm::components::parse_component_config_text (const std::string &text, const std::string &label, ComponentConfigSections &out)
 
std::vector< std::string > openswmm::components::resolve_process_components (SimulationContext &ctx, const std::string &base_dir)
 Resolve every [PROCESS_COMPONENTS] spec (phase IO1): look up the id, read its config file, and invoke the apply hook.
 

Detailed Description

Registry + config-file delivery for [PROCESS_COMPONENTS] (Unified Transport suite D-UT8; phases IO1–IO2).

Maps component ids to their config-apply hooks. Built-in engine components (reactions, water age, heat, transport engines, integrated2d) register here as their plan phases land; the ids are pre-declared so a registration line for a planned-but-not- yet-implemented component produces a precise diagnostic instead of "unknown id". Library-loaded HydroCouple components (hydrocouple_component_info()) arrive with phase HC2 and will resolve through PluginFactory discovery before falling back to this table.

Config files are the component's own .inp-dialect file (bracketed sections, ;; comments), parsed by read_component_config() with the [2D_MESH_FILE] path rules: relative paths resolve against the parent .inp's directory, one level only (a [PROCESS_COMPONENTS] section inside a component file is an error), parse failures are fatal.

See also
plans/transport/TRANSPORT_IO_PLUGIN_CONFIG_PLAN.md §2–§3
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0