diff options
Diffstat (limited to 'src/openvic-simulation/economy/GoodInstance.hpp')
-rw-r--r-- | src/openvic-simulation/economy/GoodInstance.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/openvic-simulation/economy/GoodInstance.hpp b/src/openvic-simulation/economy/GoodInstance.hpp new file mode 100644 index 0000000..3c27209 --- /dev/null +++ b/src/openvic-simulation/economy/GoodInstance.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include "openvic-simulation/economy/GoodDefinition.hpp" +#include "openvic-simulation/types/HasIdentifier.hpp" +#include "openvic-simulation/types/IdentifierRegistry.hpp" +#include "openvic-simulation/utility/Getters.hpp" + +namespace OpenVic { + struct GoodInstanceManager; + + struct GoodInstance : HasIdentifierAndColour { + friend struct GoodInstanceManager; + + private: + GoodDefinition const& PROPERTY(good_definition); + GoodDefinition::price_t PROPERTY(price); + bool PROPERTY(available); + // TODO - supply, demand, actual bought + + GoodInstance(GoodDefinition const& new_good_definition); + + public: + GoodInstance(GoodInstance&&) = default; + }; + + struct GoodInstanceManager { + private: + IdentifierRegistry<GoodInstance> IDENTIFIER_REGISTRY(good_instance); + + public: + bool setup_good_instances(GoodDefinitionManager const& good_definition_manager); + }; +} |