You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
636 B

#include "StorageEditor.h"
StorageEditor::StorageEditor() { }
StorageEditor::StorageEditor(const WarenStorage storage) {
this->storage = storage;
}
WarenStorage StorageEditor::getWarenStorage() const {
return storage;
}
void StorageEditor::setWarenStorage(const WarenStorage storage) {
this->storage = storage;
}
void StorageEditor::addWaren(const Ware ware, int amount) {
for(auto i = 0; i < amount; i++) {
storage.addWareAndGenerateId(ware);
}
}
void StorageEditor::removeWaren(std::string name, const int amount) {
for(auto i = 0; i < amount; i++) {
storage.removeWare(name);
}
}