]> git.tdb.fi Git - builder.git/blob - source/feature.cpp
Inline simple constructors
[builder.git] / source / feature.cpp
1 #include "feature.h"
2
3 using namespace std;
4 using namespace Msp;
5
6 Feature::Loader::Loader(Feature &f):
7         Msp::DataFile::ObjectLoader<Feature>(f)
8 {
9         add("choice",      &Loader::choice);
10         add("description", &Feature::description);
11         add("default",     &Feature::default_value);
12         add("export",      &Feature::exported);
13 }
14
15 void Feature::Loader::choice(const string &c)
16 {
17         if(obj.choices.empty())
18                 obj.default_value = c;
19         obj.choices.push_back(c);
20 }