X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ffeature.cpp;h=25183777aab27c3b31715455114510d02a27760e;hb=c8c51fac9453a677fc3e6932c4730f35e237af89;hp=54ed5147f622796ba3e6a6d5ae13444b764ab559;hpb=0458300fda4f345f865a7f3ee4fc0f2020a91983;p=builder.git diff --git a/source/feature.cpp b/source/feature.cpp index 54ed514..2518377 100644 --- a/source/feature.cpp +++ b/source/feature.cpp @@ -1,15 +1,20 @@ -/* $Id$ - -This file is part of builder -Copyright © 2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include "feature.h" +using namespace std; +using namespace Msp; + Feature::Loader::Loader(Feature &f): Msp::DataFile::ObjectLoader(f) { - add("description", &Feature::descr); - add("default", &Feature::def_value); + add("choice", &Loader::choice); + add("description", &Feature::description); + add("default", &Feature::default_value); + add("export", &Feature::exported); +} + +void Feature::Loader::choice(const string &c) +{ + if(obj.choices.empty()) + obj.default_value = c; + obj.choices.push_back(c); }