| 489 | } |
| 490 | |
| 491 | std::vector<ModelPackageItemInfo> ModelPackageImpl::findItemsByAuthor(const std::string& author) const |
| 492 | { |
| 493 | auto itemInfoVector = std::vector<ModelPackageItemInfo>(); |
| 494 | auto itemInfoEntries = getItemInfoEntries(); |
| 495 | if (itemInfoEntries != nullptr) { |
| 496 | std::vector<std::string> identifiers; |
| 497 | itemInfoEntries->getKeys(identifiers); |
| 498 | for (const auto& identifier : identifiers) { |
| 499 | auto itemInfo = findItem(identifier); |
| 500 | if (itemInfo->author() == author) { |
| 501 | itemInfoVector.push_back(*itemInfo); |
| 502 | } |
| 503 | } |
| 504 | } |
| 505 | |
| 506 | return itemInfoVector; |
| 507 | } |
| 508 | |
| 509 | void ModelPackageImpl::removeItem(const std::string& identifier) |
| 510 | { |