aboutsummaryrefslogtreecommitdiff
path: root/src/feature.h
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-04-16 11:23:27 -0400
committerYour Name <you@example.com>2021-04-16 11:23:27 -0400
commit4618763c0e3a723bf4bb43c7b9edbce87240e0af (patch)
treea18aa4bf7da05ac02b4e37b199aeeb82da977aea /src/feature.h
parentdfce4d0398a8bafbb7ad7a31345af181c0269c09 (diff)
downloaddmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.tar.gz
dmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.tar.bz2
dmtool-4618763c0e3a723bf4bb43c7b9edbce87240e0af.zip
Rebased feature/item on entry
Diffstat (limited to 'src/feature.h')
-rw-r--r--src/feature.h29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/feature.h b/src/feature.h
index 01802bf..f3073d8 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -1,33 +1,16 @@
#pragma once
#include "json.hpp"
-#include "jsonable.h"
+#include "entry.h"
#include <memory>
-namespace feature {
- class Feature : public Jsonable {
+namespace entry {
+ class Feature : public Entry {
public:
static std::shared_ptr<Feature> create(const nlohmann::json& data);
- virtual ~Feature() {}
-
- std::string getName(void) const {return name;}
- std::string getType(void) const {return type;}
- virtual std::string getText(void) const {return text;}
-
- virtual nlohmann::json toJson(void) const {
- return nlohmann::json({
- {"name", name},
- {"type", type},
- {"text", text}
- });
- }
-
protected:
- Feature(const nlohmann::json& data) : name(data["name"]), type(data["type"]), text(data["text"]) {};
-
- private:
- const std::string name;
- const std::string type;
- const std::string text;
+ Feature(const nlohmann::json& data) : Entry(data) {};
};
+
+ //std::string genText(const Feature& f, const creature::Creature& c);
}