NGen
Loading...
Searching...
No Matches
HY_CatchmentRealization::Response Class Reference

The response value distilled by this perspective, in every way the perspective can express it. More...

#include <HY_CatchmentRealization.hpp>

+ Collaboration diagram for HY_CatchmentRealization::Response:

Public Member Functions

 Response ()=default
 A response expressing nothing yet.
 
 Response (Quantity quantity, double value)
 A response expressing value as quantity, for a perspective that offers just one.
 
std::optional< double > in (Quantity quantity) const
 The value as quantity, or empty where this perspective does not express it.
 
void set (Quantity quantity, double value)
 Offer value as quantity, in that quantity's canonical unit.
 

Private Attributes

std::array< std::optional< double >, quantity_count > values {}
 

Detailed Description

The response value distilled by this perspective, in every way the perspective can express it.

A formulation typically answers in a depth, because that is what realization::Formulation::get_response asks its model for. What a depth means for the feature is the perspective's to say, so each subtype expresses it in the terms its own topology implies – a face has an extent to spread it over, an edge does not.

A perspective offers what it can express of the step so a caller that is handed something it cannot read finds out by asking.

Constructor & Destructor Documentation

◆ Response() [1/2]

HY_CatchmentRealization::Response::Response ( )
default

A response expressing nothing yet.

◆ Response() [2/2]

HY_CatchmentRealization::Response::Response ( Quantity quantity,
double value )
inline

A response expressing value as quantity, for a perspective that offers just one.

References set().

Member Function Documentation

◆ in()

std::optional< double > HY_CatchmentRealization::Response::in ( Quantity quantity) const
inline

The value as quantity, or empty where this perspective does not express it.

References values.

Referenced by HY_CatchmentArea::get_response(), and ngen::Layer::update_models().

◆ set()

void HY_CatchmentRealization::Response::set ( Quantity quantity,
double value )
inline

Offer value as quantity, in that quantity's canonical unit.

References values.

Referenced by Response(), and HY_CatchmentArea::get_response().

Member Data Documentation

◆ values

std::array<std::optional<double>, quantity_count> HY_CatchmentRealization::Response::values {}
private

Referenced by in(), and set().


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