diff options
Diffstat (limited to 'src/spell.h')
-rw-r--r-- | src/spell.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/spell.h b/src/spell.h index 1a560f2..2d9b24d 100644 --- a/src/spell.h +++ b/src/spell.h @@ -3,29 +3,25 @@ #include <nlohmann/json.hpp> namespace entry { + struct spellImpl; + class Spell : public Entry { public: - Spell() {} + Spell(); virtual ~Spell() {} - int getLevel(void) const {return level;} - std::string getSchool(void) const {return getType();} - std::vector<std::string> getClasses(void) const {return classes;} - std::string getCastingTime(void) const {return casting_time;} - std::string getRange(void) const {return range;} - std::string getComponents(void) const {return components;} - std::string getDuration(void) const {return duration;} + int getLevel(void) const; + std::string getSchool(void) const; + std::vector<std::string> getClasses(void) const; + std::string getCastingTime(void) const; + std::string getRange(void) const; + std::string getComponents(void) const; + std::string getDuration(void) const; std::string getText(void) const override; - NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(Entry, Spell, level, classes, casting_time, range, components, duration); - + NLOHMANN_FRIEND_DECLARES(Spell); private: - int level; - std::vector<std::string> classes; - std::string casting_time; - std::string range; - std::string components; - std::string duration; + std::shared_ptr<spellImpl> data; }; } |