#ifndef MODEL_HPP #define MODEL_HPP #include #include #include "stock.hpp" #include "itemType.hpp" class Model { public: Model(); ~Model(); void addData(const std::string &data); void createStock(const std::string &name, int capacity, const std::string &comment = ""); std::vector getStocks() const; // Méthodes pour gérer les ItemType void createItemType(const std::string &name, const std::string &comment = "", int size = 1); void createItemType(const std::string &name, int id, const std::string &comment = "", int size = 1); std::vector getItemTypes() const; ItemType* findItemTypeByName(const std::string &name); // Méthodes pour ajouter des items aux stocks bool addItemToStock(const std::string &stockName, const std::string &itemTypeName, int quantity); Stock* findStockByName(const std::string &name); // Nouvelles méthodes pour la gestion avancée bool removeItemFromStock(const std::string &stockName, const std::string &itemTypeName, int quantity); bool moveItemBetweenStocks(const std::string &sourceStock, const std::string &targetStock, const std::string &itemTypeName, int quantity); bool deleteStock(const std::string &stockName); bool deleteItemType(const std::string &typeName); std::string getStockContentDetails(const std::string &stockName); std::string getCapacitiesReport(); std::string getStatisticsReport(); private: std::vector stocks; // Assuming Stock is a class defined elsewhere std::vector itemTypes; // Assuming ItemType is a class defined elsewhere int nextStockId = 0; // To generate unique IDs for stocks int nextItemTypeId = 0; // To generate unique IDs for item types }; #endif // MODEL_HPP