#include "FileRepository.h"

void FileRepository::add(Trench trench){
    MemoryRepository::add(trench);
    this->saveToFile();
}

void FileRepository::remove(int index){
    MemoryRepository::remove(index);
    this->saveToFile();
}

void FileRepository::remove(Trench trench){
    MemoryRepository::remove(trench);
    this->saveToFile();
}

void FileRepository::update(int index, int price, int quantity){
    MemoryRepository::update(index, price, quantity);
    this->saveToFile();
}
