diff options
author | Hop311 <Hop3114@gmail.com> | 2024-02-05 20:38:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-05 20:38:23 +0100 |
commit | 6489da997cddb20667db0455fa4f38319dc7c883 (patch) | |
tree | 4e343f81b13f166ad4a478962348d4734ea7e11b /src/openvic-simulation/dataloader/NodeTools.cpp | |
parent | 068c13ede817d17df599ca3481261bf17ed95604 (diff) | |
parent | 87fa1c74281a651b23089079c4c1621d4fb66d73 (diff) |
Merge pull request #145 from OpenVicProject/gui-loading
Added support for loading all gui files
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)); |