aboutsummaryrefslogtreecommitdiff
path: root/src/spell.h
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-05-20 17:00:53 -0400
committerYour Name <you@example.com>2021-05-20 17:00:53 -0400
commitb27700a7e0b281ece3dea23060c17e0cae28715d (patch)
treeef13e98281dd0183c4fb1e32cdf371ea1f6c1794 /src/spell.h
parentbe88609c825e18201f240415fe74a31c1a789484 (diff)
downloaddmtool-b27700a7e0b281ece3dea23060c17e0cae28715d.tar.gz
dmtool-b27700a7e0b281ece3dea23060c17e0cae28715d.tar.bz2
dmtool-b27700a7e0b281ece3dea23060c17e0cae28715d.zip
Reduced exposure of implementation details
Diffstat (limited to 'src/spell.h')
-rw-r--r--src/spell.h28
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;
};
}