aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/dataloader/NodeTools.hpp
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2023-12-19 03:41:57 +0100
committer Spartan322 <Megacake1234@gmail.com>2023-12-24 22:57:56 +0100
commit3770de7a03879a8ff6b8cf22b402217c19fa2b53 (patch)
tree0d77d82ab8cea8955e2b86d883d1c2fd10813717 /src/openvic-simulation/dataloader/NodeTools.hpp
parent14e47d58b85f657ec1fed8abf88219f09bd3efbb (diff)
Change colour_t to be a strongly typed structure
Make RGB default of `colour_t` Distinguish RGB and ARGB colors by type and colour_traits Add `_colour` and `_argb` colour user-defined literals Add `OpenVic::utility::unreachable`
Diffstat (limited to 'src/openvic-simulation/dataloader/NodeTools.hpp')
-rw-r--r--src/openvic-simulation/dataloader/NodeTools.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/openvic-simulation/dataloader/NodeTools.hpp b/src/openvic-simulation/dataloader/NodeTools.hpp
index 02ff239..c3eaf65 100644
--- a/src/openvic-simulation/dataloader/NodeTools.hpp
+++ b/src/openvic-simulation/dataloader/NodeTools.hpp
@@ -106,8 +106,10 @@ namespace OpenVic {
callback_t<std::string_view> expect_fixed_point_str(callback_t<fixed_point_t> callback);
node_callback_t expect_fixed_point(callback_t<fixed_point_t> callback);
+ /* Expect a list of 3 base 10 values, each either in the range [0, 1] or (1, 255], representing RGB components. */
node_callback_t expect_colour(callback_t<colour_t> callback);
- node_callback_t expect_colour_hex(callback_t<colour_t> callback);
+ /* Expect a hexadecimal value representing a colour in ARGB format. */
+ node_callback_t expect_colour_hex(callback_t<colour_argb_t> callback);
callback_t<std::string_view> expect_date_str(callback_t<Date> callback);
node_callback_t expect_date(callback_t<Date> callback);