aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy/trading/BuyUpToOrder.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/economy/trading/BuyUpToOrder.hpp')
-rw-r--r--src/openvic-simulation/economy/trading/BuyUpToOrder.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/openvic-simulation/economy/trading/BuyUpToOrder.hpp b/src/openvic-simulation/economy/trading/BuyUpToOrder.hpp
new file mode 100644
index 0000000..b19cf36
--- /dev/null
+++ b/src/openvic-simulation/economy/trading/BuyUpToOrder.hpp
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "openvic-simulation/economy/GoodDefinition.hpp"
+#include "openvic-simulation/economy/trading/BuyResult.hpp"
+#include "openvic-simulation/types/fixed_point/FixedPoint.hpp"
+#include "openvic-simulation/utility/Getters.hpp"
+
+namespace OpenVic {
+ struct BuyUpToOrder {
+ private:
+ GoodDefinition const* const PROPERTY(good);
+ const fixed_point_t PROPERTY(max_quantity);
+ const fixed_point_t PROPERTY(money_to_spend);
+ const std::function<void(const BuyResult)> PROPERTY(after_trade);
+
+ public:
+ BuyUpToOrder(
+ GoodDefinition const& new_good,
+ const fixed_point_t new_max_quantity,
+ const fixed_point_t new_money_to_spend,
+ const std::function<void(const BuyResult)> new_after_trade
+ );
+ };
+} \ No newline at end of file