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

Header-only helpers shared by 2D model serialization consumers (InpWriter [2D_*] emission, GeoPackage writer). More...

#include "MeshData.hpp"
#include "BoundaryData.hpp"
#include "PendingRows2D.hpp"
#include <algorithm>
#include <cstdint>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
Include dependency graph for Serialize2D.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 

Functions

std::vector< PendingBoundaryRowopenswmm::twoD::collectBCRows (const std::vector< PendingBoundaryRow > *pending, const BoundaryData *boundary, bool drained)
 Collect [2D_BOUNDARY_CONDITIONS]-shaped rows for serialization.
 
std::vector< PendingEdgeConveyanceRowopenswmm::twoD::collectConveyanceRows (const std::vector< PendingEdgeConveyanceRow > *pending, const MeshData *mesh, bool drained)
 Collect [2D_EDGE_CONVEYANCE]-shaped rows for serialization.
 

Detailed Description

Header-only helpers shared by 2D model serialization consumers (InpWriter [2D_*] emission, GeoPackage writer).

Collect the authored row form of boundary conditions and edge conveyance from whichever source is still available:

  • the parse-time pending rows (retained after the initialize() drain) — byte-faithful, preserves group labels and the TS-vs-constant distinction; or
  • the drained BoundaryData / MeshData::edge_conveyance slots (API-built models, or legacy states with cleared pending rows) — loses the BC group label.

Define-free and dependency-free beyond the plain 2D data structs, so it compiles in builds without OPENSWMM_HAS_2D (e.g. inside the geopackage static lib).

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