|
NGen
|
Parsed representation of a realization config's output settings. More...
#include <output.hpp>
Collaboration diagram for realization::config::Output:Public Member Functions | |
| Output ()=default | |
Static Public Member Functions | |
| static Output | parse_block (const boost::property_tree::ptree &output_tree) |
| Parse the modern "output" block sub-tree. | |
| static Output | parse_legacy (const boost::property_tree::ptree &realization_tree) |
| Build from the deprecated top-level keys. | |
| static Output | from_realization (const boost::property_tree::ptree &realization_tree) |
| Prefer the modern "output" block; otherwise fall back to legacy keys, then normalize the root (see normalize_root) so an Output built through this entry point exposes a trailing-slash directory. | |
Public Attributes | |
| std::string | root |
| Output directory. | |
| OutputDomain | catchment |
| OutputDomain | nexus |
| int | precision = DEFAULT_PRECISION |
| Global value precision for text output backends. | |
| bool | from_legacy_keys = false |
| True when built from the deprecated top-level keys (used to warn). | |
Static Public Attributes | |
| static constexpr int | DEFAULT_PRECISION = 9 |
| Significant digits applied uniformly when a text backend (CSV) renders values. | |
Static Private Member Functions | |
| static std::string | normalize_root (const std::string &configured_root) |
| Normalize a configured directory to a trailing-slash path, falling back to "./" when unset. | |
Parsed representation of a realization config's output settings.
Modern form (preferred):
For backward compatibility, when no "output" block is present the deprecated top-level keys output_root / disable_catchment_output / per_formulation_nexus_files are honored instead (see from_realization).
|
default |
|
inlinestatic |
Prefer the modern "output" block; otherwise fall back to legacy keys, then normalize the root (see normalize_root) so an Output built through this entry point exposes a trailing-slash directory.
parse_block / parse_legacy return the raw root. Creating the directory is left to the caller (see create_output_directory) – parsing has no side effect.
References normalize_root(), realization::config::OUTPUT_CONFIG_KEY, parse_block(), parse_legacy(), and root.
Referenced by realization::Formulation_Manager::initialize_output_config().
|
inlinestaticprivate |
Normalize a configured directory to a trailing-slash path, falling back to "./" when unset.
Pure: creating the directory is a separate side effect (see create_output_directory).
Referenced by from_realization().
|
inlinestatic |
Parse the modern "output" block sub-tree.
References catchment, DEFAULT_PRECISION, nexus, precision, and root.
Referenced by from_realization().
|
inlinestatic |
Build from the deprecated top-level keys.
References catchment, realization::config::OutputDomain::enable, realization::config::OutputDomain::format, from_legacy_keys, realization::config::LEGACY_DISABLE_CATCHMENT_KEY, realization::config::LEGACY_OUTPUT_ROOT_KEY, realization::config::LEGACY_PER_FORMULATION_KEY, realization::config::netcdf, nexus, and root.
Referenced by from_realization().
| OutputDomain realization::config::Output::catchment |
Referenced by realization::config::make_catchment_output_mgr(), parse_block(), and parse_legacy().
|
staticconstexpr |
Significant digits applied uniformly when a text backend (CSV) renders values.
Referenced by parse_block().
| bool realization::config::Output::from_legacy_keys = false |
True when built from the deprecated top-level keys (used to warn).
Referenced by realization::Formulation_Manager::initialize_output_config(), and parse_legacy().
| OutputDomain realization::config::Output::nexus |
| int realization::config::Output::precision = DEFAULT_PRECISION |
Global value precision for text output backends.
Referenced by realization::config::make_catchment_output_mgr(), and parse_block().
| std::string realization::config::Output::root |
Output directory.
Built through from_realization this is the normalized root: a trailing-slash path ("./" when unset). The default constructor and the public parse_block / parse_legacy leave it as the raw configured value. Creating the directory on disk is a separate step – see create_output_directory – performed by the caller near where output is written, so config parsing has no filesystem side effect.
Referenced by from_realization(), realization::config::make_catchment_output_mgr(), parse_block(), and parse_legacy().