diff options
author | Your Name <you@example.com> | 2021-05-09 19:01:59 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-05-09 19:01:59 -0400 |
commit | e044fc4255aa64ef1dbc3d20ed87ed6e2f61a6bd (patch) | |
tree | 344c09421c5839a764a132fe9166f0e6e3f90e45 /src/item.h | |
parent | d13358b71ec15085f2638fd9c3fc634df62dfc94 (diff) | |
download | dmtool-e044fc4255aa64ef1dbc3d20ed87ed6e2f61a6bd.tar.gz dmtool-e044fc4255aa64ef1dbc3d20ed87ed6e2f61a6bd.tar.bz2 dmtool-e044fc4255aa64ef1dbc3d20ed87ed6e2f61a6bd.zip |
Code refactoring
Diffstat (limited to 'src/item.h')
-rw-r--r-- | src/item.h | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -1,5 +1,5 @@ #pragma once -#include "json.hpp" +#include <nlohmann/json.hpp> #include "entry.h" #include <memory> @@ -8,17 +8,13 @@ namespace entry { public: static std::shared_ptr<Item> create(const nlohmann::json& data); virtual ~Item() {} - - protected: - Item(const nlohmann::json& data) : Entry(data) {} }; class Substantial { public: virtual int getCost(void) const = 0; virtual double getWeight(void) const = 0; + std::string getText() const; virtual ~Substantial() {} }; - - std::string genText(const Substantial& s); } |