| 4 | namespace Star { |
| 5 | |
| 6 | bool Tenant::criteriaSatisfied(StringMap<unsigned> const& colonyTags) const { |
| 7 | // Check whether colonyTags is a supermultiset of colonyTagCriteria |
| 8 | for (pair<String, unsigned> const& entry : colonyTagCriteria.pairs()) { |
| 9 | if (colonyTags.value(entry.first, 0) < entry.second) |
| 10 | return false; |
| 11 | } |
| 12 | return true; |
| 13 | } |
| 14 | |
| 15 | TenantDatabase::TenantDatabase() { |
| 16 | auto assets = Root::singleton().assets(); |
no test coverage detected