summaryrefslogtreecommitdiff
path: root/src/feature.h
diff options
context:
space:
mode:
authorTorsten Paul <Torsten.Paul@gmx.de>2014-01-02 22:29:48 (GMT)
committerTorsten Paul <Torsten.Paul@gmx.de>2014-01-02 22:32:03 (GMT)
commitb7b2681c74d509109782c42ea0deb3ddcf1ad5e2 (patch)
tree812ca4aa2d80ff72cf8b3b2124b54f0f13635e15 /src/feature.h
parent09f8e80a7d49188ff18195e40e3c02a2d8768257 (diff)
Add GUI Settings page to enable/disable features.
Diffstat (limited to 'src/feature.h')
-rw-r--r--src/feature.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/feature.h b/src/feature.h
index 3c97edc..77e283c 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -5,8 +5,13 @@
#include <iostream>
#include <string>
#include <map>
+#include <vector>
class Feature {
+public:
+ typedef std::vector<Feature *> list_t;
+ typedef list_t::iterator iterator;
+
private:
/**
* Set to true in case the matching feature was given as commandline
@@ -19,12 +24,14 @@ private:
*/
bool enabled_options;
- std::string name;
+ const std::string name;
+ const std::string description;
typedef std::map<std::string, Feature *> map_t;
static map_t feature_map;
-
- Feature(std::string name);
+ static list_t feature_list;
+
+ Feature(std::string name, std::string description);
virtual ~Feature();
virtual void set_enable_cmdline();
virtual void set_enable_options(bool status);
@@ -33,11 +40,13 @@ public:
static const Feature ExperimentalConcatFunction;
const std::string& get_name() const;
+ const std::string& get_description() const;
bool is_enabled() const;
-
- friend bool operator ==(const Feature& lhs, const Feature& rhs);
- friend bool operator !=(const Feature& lhs, const Feature& rhs);
+ void enable(bool status);
+
+ static iterator begin();
+ static iterator end();
static void dump_features();
static void enable_feature(std::string feature_name);
contact: Jan Huwald // Impressum