OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
TypeConverter.hpp
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
32
33#ifndef OPENSWMM_ENGINE_TYPE_CONVERTER_HPP
34#define OPENSWMM_ENGINE_TYPE_CONVERTER_HPP
35
37#include "../data/NodeData.hpp"
38#include "../data/LinkData.hpp"
39#include <string>
40#include <vector>
41
42namespace openswmm::edit {
43
44// ============================================================================
45// Conversion result
46// ============================================================================
47
50 std::vector<std::string> cleared_fields;
51 std::vector<std::string> warnings;
52};
53
54// ============================================================================
55// Conversion functions
56// ============================================================================
57
63
69
70} // namespace openswmm::edit
71
72#endif /* OPENSWMM_ENGINE_TYPE_CONVERTER_HPP */
Structure-of-Arrays (SoA) storage for all node types.
The central, reentrant simulation context for the new engine.
Definition ObjectDeleter.cpp:37
ConversionResult convert_node(SimulationContext &ctx, int idx, NodeType new_type)
Convert a node in-place to new_type.
Definition TypeConverter.cpp:64
ConversionResult convert_link(SimulationContext &ctx, int idx, LinkType new_type)
Convert a link in-place to new_type.
Definition TypeConverter.cpp:185
LinkType
Link type codes.
Definition LinkData.hpp:58
NodeType
Node type codes.
Definition NodeData.hpp:59
Central, reentrant simulation context.
Definition SimulationContext.hpp:353
Definition TypeConverter.hpp:48
int new_type
C-API type enum value.
Definition TypeConverter.hpp:49
std::vector< std::string > warnings
Non-fatal topology warnings.
Definition TypeConverter.hpp:51
std::vector< std::string > cleared_fields
Type-specific fields cleared.
Definition TypeConverter.hpp:50