diff options
author | hop311 <hop3114@gmail.com> | 2024-02-04 15:08:32 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-02-04 15:08:32 +0100 |
commit | 3f6d7351816b0e089495b2f15dc1c956f3151f5a (patch) | |
tree | 606aacf5861d3897f102917cc3af1d6be3471f9f /src/openvic-simulation/dataloader/NodeTools.cpp | |
parent | 068c13ede817d17df599ca3481261bf17ed95604 (diff) |
Reworked ReturnByValue, warn_or_error, expect_date_[identifier_or_]string
Diffstat (limited to 'src/openvic-simulation/dataloader/NodeTools.cpp')
-rw-r--r-- | src/openvic-simulation/dataloader/NodeTools.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/openvic-simulation/dataloader/NodeTools.cpp b/src/openvic-simulation/dataloader/NodeTools.cpp index 7ab0dbe..297937a 100644 --- a/src/openvic-simulation/dataloader/NodeTools.cpp +++ b/src/openvic-simulation/dataloader/NodeTools.cpp @@ -169,6 +169,14 @@ node_callback_t NodeTools::expect_date(callback_t<Date> callback) { return expect_identifier(expect_date_str(callback)); } +node_callback_t NodeTools::expect_date_string(callback_t<Date> callback) { + return expect_string(expect_date_str(callback)); +} + +node_callback_t NodeTools::expect_date_identifier_or_string(callback_t<Date> callback) { + return expect_identifier_or_string(expect_date_str(callback)); +} + node_callback_t NodeTools::expect_years(callback_t<Timespan> callback) { return expect_uint<Timespan::day_t>([callback](Timespan::day_t val) -> bool { return callback(Timespan::from_years(val)); |