#include "Store/Store.h"

Store::Store(std::vector<std::unique_ptr<Cargo>>&& cargos): _cargoes(std::move(cargos)) {}

size_t Store::getTotalPrice() const {
    size_t value {0};
    for (const auto& cargo : _cargoes) {
        value += cargo->getPrice();
    }

    return value;
}

std::vector<std::string> Store::getCargosName() const {
    std::vector<std::string> names;
    for (const auto& cargo : _cargoes) {
        names.push_back(cargo->name());
    }

    return names;
}
