summaryrefslogtreecommitdiff
path: root/src/feature.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2014-01-03 18:17:58 (GMT)
committerMarius Kintel <marius@kintel.net>2014-01-03 18:17:58 (GMT)
commitbee5233a916055d41bb4ee425f5df25b80f50f16 (patch)
tree7bfac9716f778ed685e62e2d0830d1905bc08fd2 /src/feature.h
parentf093b53c3edb08ee0d64c5d6c2a1df723acfca2d (diff)
parentc5223417e3ffe965d09d971865797206080eb0ae (diff)
Merge branch 'vector-concat' of git://github.com/t-paul/openscad into t-paul-vector-concat
Conflicts: src/Preferences.ui
Diffstat (limited to 'src/feature.h')
-rw-r--r--src/feature.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/feature.h b/src/feature.h
new file mode 100644
index 0000000..20b4f16
--- /dev/null
+++ b/src/feature.h
@@ -0,0 +1,44 @@
+#ifndef FEATURE_H_
+#define FEATURE_H_
+
+#include <stdio.h>
+#include <iostream>
+#include <string>
+#include <map>
+#include <vector>
+
+class Feature
+{
+public:
+ typedef std::vector<Feature *> list_t;
+ typedef list_t::iterator iterator;
+
+ static const Feature ExperimentalConcatFunction;
+
+ const std::string& get_name() const;
+ const std::string& get_description() const;
+
+ bool is_enabled() const;
+ void enable(bool status);
+
+ static iterator begin();
+ static iterator end();
+
+ static void dump_features();
+ static void enable_feature(const std::string &feature_name, bool status = true);
+
+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;
+
+ Feature(const std::string &name, const std::string &description);
+ virtual ~Feature();
+};
+
+#endif
contact: Jan Huwald // Impressum