Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
Public Member Functions | Public Attributes | List of all members
cqsp::common::components::Market Struct Reference

#include <economy.h>

Inheritance diagram for cqsp::common::components::Market:
cqsp::common::components::MarketInformation

Public Member Functions

void AddSupply (const ResourceLedger &stockpile)
 
void AddSupply (const ResourceLedger &stockpile, double multiplier)
 
void AddDemand (const ResourceLedger &stockpile)
 
void AddDemand (const ResourceLedger &stockpile, double multiplier)
 
double GetPrice (const ResourceLedger &stockpile)
 
double GetPrice (const entt::entity &good)
 
double GetSDRatio (const entt::entity &good)
 
double GetSupply (const entt::entity &good)
 
double GetDemand (const entt::entity &good)
 
void AddParticipant (entt::entity participant)
 
MarketElementInformationoperator[] (entt::entity ent)
 
auto begin ()
 
auto end ()
 

Public Attributes

std::vector< MarketInformationhistory
 
std::map< entt::entity, MarketElementInformationmarket_information
 
std::map< entt::entity, MarketElementInformationlast_market_information
 
std::set< entt::entity > participants
 
entt::basic_sparse_set< entt::entity > connected_markets
 
double GDP = 0
 
- Public Attributes inherited from cqsp::common::components::MarketInformation
ResourceLedger demand
 
ResourceLedger sd_ratio
 
ResourceLedger ds_ratio
 
ResourceLedger supply
 
ResourceLedger volume
 The amount of goods that changed hands. We can use this to calculate the GDP More...
 
ResourceLedger price
 
ResourceLedger previous_demand
 
ResourceLedger previous_supply
 
ResourceLedger latent_supply
 
ResourceLedger last_latent_demand
 
ResourceLedger latent_demand
 

Member Function Documentation

◆ AddDemand() [1/2]

void Market::AddDemand ( const ResourceLedger stockpile)

◆ AddDemand() [2/2]

void Market::AddDemand ( const ResourceLedger stockpile,
double  multiplier 
)

◆ AddParticipant()

void cqsp::common::components::Market::AddParticipant ( entt::entity  participant)
inline

◆ AddSupply() [1/2]

void Market::AddSupply ( const ResourceLedger stockpile)

◆ AddSupply() [2/2]

void Market::AddSupply ( const ResourceLedger stockpile,
double  multiplier 
)

◆ begin()

auto cqsp::common::components::Market::begin ( )
inline

◆ end()

auto cqsp::common::components::Market::end ( )
inline

◆ GetDemand()

double Market::GetDemand ( const entt::entity &  good)

◆ GetPrice() [1/2]

double Market::GetPrice ( const entt::entity &  good)

◆ GetPrice() [2/2]

double Market::GetPrice ( const ResourceLedger stockpile)

◆ GetSDRatio()

double Market::GetSDRatio ( const entt::entity &  good)

◆ GetSupply()

double Market::GetSupply ( const entt::entity &  good)

◆ operator[]()

MarketElementInformation & cqsp::common::components::Market::operator[] ( entt::entity  ent)
inline

Member Data Documentation

◆ connected_markets

entt::basic_sparse_set<entt::entity> cqsp::common::components::Market::connected_markets

◆ GDP

double cqsp::common::components::Market::GDP = 0

◆ history

std::vector<MarketInformation> cqsp::common::components::Market::history

◆ last_market_information

std::map<entt::entity, MarketElementInformation> cqsp::common::components::Market::last_market_information

◆ market_information

std::map<entt::entity, MarketElementInformation> cqsp::common::components::Market::market_information

◆ participants

std::set<entt::entity> cqsp::common::components::Market::participants

The documentation for this struct was generated from the following files: