OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm_process_components.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: Apache-2.0
2 *
3 * Copyright 2026 Caleb Buahin
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
35
36#ifndef OPENSWMM_PROCESS_COMPONENTS_H
37#define OPENSWMM_PROCESS_COMPONENTS_H
38
39#include "openswmm_engine.h"
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
47
56 char* id_buf, int id_len, char* config_buf, int config_len,
57 char* resolved_buf, int resolved_len);
58
61 const char* id);
62
68 const char* id, const char* config_path);
69
72 int idx);
73
74/* ---- Built-in component catalogue (U1, 2026-09-07) -----------------------
75 * The ids the engine knows how to bind, independent of any model: the six
76 * planned/implemented built-ins of the process-global registry. This is the
77 * catalogue the GUI's Process Components table offers in its Id combo. The
78 * external component-library discovery (`swmm_component_library_*`,
79 * PROG stream D) is a separate, later seam; this one never scans disk.
80 */
81
84
94 char* id_buf, int id_len, char* desc_buf, int desc_len,
95 int* implemented);
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif /* OPENSWMM_PROCESS_COMPONENTS_H */
#define SWMM_ENGINE_API
Definition openswmm_2d.h:53
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:51
OpenSWMM Engine — primary transparent C API (master header).
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.
Definition openswmm_process_components_impl.cpp:55
SWMM_ENGINE_API int swmm_process_component_known_count(void)
Number of built-in component ids.
Definition openswmm_process_components_impl.cpp:72
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.
Definition openswmm_process_components_impl.cpp:102
SWMM_ENGINE_API int swmm_process_component_remove(SWMM_Engine engine, int idx)
Remove registration idx (BUILDING/OPENED). Indexes shift.
Definition openswmm_process_components_impl.cpp:120
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.
Definition openswmm_process_components_impl.cpp:77
SWMM_ENGINE_API int swmm_process_component_count(SWMM_Engine engine)
Number of [PROCESS_COMPONENTS] registrations. -1 on bad handle.
Definition openswmm_process_components_impl.cpp:49
SWMM_ENGINE_API int swmm_process_component_find(SWMM_Engine engine, const char *id)
Registration index for id, or -1.
Definition openswmm_process_components_impl.cpp:92