OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches

Shared C↔internal type mapping utilities for node and link type enums. More...

Include dependency graph for TypeHelpers.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmm
 

Functions

bool openswmm::c_to_internal_node_type (int c_type, NodeType &out_type) noexcept
 
int openswmm::internal_to_c_node_type (NodeType type) noexcept
 
bool openswmm::c_to_internal_link_type (int c_type, LinkType &out_type) noexcept
 
int openswmm::internal_to_c_link_type (LinkType type) noexcept
 

Detailed Description

Shared C↔internal type mapping utilities for node and link type enums.

The public C API uses SWMM_NodeType / SWMM_LinkType enums whose ordinal values differ from the internal NodeType / LinkType enums (STORAGE vs DIVIDER are swapped for nodes). These helpers centralise the mapping so that both the C API impl files and the edit layer (TypeConverter, ObjectDeleter) use the same translation.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License