OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
TypeConverter.hpp
Go to the documentation of this file.
1
17#ifndef OPENSWMM_ENGINE_TYPE_CONVERTER_HPP
18#define OPENSWMM_ENGINE_TYPE_CONVERTER_HPP
19
20#include "../core/SimulationContext.hpp"
21#include "../data/NodeData.hpp"
22#include "../data/LinkData.hpp"
23#include <string>
24#include <vector>
25
26namespace openswmm::edit {
27
28// ============================================================================
29// Conversion result
30// ============================================================================
31
34 std::vector<std::string> cleared_fields;
35 std::vector<std::string> warnings;
36};
37
38// ============================================================================
39// Conversion functions
40// ============================================================================
41
47
53
54} // namespace openswmm::edit
55
56#endif /* OPENSWMM_ENGINE_TYPE_CONVERTER_HPP */
Definition ObjectDeleter.cpp:17
ConversionResult convert_node(SimulationContext &ctx, int idx, NodeType new_type)
Convert a node in-place to new_type.
Definition TypeConverter.cpp:94
ConversionResult convert_link(SimulationContext &ctx, int idx, LinkType new_type)
Convert a link in-place to new_type.
Definition TypeConverter.cpp:223
LinkType
Link type codes.
Definition LinkData.hpp:42
NodeType
Node type codes.
Definition NodeData.hpp:43
Central, reentrant simulation context.
Definition SimulationContext.hpp:274
Definition TypeConverter.hpp:32
int new_type
C-API type enum value.
Definition TypeConverter.hpp:33
std::vector< std::string > warnings
Non-fatal topology warnings.
Definition TypeConverter.hpp:35
std::vector< std::string > cleared_fields
Type-specific fields cleared.
Definition TypeConverter.hpp:34