OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::runoff_iface::RunoffInterfaceFile Class Reference

Runoff interface file manager. More...

#include <RunoffInterface.hpp>

Collaboration diagram for openswmm::runoff_iface::RunoffInterfaceFile:

Public Member Functions

 ~RunoffInterfaceFile ()
 
int openForWrite (const std::string &path, int n_subcatch, int n_pollut, int flow_units)
 Open file for writing (SAVE mode).
 
int openForRead (const std::string &path, int n_subcatch, int n_pollut, int flow_units)
 Open file for reading (USE mode).
 
void saveResults (const SimulationContext &ctx, double dt)
 Save one timestep of runoff results to file.
 
bool readResults (SimulationContext &ctx)
 Read one timestep of runoff results from file.
 
void close ()
 Close the file and finalize header (write step count for SAVE mode).
 
bool isOpen () const
 

Detailed Description

Runoff interface file manager.

Constructor & Destructor Documentation

◆ ~RunoffInterfaceFile()

openswmm::runoff_iface::RunoffInterfaceFile::~RunoffInterfaceFile ( )
inline
Here is the call graph for this function:

Member Function Documentation

◆ close()

void openswmm::runoff_iface::RunoffInterfaceFile::close ( )

Close the file and finalize header (write step count for SAVE mode).

Here is the caller graph for this function:

◆ isOpen()

bool openswmm::runoff_iface::RunoffInterfaceFile::isOpen ( ) const
inline

◆ openForRead()

int openswmm::runoff_iface::RunoffInterfaceFile::openForRead ( const std::string &  path,
int  n_subcatch,
int  n_pollut,
int  flow_units 
)

Open file for reading (USE mode).

Returns
0 on success, error code on failure.

◆ openForWrite()

int openswmm::runoff_iface::RunoffInterfaceFile::openForWrite ( const std::string &  path,
int  n_subcatch,
int  n_pollut,
int  flow_units 
)

Open file for writing (SAVE mode).

Returns
0 on success, error code on failure.

◆ readResults()

bool openswmm::runoff_iface::RunoffInterfaceFile::readResults ( SimulationContext ctx)

Read one timestep of runoff results from file.

Parameters
ctxSimulation context (subcatchment results written here).
Returns
true if data was read, false if EOF.

◆ saveResults()

void openswmm::runoff_iface::RunoffInterfaceFile::saveResults ( const SimulationContext ctx,
double  dt 
)

Save one timestep of runoff results to file.

Parameters
ctxSimulation context (subcatchment results read from here).
dtTimestep duration (seconds).

The documentation for this class was generated from the following files: