aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/types/Date.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/types/Date.hpp')
-rw-r--r--src/openvic-simulation/types/Date.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/openvic-simulation/types/Date.hpp b/src/openvic-simulation/types/Date.hpp
index 9178e6e..9376293 100644
--- a/src/openvic-simulation/types/Date.hpp
+++ b/src/openvic-simulation/types/Date.hpp
@@ -1,16 +1,19 @@
#pragma once
#include <algorithm>
+#include <array>
#include <cstdint>
#include <ostream>
#include <string>
-#include "openvic-simulation/utility/Getters.hpp"
#include "openvic-simulation/utility/Utility.hpp"
namespace OpenVic {
// A relative period between points in time, measured in days
- struct Timespan : ReturnByValueProperty {
+ struct Timespan {
+ /* PROPERTY generated getter functions will return timespans by value, rather than const reference. */
+ using ov_return_by_value = void;
+
using day_t = int64_t;
private:
@@ -86,7 +89,10 @@ namespace OpenVic {
// Represents an in-game date
// Note: Current implementation does not account for leap-years, or dates before Year 0
- struct Date : ReturnByValueProperty {
+ struct Date {
+ /* PROPERTY generated getter functions will return dates by value, rather than const reference. */
+ using ov_return_by_value = void;
+
using year_t = uint16_t;
using month_t = uint8_t;
using day_t = uint8_t;