NGen
Loading...
Searching...
No Matches
utils::OutputField Struct Reference

One output column: the mapping from a source variable to its output, positionally aligned with the values a formulation supplies to CatchmentOutputsMgr::receive_data_entry. More...

#include <CatchmentOutputsMgr.hpp>

+ Collaboration diagram for utils::OutputField:

Public Member Functions

 OutputField (std::string source_name, std::string output_name, std::optional< std::string > units, std::map< std::string, std::string > attributes={})
 A column mapping a source variable to a (possibly renamed) output name.
 

Public Attributes

std::string source_name
 the model's output variable – the value's source
 
std::string output_name
 the name written to the sink; may alias source_name
 
std::optional< std::string > units
 nullopt when the source reports no units
 
std::map< std::string, std::string > attributes
 

Detailed Description

One output column: the mapping from a source variable to its output, positionally aligned with the values a formulation supplies to CatchmentOutputsMgr::receive_data_entry.

source_name is the model's output variable – where the value comes from; output_name is the name written to the sink (a CSV header, or a variable name in a self-describing format) and may alias the source. Codifying both lets a backend describe the source->output relationship (and carry richer per-column metadata in attributes, e.g. long_name / coordinates) rather than only emitting a label. units is the column's units, or std::nullopt when the source reports none – distinct from a present-but-empty/dimensionless units string. A field states all three explicitly (there is no defaulted or implicit construction), so units is always a conscious choice at the point of construction.

Constructor & Destructor Documentation

◆ OutputField()

utils::OutputField::OutputField ( std::string source_name,
std::string output_name,
std::optional< std::string > units,
std::map< std::string, std::string > attributes = {} )
inline

A column mapping a source variable to a (possibly renamed) output name.

Member Data Documentation

◆ attributes

std::map<std::string, std::string> utils::OutputField::attributes

◆ output_name

std::string utils::OutputField::output_name

the name written to the sink; may alias source_name

◆ source_name

std::string utils::OutputField::source_name

the model's output variable – the value's source

◆ units

std::optional<std::string> utils::OutputField::units

nullopt when the source reports no units


The documentation for this struct was generated from the following file: