|
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.
|
#include <resourceledger.h>
Public Member Functions | |
| ResourceMap ()=default | |
| ~ResourceMap ()=default | |
| double | operator[] (const GoodEntity) const |
| bool | EnoughToTransfer (const ResourceMap &amount) |
| This resource ledger has enough resources inside to transfer "amount" amount of resources away More... | |
| void | operator-= (const ResourceMap &) |
| void | operator+= (const ResourceMap &) |
| void | operator*= (const ResourceMap &) |
| void | operator/= (const ResourceMap &) |
| void | operator-= (const ResourceLedger &) |
| void | operator+= (const ResourceLedger &) |
| void | operator*= (const ResourceLedger &) |
| void | operator/= (const ResourceLedger &) |
| void | operator-= (const double value) |
| void | operator+= (const double value) |
| void | operator*= (const double value) |
| void | operator/= (const double value) |
| ResourceMap | operator- (const ResourceMap &) const |
| ResourceMap | operator+ (const ResourceMap &) const |
| ResourceMap | operator* (const ResourceMap &) const |
| ResourceMap | operator/ (const ResourceMap &) const |
| ResourceMap | operator- (const double value) const |
| ResourceMap | operator+ (const double value) const |
| ResourceMap | operator* (const double value) const |
| ResourceMap | operator/ (const double value) const |
| bool | operator< (const ResourceMap &) |
| All resources in this ledger are smaller than than the other ledger More... | |
| bool | operator> (const ResourceMap &) |
| All resources in this ledger are greater than the other ledger More... | |
| bool | operator<= (const ResourceMap &) |
| All resources in this ledger are smaller than or equal to than the other ledger More... | |
| bool | operator>= (const ResourceMap &) |
| All resources in this ledger are greater than or equal to the other ledger More... | |
| bool | LedgerEquals (const ResourceMap &) |
| bool | operator> (const double &) |
| All resources in this ledger are greater than the number More... | |
| bool | operator< (const double &) |
| All resources in this ledger are less than than the number More... | |
| bool | operator== (const double &) |
| bool | operator<= (const double &) |
| bool | operator>= (const double &) |
| void | AssignFrom (const ResourceMap &) |
| void | TransferTo (ResourceMap &, const ResourceMap &) |
| void | MultiplyAdd (const ResourceMap &, double) |
| void | RemoveResourcesLimited (const ResourceMap &) |
| Removes the resources, and if the amount of resources removed are more than the resources inside the stockpile, it will set that resource to zero. More... | |
| ResourceMap | LimitedRemoveResources (const ResourceMap &) |
| Same as RemoveResourcesLimited, except that it returns how much resources it took out. More... | |
| ResourceMap | UnitLedger (const double) |
| Returns a copy of the vector with the values set to indicated value More... | |
| void | AddPositive (const ResourceMap &) |
| void | AddNegative (const ResourceMap &) |
| ResourceMap | Clamp (const double, const double) |
| Returns a copy of the vector with the values clamped between the min and max indicated More... | |
| ResourceMap | SafeDivision (const ResourceMap &) |
| Returns a copy of the vector divided by the indicated vector, with division by zero resulting in infiniy More... | |
| ResourceMap | SafeDivision (const ResourceMap &, double) |
| Returns a copy of the vector divided by the indicated vector, with division by zero resulting in the specified value More... | |
| double | Average () |
| Returns a copy of the vector divided by the indicated vector, with division by zero resulting in infiniy More... | |
| double | Min () |
| Finds the smallest value in the Ledger. More... | |
| double | Max () |
| Finds the largest value in the Ledger. More... | |
| bool | HasAllResources (const ResourceMap &) |
| Checks if this current resource ledger has any resources in this list More... | |
| bool | HasGood (GoodEntity good) |
| double | GetSum () |
| double | MultiplyAndGetSum (ResourceMap &other) |
| Multiplies the numbers stated in the resource ledger. Used for calculating the price, becuase usually the resource ledger will be the price. More... | |
| std::string | to_string () |
|
default |
|
default |
| void cqsp::core::components::ResourceMap::AddNegative | ( | const ResourceMap & | other | ) |
| void cqsp::core::components::ResourceMap::AddPositive | ( | const ResourceMap & | other | ) |
| void cqsp::core::components::ResourceMap::AssignFrom | ( | const ResourceMap & | ledger | ) |
Assigns values from the other ledger to this ledger.
| double cqsp::core::components::ResourceMap::Average | ( | ) |
Returns a copy of the vector divided by the indicated vector, with division by zero resulting in infiniy
| ResourceMap cqsp::core::components::ResourceMap::Clamp | ( | const double | minclamp, |
| const double | maxclamp | ||
| ) |
Returns a copy of the vector with the values clamped between the min and max indicated
| bool cqsp::core::components::ResourceMap::EnoughToTransfer | ( | const ResourceMap & | amount | ) |
This resource ledger has enough resources inside to transfer "amount" amount of resources away
| amount | Other resource ledger |
| double cqsp::core::components::ResourceMap::GetSum | ( | ) |
Gets the sum of all the goods in this resource ledger.
| bool cqsp::core::components::ResourceMap::HasAllResources | ( | const ResourceMap & | ledger | ) |
Checks if this current resource ledger has any resources in this list
|
inline |
| bool cqsp::core::components::ResourceMap::LedgerEquals | ( | const ResourceMap & | ledger | ) |
| ResourceMap cqsp::core::components::ResourceMap::LimitedRemoveResources | ( | const ResourceMap & | other | ) |
Same as RemoveResourcesLimited, except that it returns how much resources it took out.
| double cqsp::core::components::ResourceMap::Max | ( | ) |
Finds the largest value in the Ledger.
| double cqsp::core::components::ResourceMap::Min | ( | ) |
Finds the smallest value in the Ledger.
| void cqsp::core::components::ResourceMap::MultiplyAdd | ( | const ResourceMap & | other, |
| double | value | ||
| ) |
| double cqsp::core::components::ResourceMap::MultiplyAndGetSum | ( | ResourceMap & | other | ) |
Multiplies the numbers stated in the resource ledger. Used for calculating the price, becuase usually the resource ledger will be the price.
| ResourceMap cqsp::core::components::ResourceMap::operator* | ( | const double | value | ) | const |
| ResourceMap cqsp::core::components::ResourceMap::operator* | ( | const ResourceMap & | other | ) | const |
| void cqsp::core::components::ResourceMap::operator*= | ( | const double | value | ) |
| void cqsp::core::components::ResourceMap::operator*= | ( | const ResourceLedger & | ) |
| void cqsp::core::components::ResourceMap::operator*= | ( | const ResourceMap & | other | ) |
| ResourceMap cqsp::core::components::ResourceMap::operator+ | ( | const double | value | ) | const |
| ResourceMap cqsp::core::components::ResourceMap::operator+ | ( | const ResourceMap & | other | ) | const |
| void cqsp::core::components::ResourceMap::operator+= | ( | const double | value | ) |
| void cqsp::core::components::ResourceMap::operator+= | ( | const ResourceLedger & | ) |
| void cqsp::core::components::ResourceMap::operator+= | ( | const ResourceMap & | other | ) |
| ResourceMap cqsp::core::components::ResourceMap::operator- | ( | const double | value | ) | const |
| ResourceMap cqsp::core::components::ResourceMap::operator- | ( | const ResourceMap & | other | ) | const |
| void cqsp::core::components::ResourceMap::operator-= | ( | const double | value | ) |
| void cqsp::core::components::ResourceMap::operator-= | ( | const ResourceLedger & | ) |
| void cqsp::core::components::ResourceMap::operator-= | ( | const ResourceMap & | other | ) |
| ResourceMap cqsp::core::components::ResourceMap::operator/ | ( | const double | value | ) | const |
| ResourceMap cqsp::core::components::ResourceMap::operator/ | ( | const ResourceMap & | other | ) | const |
| void cqsp::core::components::ResourceMap::operator/= | ( | const double | value | ) |
| void cqsp::core::components::ResourceMap::operator/= | ( | const ResourceLedger & | ) |
| void cqsp::core::components::ResourceMap::operator/= | ( | const ResourceMap & | other | ) |
| bool cqsp::core::components::ResourceMap::operator< | ( | const double & | i | ) |
All resources in this ledger are less than than the number
| bool cqsp::core::components::ResourceMap::operator< | ( | const ResourceMap & | ledger | ) |
All resources in this ledger are smaller than than the other ledger
| bool cqsp::core::components::ResourceMap::operator<= | ( | const double & | i | ) |
| bool cqsp::core::components::ResourceMap::operator<= | ( | const ResourceMap & | ledger | ) |
All resources in this ledger are smaller than or equal to than the other ledger
| bool cqsp::core::components::ResourceMap::operator== | ( | const double & | i | ) |
| bool cqsp::core::components::ResourceMap::operator> | ( | const double & | i | ) |
All resources in this ledger are greater than the number
| bool cqsp::core::components::ResourceMap::operator> | ( | const ResourceMap & | ledger | ) |
All resources in this ledger are greater than the other ledger
| bool cqsp::core::components::ResourceMap::operator>= | ( | const double & | i | ) |
| bool cqsp::core::components::ResourceMap::operator>= | ( | const ResourceMap & | ledger | ) |
All resources in this ledger are greater than or equal to the other ledger
| double cqsp::core::components::ResourceMap::operator[] | ( | const GoodEntity | entity | ) | const |
| void cqsp::core::components::ResourceMap::RemoveResourcesLimited | ( | const ResourceMap & | other | ) |
Removes the resources, and if the amount of resources removed are more than the resources inside the stockpile, it will set that resource to zero.
| ResourceMap cqsp::core::components::ResourceMap::SafeDivision | ( | const ResourceMap & | other | ) |
Returns a copy of the vector divided by the indicated vector, with division by zero resulting in infiniy
| ResourceMap cqsp::core::components::ResourceMap::SafeDivision | ( | const ResourceMap & | other, |
| double | value | ||
| ) |
Returns a copy of the vector divided by the indicated vector, with division by zero resulting in the specified value
| std::string cqsp::core::components::ResourceMap::to_string | ( | ) |
| void cqsp::core::components::ResourceMap::TransferTo | ( | ResourceMap & | ledger_to, |
| const ResourceMap & | amount | ||
| ) |
| ResourceMap cqsp::core::components::ResourceMap::UnitLedger | ( | const double | val | ) |
Returns a copy of the vector with the values set to indicated value