OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
EngineAbi.cpp File Reference

Engine-owned runtime ABI identity for native plugin and Python handle sharing. More...

#include "openswmm/engine/openswmm_engine.h"
#include "openswmm_abi_tag.h"
Include dependency graph for EngineAbi.cpp:

Functions

const char * swmm_engine_abi_tag (void)
 Identify the public C ABI compiled into the running engine image.
 

Detailed Description

Engine-owned runtime ABI identity for native plugin and Python handle sharing.

The tag is compiled into this engine image from its build-generated header. Querying it allocates nothing, creates no engine instance and is safe from every thread and lifecycle state. It identifies interface/build compatibility rather than model or solver behavior.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License
Apache-2.0

Function Documentation

◆ swmm_engine_abi_tag()

const char * swmm_engine_abi_tag ( void )

Identify the public C ABI compiled into the running engine image.

Returns
Borrowed immutable UTF-8 tag, valid while the library remains loaded; never free it.
Note
Thread-safe, requires no engine handle and performs no allocation or file IO. Compare with OPENSWMM_ENGINE_ABI_TAG from the installed openswmm_abi_tag.h before passing native engine handles across a GUI/plugin/Python boundary. Public-header, optional-module or build-ABI changes automatically change the tag. Comment-only header changes may conservatively change it too.