diff options
author | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-11-04 13:17:55 +0100 |
---|---|---|
committer | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-11-04 14:38:19 +0100 |
commit | c12e742ca980d7213e2bc08b902b63117aea54f6 (patch) | |
tree | d128c5f6abe32904b9a5a2a03718ace64c85c2e2 /src/openvic-simulation/economy/trading/BuyUpToOrder.hpp | |
parent | 89e9c05f4d6276efa82fe486156357f841f864c3 (diff) |
Implement artisanal productionartisanal_production
Diffstat (limited to 'src/openvic-simulation/economy/trading/BuyUpToOrder.hpp')
-rw-r--r-- | src/openvic-simulation/economy/trading/BuyUpToOrder.hpp | 24 |
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 |