aboutsummaryrefslogtreecommitdiff
path: root/src/feature.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature.h')
-rw-r--r--src/feature.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/feature.h b/src/feature.h
new file mode 100644
index 0000000..c433f32
--- /dev/null
+++ b/src/feature.h
@@ -0,0 +1,27 @@
+#pragma once
+#include "json.hpp"
+#include "jsonable.h"
+#include <memory>
+
+namespace feature {
+ class Feature : public Jsonable {
+ public:
+ static std::shared_ptr<Feature> create(const nlohmann::json& data);
+
+ virtual ~Feature();
+
+ std::string getName(void) const;
+ std::string getType(void) const;
+ std::string getText(void) const;
+
+ virtual nlohmann::json toJson(void) const;
+
+ protected:
+ Feature(const nlohmann::json& data);
+
+ private:
+ const std::string name;
+ const std::string type;
+ const std::string text;
+ };
+}