| 72 | } |
| 73 | |
| 74 | Collectable CollectionDatabase::collectable(String const& collectionName, String const& collectableName) const { |
| 75 | try { |
| 76 | return m_collectables.get(collectionName).get(collectableName); |
| 77 | } catch (MapException const& e) { |
| 78 | throw CollectionDatabaseException(strf("Collectable '{}' not found in collection '{}'", collectableName, collectionName), e); |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | bool CollectionDatabase::hasCollectable(String const& collectionName, String const& collectableName) const { |
| 83 | return (m_collections.contains(collectionName) && m_collectables.get(collectionName).contains(collectableName)); |
no test coverage detected