summaryrefslogtreecommitdiff
path: root/src/feature.h
diff options
context:
space:
mode:
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