diff options
Diffstat (limited to 'src/feature.h')
-rw-r--r-- | src/feature.h | 60 |
1 files changed, 24 insertions, 36 deletions
diff --git a/src/feature.h b/src/feature.h index 77e283c..20b4f16 100644 --- a/src/feature.h +++ b/src/feature.h @@ -7,50 +7,38 @@ #include <map> #include <vector> -class Feature { +class Feature +{ public: - typedef std::vector<Feature *> list_t; - typedef list_t::iterator iterator; + typedef std::vector<Feature *> list_t; + typedef list_t::iterator iterator; -private: - /** - * Set to true in case the matching feature was given as commandline - * argument. - */ - bool enabled_cmdline; - /** - * Set from the GUI options. This will not be set in case the GUI is - * not started at all. - */ - bool enabled_options; - - const std::string name; - const std::string description; + static const Feature ExperimentalConcatFunction; - typedef std::map<std::string, Feature *> map_t; - static map_t feature_map; - static list_t feature_list; + const std::string& get_name() const; + const std::string& get_description() const; - Feature(std::string name, std::string description); - virtual ~Feature(); - virtual void set_enable_cmdline(); - virtual void set_enable_options(bool status); + bool is_enabled() const; + void enable(bool status); -public: - static const Feature ExperimentalConcatFunction; + static iterator begin(); + static iterator end(); - const std::string& get_name() const; - const std::string& get_description() const; - - bool is_enabled() const; - void enable(bool status); + static void dump_features(); + static void enable_feature(const std::string &feature_name, bool status = true); - static iterator begin(); - static iterator end(); +private: + bool enabled; + + const std::string name; + const std::string description; + + typedef std::map<std::string, Feature *> map_t; + static map_t feature_map; + static list_t feature_list; - static void dump_features(); - static void enable_feature(std::string feature_name); - static void enable_feature(std::string feature_name, bool status); + Feature(const std::string &name, const std::string &description); + virtual ~Feature(); }; #endif |