diff options
| author | Your Name <you@example.com> | 2021-04-13 15:14:34 -0400 | 
|---|---|---|
| committer | Your Name <you@example.com> | 2021-04-13 15:14:34 -0400 | 
| commit | 2ab51e507d620c4479e07ca0ec47d22c8c66bc90 (patch) | |
| tree | 90906ecb043c01034280c767b83a88eb6df6956f /src/feature.h | |
| download | dmtool-2ab51e507d620c4479e07ca0ec47d22c8c66bc90.tar.gz dmtool-2ab51e507d620c4479e07ca0ec47d22c8c66bc90.tar.bz2 dmtool-2ab51e507d620c4479e07ca0ec47d22c8c66bc90.zip  | |
Initial commit
Diffstat (limited to 'src/feature.h')
| -rw-r--r-- | src/feature.h | 27 | 
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; +    }; +}  | 
