#pragma once
#include "MemoryRepository.h"
#include "../domain/trench.h"
#include <string>

class FileRepository : public MemoryRepository {
    protected:
        std::string _fileName;
        virtual void saveToFile()=0;
        virtual void loadFromFile()=0;
    
    public:
        FileRepository() = default;
        ~FileRepository() = default;
        virtual void add(Trench trench) override;
        virtual void remove(Trench trench) override;
        virtual void remove(int index) override;
        virtual void update(int index, int price, int quantity) override;
        virtual void open()=0;

};
