OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::input::MultiColumnFileCache Class Reference

Per-resolve-pass cache keyed by resolved path. More...

#include <MultiColumnSeriesFile.hpp>

Collaboration diagram for openswmm::input::MultiColumnFileCache:

Public Member Functions

const ParsedSeriesFileget_or_parse (const std::string &abs_path, std::vector< std::string > &errors, SeriesFileStatus *status=nullptr)
 Return the parsed file, parsing it on first request.
 
int parse_count () const noexcept
 Number of actual parse attempts (test hook for the single-read assertion).
 

Detailed Description

Per-resolve-pass cache keyed by resolved path.

One instance is shared by the rain-gage and timeseries loaders so a file referenced by both parses once (plan ยง5 single-read guarantee). Failures are cached too, so N consumers of a broken file trigger one open attempt.

Member Function Documentation

◆ get_or_parse()

const ParsedSeriesFile * openswmm::input::MultiColumnFileCache::get_or_parse ( const std::string & abs_path,
std::vector< std::string > & errors,
SeriesFileStatus * status = nullptr )

Return the parsed file, parsing it on first request.

Parameters
abs_pathResolved path (the cache key).
errorsReceives file-level parse errors (first parse only).
statusOptional; receives the entry's status.
Returns
Pointer into the cache (valid for the cache's lifetime), or nullptr when the file could not be parsed.
Here is the call graph for this function:

◆ parse_count()

int openswmm::input::MultiColumnFileCache::parse_count ( ) const
inlinenoexcept

Number of actual parse attempts (test hook for the single-read assertion).


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