|
|
|
@ -49,4 +49,16 @@ int Seller::numArticlesSold() const { return static_cast<int>(getArticles(true).
|
|
|
|
|
|
|
|
|
|
int Seller::numArticlesOffered() const { return numArticlesOffered_; }
|
|
|
|
|
|
|
|
|
|
//int Seller::numArticlesTotal() const { return static_cast<int>(getArticles().size()); }
|
|
|
|
|
void Seller::cleanupArticles()
|
|
|
|
|
{
|
|
|
|
|
articles_.erase(std::remove_if(begin(articles_), end(articles_),
|
|
|
|
|
[](const std::shared_ptr<Article>& article) {
|
|
|
|
|
return article->getState() == Article::State::DELETE;
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
for (auto& article : articles_) {
|
|
|
|
|
article->setState(Article::State::OK);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// int Seller::numArticlesTotal() const { return static_cast<int>(getArticles().size()); }
|