]> git.tdb.fi Git - builder.git/blobdiff - source/feature.cpp
Move the bpk files into a subdirectory and install them
[builder.git] / source / feature.cpp
index a483482c55e0a330c36a188a534f037d74fc08bf..712004fc6125a9b5f3fb616b6464bb91d70d80c1 100644 (file)
@@ -1,8 +1,25 @@
 #include "feature.h"
 
+using namespace std;
+using namespace Msp;
+
+Feature::Feature(const string &n):
+       name(n),
+       default_value("no")
+{ }
+
+
 Feature::Loader::Loader(Feature &f):
        Msp::DataFile::ObjectLoader<Feature>(f)
 {
+       add("choice",      &Loader::choice);
        add("description", &Feature::description);
        add("default",     &Feature::default_value);
 }
+
+void Feature::Loader::choice(const string &c)
+{
+       if(obj.choices.empty())
+               obj.default_value = c;
+       obj.choices.push_back(c);
+}