![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
C API — [PROCESS_COMPONENTS] registrations (E-C3 subset of the transport IO plan §5): enumerate, find, register, remove. More...
#include "openswmm_engine.h"Go to the source code of this file.
Functions | |
| SWMM_ENGINE_API int | swmm_process_component_count (SWMM_Engine engine) |
| Number of [PROCESS_COMPONENTS] registrations. -1 on bad handle. | |
| SWMM_ENGINE_API int | swmm_process_component_get (SWMM_Engine engine, int idx, char *id_buf, int id_len, char *config_buf, int config_len, char *resolved_buf, int resolved_len) |
| Read one registration. | |
| SWMM_ENGINE_API int | swmm_process_component_find (SWMM_Engine engine, const char *id) |
Registration index for id, or -1. | |
| SWMM_ENGINE_API int | swmm_process_component_register (SWMM_Engine engine, const char *id, const char *config_path) |
| Register a component (BUILDING/OPENED). Duplicate id refused. The config file need not exist yet. | |
| SWMM_ENGINE_API int | swmm_process_component_remove (SWMM_Engine engine, int idx) |
Remove registration idx (BUILDING/OPENED). Indexes shift. | |
| SWMM_ENGINE_API int | swmm_process_component_known_count (void) |
| Number of built-in component ids. | |
| SWMM_ENGINE_API int | swmm_process_component_known_get (int idx, char *id_buf, int id_len, char *desc_buf, int desc_len, int *implemented) |
Read built-in id idx. | |
C API — [PROCESS_COMPONENTS] registrations (E-C3 subset of the transport IO plan §5): enumerate, find, register, remove.
The GUI's file-binding surface: an editor locates its component's config path here, and the "create component + config file" flow registers first, then writes the file (registration with a not-yet-existing config path is legal — resolve reads it at the next open).
| SWMM_ENGINE_API int swmm_process_component_count | ( | SWMM_Engine | engine | ) |
Number of [PROCESS_COMPONENTS] registrations. -1 on bad handle.
| SWMM_ENGINE_API int swmm_process_component_find | ( | SWMM_Engine | engine, |
| const char * | id ) |
Registration index for id, or -1.
| SWMM_ENGINE_API int swmm_process_component_get | ( | SWMM_Engine | engine, |
| int | idx, | ||
| char * | id_buf, | ||
| int | id_len, | ||
| char * | config_buf, | ||
| int | config_len, | ||
| char * | resolved_buf, | ||
| int | resolved_len ) |
Read one registration.
| id_buf | [out] Component id (NUL-terminated). |
| config_buf | [out] The config="…" argument as written (may be ""). |
| resolved_buf | [out] Effective path the config was READ from at the last open ("" until resolution). |
| SWMM_ENGINE_API int swmm_process_component_known_count | ( | void | ) |
Number of built-in component ids.
| SWMM_ENGINE_API int swmm_process_component_known_get | ( | int | idx, |
| char * | id_buf, | ||
| int | id_len, | ||
| char * | desc_buf, | ||
| int | desc_len, | ||
| int * | implemented ) |
Read built-in id idx.
| id_buf | [out] The id (e.g. "org.hydrocouple.openswmm.reactions"). |
| desc_buf | [out] Short description. |
| implemented | [out] 1 when the component has an apply hook in this build, 0 when it is a planned placeholder (its registration line is diagnosed at open). |
| SWMM_ENGINE_API int swmm_process_component_register | ( | SWMM_Engine | engine, |
| const char * | id, | ||
| const char * | config_path ) |
Register a component (BUILDING/OPENED). Duplicate id refused. The config file need not exist yet.
| SWMM_ENGINE_API int swmm_process_component_remove | ( | SWMM_Engine | engine, |
| int | idx ) |
Remove registration idx (BUILDING/OPENED). Indexes shift.