#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("description", &Feature::descr);
- add("default", &Feature::def_value);
+ 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);
}