#pragma once #include "json.hpp" #include "jsonable.h" #include namespace item{ class Item : public Jsonable { public: static std::shared_ptr create(const nlohmann::json& data); virtual ~Item(); virtual std::string getName(void) const; virtual int getCost(void) const; virtual double getWeight(void) const; virtual nlohmann::json toJson(void) const; protected: Item(const nlohmann::json& data); private: const std::string name; const int cost; const double weight; }; }